mirror of
https://github.com/trussed-dev/trussed-rsa-backend.git
synced 2026-06-20 04:16:22 -07:00
The rsa4096pkcs_inject test is broken with rsa v0.9.7 because it uses an
invalid key. This patch replaces the invalid key with a valid key
generated with the Python cryptography package:
from cryptography.hazmat.primitives.asymmetric import rsa
e = int("010001", 16)
private_key = rsa.generate_private_key(e, 4096)
public_numbers = private_key.public_key().public_numbers()
private_numbers = private_key.private_numbers()
print(f"n = {hex(public_numbers.n)}")
print(f"e = {hex(public_numbers.e)}")
print(f"d = {hex(private_numbers.d)}")
print(f"p = {hex(private_numbers.p)}")
print(f"q = {hex(private_numbers.q)}")
Fixes: https://github.com/trussed-dev/trussed-rsa-backend/issues/15