3DES key generation

Egon Andersen ean@ishoejby.dk
Fri Apr 18 13:39:02 2003


Johan Wevers wrote:
> You, Egon Andersen, wrote:
> 
> 
>>I know that gpg can use 3DES cipher algorithm, but how do I generate the
>>  128-bit key used for this?
> 
> 
> 3DES uses a 168 bit key (3*56). You don't need to generate this key, a
> random generator will do it for you. If you want to generate it yourself,
> for example for test purposes, I guess tou'll have to hack that into gpg
> yourself.
> 

I had a closer look at "The GNU Privacy Handbook" Chapter 2 under 
Symmetric ciphers, it says: "... 3DES, Blowfish, and IDEA all use 
128-bit keys, ..."

(I agree that is seems a little strange to call it 3DES then.)

But now I came to think about it.
Can I in principle use 'any' bit-string with the required number of bits 
as my key?

If that is so, then I could use a high-quality random number generator 
to make my keys?
Then that may well be the solution to my problem.

Best regards
Egon Andersen