summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bntest.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2000-11-30 11:47:04 +0000
committerBodo Möller <bodo@openssl.org>2000-11-30 11:47:04 +0000
commit04ca16890b46df7529e5f3bb5b9d3d1970d479b3 (patch)
tree9391e1649a43c241f2495ebe84597487d6ca1780 /crypto/bn/bntest.c
parent20f88b9bd483b9f10690969031029a7ebc031d7c (diff)
BN_mod_exp problems ...
Diffstat (limited to 'crypto/bn/bntest.c')
-rw-r--r--crypto/bn/bntest.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/bn/bntest.c b/crypto/bn/bntest.c
index 9d1fca7ea0..15daa11d50 100644
--- 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 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;
+#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;