Michael Schmidt via RT wrote: > Hi, > > I think I've encountered a problem with BN_num_bits. I have experienced > that BN_num_bits often returns 1 (sometimes more) bits less than the > actual key size of a BIGNUM. With 2048 bit DH key pairs, I've often seen > 2047 bit returned by BN_num_bits (checking the public key). I'm seeing a > case now where it returns 2044 bit only. > > My environment: > OpenSSL 0.9.7d > SuSE Linux 9.0 > compiled with gcc 3.3.1 > > I have attached a test case (actually more or less a fragment of an > application of mine) which shows the 2044 bit case.
That's not a bug (at least not in your example): The most significant byte of your public key is 0x0a (and as the key is 256 bytes long) BN_num_bits correctly gives you 2044 bits. Cheers, Nils ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
