You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
certain exponents cause generateKeyPair to hang #27087
you'd expect it to eventually do something at least error, but it just hangs as do exponents 5 and 17, in fact the only one that seems to work is 0x10001.
This isn't a speed thing since I can generate a key like this in browser crypto and in pure javascript pretty easily.
looking at the tests it looks like 0x10001 is the only key being tested against
if (EVP_PKEY_CTX_set_rsa_keygen_pubexp(ctx.get(), bn.get()) <= 0)
returnfalse;
}
has code specific to non-default exponents, which explains why this specific path can fault but not the default exponent.
The exponent seems to be changing to a 0x555558b35110 somewhere along the way, though it is correct at BN_set_word() in the above code. Still looking, in between doing other things.
Activity
sam-github commentedon Apr 4, 2019
It segfaults for me.
node/src/node_crypto.cc
Lines 6066 to 6073 in 2f1ed5c
The exponent seems to be changing to a 0x555558b35110 somewhere along the way, though it is correct at
BN_set_word()in the above code. Still looking, in between doing other things.crypto: fix rsa key gen with non-default exponent
crypto: fix rsa key gen with non-default exponent
crypto: fix rsa key gen with non-default exponent