Skip to content

Bug in iqmp calculation #62

Closed
Closed
@angelakis

Description

@angelakis

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')]

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions