[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-smartcardddk
Subject:    Re: Cryptographic Checksum
From:       Bernard.GAGNON () GEMPLUS ! COM
Date:       1998-10-05 8:48:16
[Download RAW message or body]


Cryptographic operations in a Windows environment are performed via CAPI
(Crypto
API) and associated Crypto Service Providers. If you have a US version of
Windows and IE, the "RSA enhanced" service provider installed with it
supports
DES and 3-DES.

Bernard Gagnon
Gemplus Canada ADC


-----Original Message-----
Sent: Saturday, October 03, 1998 12:49 AM
Subject: Re: Cryptographic Checksum


Bernard,

What function do I call in Microsoft C/C++ to calculate 3DES() or DES().

Thank you.

Bernard.GAGNON@GEMPLUS.COM wrote:

> The 3DES is used as a block cipher as follows:
>
> Let the key K be a 16-byte keys. Let Kl be the 8 most significant bytes
of
> K and
> let Kr be the 8 least significant bytes of K.
>
> Then, the encryption of a message block of 8 bytes M is given as follows:
>
>      3DES (K, M) = DES (Kl, DES-1 (Kr, DES (Kl, M)))
>
>      i.e.
>         1) Encrypt M with the key Kl i.e. compute X = DES   (Kl, M)
>         2) Decrypt X with the key Kr i.e. compute Y = DES-1 (Kr, X)
>         3) Encrypt Y with the key Kl i.e. compute Z = DES   (Kl, Y)
>
>         The result of the computation is Z i.e. 3DES (K, M) = Z
>
> Therefore, the Crycks is computed by using 3DES as a block cipher is CBC
> mode
> (in fact outer-CBC mode). The message is divided into blocks of 8-byte
and
> the
> Crycks is computed as described in your message.
>
> If necassary, the message is padded with 0x00 to make sure that the
length
> of
> the message is divided by 8.
>
> Jean-Marc Robert
> Gemplus R&D Center
> Montreal
>
> -----Original Message-----
> Sent: Wednesday, September 30, 1998 11:18 PM
> Subject: Cryptographic Checksum
>
> I am looking for information on how-to determine the cryptographic
> checksum.
>
> I am using Gemplus' GCR410 smart card reader and GPK4000 smart card.
>
> The cryptographic checksum is calculated as follows:
>
> Kts is the temporary session key.
>
> 1.    R1 is calculated as 3DES(Block 1, Kts)
> 2.    R2 is calculated as 3DES(Block 2 XOR R1, Kts)
> 3.    This is repeated for each block of 8 bytes, with the result of the
> one computation (Ri) being used in the next one (Ri+1)
> 4.    Rn is the final computation, using the final data block, Block n
> and is calculated as 3DES(Block n XOR Rn-1)
> 5.    CRYCKS is the result of this final computation (i.e., Rn)
>
> Only the three least significant bytes of the CRYCKS will be used for
> secure messaging.
>
> The questions are how to derive 3DES(Block 1, Kts), 3DES(Block 2 XOR R1,
> Kts), 3DES(Block n XOR Rn-1)?
>
> Thank you.
>





 ----------------------------------------------------------------
 INFORMATION    AUTOMATIC VIRUS CHECK (GEMPLUS)   No virus known.
 ----------------------------------------------------------------

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic