X-Git-Url: https://www.bearssl.org/gitweb//home/git/?p=BearSSL;a=blobdiff_plain;f=src%2Frsa%2Frsa_i15_keygen.c;h=e8da41984a08551eb5b53a27b8664f7bdfb0ca8e;hp=0f4435fbc102acd7c958474ea9891db6c5a6968c;hb=b715b43e411dc5d5949df6f75ef7bb65952db11c;hpb=491a45337de8dc0a4c100abf33f5c0e187a08afd diff --git a/src/rsa/rsa_i15_keygen.c b/src/rsa/rsa_i15_keygen.c index 0f4435f..e8da419 100644 --- a/src/rsa/rsa_i15_keygen.c +++ b/src/rsa/rsa_i15_keygen.c @@ -318,9 +318,9 @@ mkprime(const br_prng_class **rng, uint16_t *x, uint32_t esize, continue; } if ((pubexp == 3 && m3 == 1) - || (pubexp == 5 && m5 == 5) - || (pubexp == 7 && m5 == 7) - || (pubexp == 11 && m5 == 11)) + || (pubexp == 5 && m5 == 1) + || (pubexp == 7 && m7 == 1) + || (pubexp == 11 && m11 == 1)) { continue; } @@ -435,8 +435,8 @@ bufswap(void *b1, void *b2, size_t len) /* see bearssl_rsa.h */ uint32_t br_rsa_i15_keygen(const br_prng_class **rng, - br_rsa_private_key *sk, unsigned char *kbuf_priv, - br_rsa_public_key *pk, unsigned char *kbuf_pub, + br_rsa_private_key *sk, void *kbuf_priv, + br_rsa_public_key *pk, void *kbuf_pub, unsigned size, uint32_t pubexp) { uint32_t esize_p, esize_q;