[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regarding DES/3DES



On Tue, May 16, 2000 at 12:12:17PM +0530, Ruheena Rashid wrote:
> Hello

> I have  query regarding using DES and 3DES for encryption.
> RFC 2420 states that - for 3DES
> "The keyed DES function is iterated three times, an encryption (E) followed 
> by a decryption (D) followed by an encryption (E), and generates the 
> ciphertext (C1) for the block. Each iteration uses an independent key: k1, 
> k2 and k3. To decrypt, the order of the functions is reversed: decrypt with 
> k3, encrypt with k2, decrypt with k1, and XOR with the previous cipher- 
> text block."

> Since 3 different keys are used in 3DES, is it that the second and third 
> keys (k2 and k3) are generated using the first key(k1) ?

	Each key is a 56 bit quantity and are considered independent.
When all three keys are different, this is 168 bit 3DES.  If the first
and third keys are the same, this is 112 bit EDE 3DES.  If all three
keys are the same, this is the degenerate 56 bit single DES compatible
mode (the encrypt-decrypt-encrypt reduces to be identical to just a
single encrypt with a single key when all three are identical).

> If not, then how are the second and third keys (k2 and k3) generated  ?

	If you generate a 168 bit key, the first key is the first 56 bits,
the second key is the next 56 bits, and the third key is the last 56bits.
Or was that the other way around???  :-)  Now was that bigendian or little
endian???  :-)  (Sorry, had to poke some humor.)  Each of the three "keys"
are 56 bits long.

> Regards
> Ruheena Rashid.

	Mike
-- 
 Michael H. Warfield    |  (770) 985-6132   |  mhw@WittsEnd.com
  (The Mad Wizard)      |  (770) 331-2437   |  http://www.wittsend.com/mhw/
  NIC whois:  MHW9      |  An optimist believes we live in the best of all
 PGP Key: 0xDF1DD471    |  possible worlds.  A pessimist is sure of it!



References: