Ulf:
I use bin2bn to generate the BNs for P and G, and the char lengths are
correct AND statically defined in the .h file, so they are the same
every time. Then I generate the key using DH_generate_key() and
BN_num_bytes() to determine the length of the key. Is that incorrect?
The reason I found the error is that I use the DH struct to provide a
key to the blowfish encryption function and it would fail sometimes.
Ulf Moeller wrote:
>
> On Wed, Nov 01, 2000, Lawrence MacIntyre wrote:
>
> > When you run the program 1000 times, somewhere between 3 and 9
> > times the length of the public key will be 55 bytes instead of 56, as it
> > should be. This breaks my client:-( Once, the key was actually 54
> > bytes.
>
> You really should fix the client. The key is a random number, and you have
> to expect the top byte to be zero in about 1 out of 256 cases.
--
Lawrence
~
------------------------------------------------------------------------
Lawrence MacIntyre Center for Information Infrastructure Technology
[EMAIL PROTECTED] http://www.ciit.y12.doe.gov/~lpz 865.574.8696
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]