diff options
author | Bodo Möller <bodo@openssl.org> | 2000-12-14 17:46:36 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2000-12-14 17:46:36 +0000 |
commit | 3b28dbce7ec796e96aebde0118144537af11f991 (patch) | |
tree | 01d2727e63c6cd04c13dc05da970aa4b891de91b /crypto/bn | |
parent | 5a4fbc69c3a62bea4f02c99b766b34a6edfa6114 (diff) |
The BN_mul bug test apparently is no longer needed
Diffstat (limited to 'crypto/bn')
-rw-r--r-- | crypto/bn/bn_recp.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/crypto/bn/bn_recp.c b/crypto/bn/bn_recp.c index 2c0998eacd..ef5fdd4708 100644 --- a/crypto/bn/bn_recp.c +++ b/crypto/bn/bn_recp.c @@ -223,43 +223,6 @@ int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx) if (!BN_div(r,NULL,&t,m,ctx)) goto err; -#if 1 - { - BIGNUM v; - - BN_init(&v); - BN_mul(&v,r,m,ctx); - if (BN_num_bits(&v) > BN_num_bits(r) + BN_num_bits(m)) - { - fprintf(stderr,"bn_recp.c: BN_mul does not work\n"); - fprintf(stderr,"r ="); - BN_print_fp(stderr,r); - fprintf(stderr,"\nm ="); - BN_print_fp(stderr,m); - fprintf(stderr,"\nr*m ="); - BN_print_fp(stderr,&v); - fprintf(stderr,"\n"); - abort(); - -/* Example output (Linux x86): - -bn_recp.c: BN_mul does not work -r =11F5575B94E4AA12CA5D2B7A3DDC5E1A68C77758A941F3C50749D2BB2C65F8D2424E23642AC2CEEFE520FE594626AF7440772AD8C2F3801925E13B11B4398A51A -m =E415484B146C8AC93EE7B5CAA1C0B0182324E60263BE95C3E26542CD3ADF818D92DD52C073E2B38AEEA5F6C926D2D3D53D7190461D3DF62A20449B5BEAF4F74D -r*m =1B96E67C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001B96E67AB2626FFC8A5076B1BE234C8A69F72D9D73A71EDB1649209D42FA20ACA2FAE36B481D9C6F2FE021A437FD81ABB62B5F13E8DEB58366ACEE8493B4F610BCFDBED2 - -The result should be -r*m =FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB2626FFC8A5076B1BE234C8A69F72D9D73A71EDB1649209D42FA20ACA2FAE36B481D9C6F2FE021A437FD81ABB62B5F13E8DEB58366ACEE8493B4F610BCFDBED2 -(according to GNU bc). - -*/ - - - } - BN_free(&v); - } -#endif - ret=len; err: BN_free(&t); |