projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
20f88b9
)
BN_mod_exp problems ...
author
Bodo Möller
<bodo@openssl.org>
Thu, 30 Nov 2000 11:47:04 +0000
(11:47 +0000)
committer
Bodo Möller
<bodo@openssl.org>
Thu, 30 Nov 2000 11:47:04 +0000
(11:47 +0000)
crypto/bn/bntest.c
patch
|
blob
|
history
diff --git
a/crypto/bn/bntest.c
b/crypto/bn/bntest.c
index 9d1fca7ea0cffcc2ec56fccec7d8e397e74106c7..15daa11d50a3cc202ace519c0c5b0bb67f6a8f71 100644
(file)
--- a/
crypto/bn/bntest.c
+++ b/
crypto/bn/bntest.c
@@
-956,7
+956,17
@@
int test_kron(BIO *bp, BN_CTX *ctx)
if (!BN_sub_word(r, 1)) goto err;
if (!BN_rshift1(r, r)) goto err;
/* r := a^r mod b */
if (!BN_sub_word(r, 1)) goto err;
if (!BN_rshift1(r, r)) goto err;
/* r := a^r mod b */
+#if 0 /* These three variants should produce the same result, but with
+ * BN_mod_exp_recp or BN_mod_exp_simple, the test fails with
+ * the "Legendre symbol computation failed" error.
+ * (Platform: debug-solaris-sparcv9-gcc)
+ */
if (!BN_mod_exp(r, a, r, b, ctx)) goto err;
if (!BN_mod_exp(r, a, r, b, ctx)) goto err;
+#elsif 0
+ if (!BN_mod_exp_recp(r, a, r, b, ctx)) goto err;
+#else
+ if (!BN_mod_exp_simple(r, a, r, b, ctx)) goto err;
+#endif
if (BN_is_word(r, 1))
legendre = 1;
if (BN_is_word(r, 1))
legendre = 1;