提交 ea96c4bc 编写于 作者: A Andy Polyakov

test_mont was exercising 100-bit multiplication modulus X*I-bit, where

X is 5120 on 32-bit and 151552 on 64-bit architectures and I varies
from 0 to 4. As result the test was *unreasonably* slow and virtually
impossible to complete on 64-bit architectures (e.g. IRIX bc couldn't
even swallow such long lines).
上级 207c7df7
...@@ -615,7 +615,7 @@ int test_mont(BIO *bp, BN_CTX *ctx) ...@@ -615,7 +615,7 @@ int test_mont(BIO *bp, BN_CTX *ctx)
BN_rand(&b,100,0,0); /**/ BN_rand(&b,100,0,0); /**/
for (i=0; i<num2; i++) for (i=0; i<num2; i++)
{ {
int bits = (100%BN_BITS2+1)*BN_BITS2*i*BN_BITS2; int bits = (200*(i+1))/num2;
if (bits == 0) if (bits == 0)
continue; continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册