From: [EMAIL PROTECTED] ulf> ulf 02-Dec-2000 08:33:00 ulf> ulf> Modified: crypto/bn bn.h bn_rand.c bntest.c ulf> Log: ulf> New function BN_bntest_rand() to detect more BN library bugs. ulf> ulf> The bn_cmp_part_words bug was only caught in the BN_mod_mul() test, ulf> not in the BN_mul() test, so apparently the choice of parameters in ulf> some cases is bad. Hmm, and here I believed that BIGNUMs were normalised, which means that for BIGNUM *bn, bn->top would be the index of the lowest *non-zero* byte in the number array. I was under the impression that was why things like BN_bin2bn() end with bn_fix_top(bn)... Perhaps that's even why functions like BN_num_bits() do not check for 0's near top. Anyhow, that was the reason bn_cmp_part_words() didn't check further when dl != 0, because it worked under the assumption that the larger array would not have a lot of zeroes near top. Personally, I do prefer a lot to work under that assumption and work toward holding that assumption true rather than suddenly have to check for zeroes near the top in every operation where that is crucial. When operating with BIGNUMs, normalisation is crucial. -- Richard Levitte \ Spannv�gen 38, II \ [EMAIL PROTECTED] Chairman@Stacken \ S-168 35 BROMMA \ T: +46-8-26 52 47 Redakteur@Stacken \ SWEDEN \ or +46-709-50 36 10 Procurator Odiosus Ex Infernis -- [EMAIL PROTECTED] Member of the OpenSSL development team: http://www.openssl.org/ Software Engineer, Celo Communications: http://www.celocom.com/ Unsolicited commercial email is subject to an archival fee of $400. See <http://www.stacken.kth.se/~levitte/mail/> for more info. ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
Re: cvs commit: openssl/crypto/bn bn.h bn_rand.c bntest.c
Richard Levitte - VMS Whacker Sat, 02 Dec 2000 04:09:48 -0800
- Re: cvs commit: openssl/crypto/bn bn.h bn_ra... Richard Levitte - VMS Whacker
- Re: cvs commit: openssl/crypto/bn bn.h ... Ulf M�ller
- Re: cvs commit: openssl/crypto/bn bn.h ... Richard Levitte - VMS Whacker
- Re: cvs commit: openssl/crypto/bn bn.h ... Ulf M�ller
- Re: cvs commit: openssl/crypto/bn b... Richard Levitte - VMS Whacker
