The BN_mul bug test apparently is no longer needed
authorBodo Möller <bodo@openssl.org>
Thu, 14 Dec 2000 17:46:36 +0000 (17:46 +0000)
committerBodo Möller <bodo@openssl.org>
Thu, 14 Dec 2000 17:46:36 +0000 (17:46 +0000)
crypto/bn/bn_recp.c

index 2c0998eacd3dcbc47e42cb0cb49c1b6ac4fe4ace..ef5fdd470808c96f02fba4ec12327267d6131961 100644 (file)
@@ -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 (!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);
        ret=len;
 err:
        BN_free(&t);