diff options
author | Bodo Möller <bodo@openssl.org> | 2000-11-28 08:53:35 +0100 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2000-11-28 08:53:35 +0100 |
commit | d79cab27a583a3557a8f45a41326ad2953fde538 (patch) | |
tree | d4e9b247ab4879a477478f452108b8cec1e4bc13 /crypto/bn/bntest.c | |
parent | Comments on SSL_peek deficiencies (diff) | |
download | openssl-d79cab27a583a3557a8f45a41326ad2953fde538.tar.xz openssl-d79cab27a583a3557a8f45a41326ad2953fde538.zip |
Correct a bug in BN_kronecker.
Sketch the test for BN_kronecker.
Diffstat (limited to 'crypto/bn/bntest.c')
-rw-r--r-- | crypto/bn/bntest.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/bn/bntest.c b/crypto/bn/bntest.c index 37631e439b..866ac1d0a0 100644 --- a/crypto/bn/bntest.c +++ b/crypto/bn/bntest.c @@ -902,7 +902,17 @@ int test_exp(BIO *bp, BN_CTX *ctx) int test_kron(BIO *bp, BN_CTX *ctx) { + /* We test BN_kronecker(a, b, ctx) just for b odd (Jacobi symbol). + * In this case we know that if b is prime, then BN_kronecker(a, b, ctx) + * is congruent to $a^{(b-1)/2}$, modulo $b$ (Legendre symbol). + * So we generate a random prime b and compare these values + * for a number of random a's. (That is, we run the Solovay-Strassen + * primality test to confirm that b is prime, except that we + * don't want to test whether b is prime but whether BN_kronecker + * works.) */ + /* XXX */ + return(1); } |