How does ANSI X9.17 work?
The ANSI X9.17 is the method of key generation PGP uses. It is oficially specified using 3DES, but was easily converted to IDEA. X9.17 requires 24 bytes of random data from randseed.bin. (PGP keeps an extra 384 bytes of state information for other uses…) When cryptRand starts, the randseed.bin file is washed (see below) and the first 24-bytes are used to initialize X9.17. In X9.17, a random number is generated by R = E[E(T) XOR V] and V = E[E(T) XOR R] where • E() = an IDEA encryption, with a reusable key used for key generation • T = timestamp (data from randseed.bin used in place of timestamp) • V = Initialization Vector, from randseed.