-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Labels
Description
There's a bug/typo in iqmp calculation. The parameters in the method below should be p, q instead of p, p:
| cnum["iqmp"] = rsa.rsa_crt_iqmp(cnum["p"], cnum["p"]) |
(Also 2 lines below.)
AFAIK Cryptography < 3.1.0 and the underlying libraries/bindings were correcting this error but after version 3.1.0 the checks became stricter and the key is rejected:
'Invalid private key', [_OpenSSLErrorWithText(code=67764350, lib=4, func=160, reason=126, reason_text=b'error:040A007E:rsa routines:RSA_check_key_ex:iqmp not inv
erse of q')]