Topic: Manually populate and store a RsaKey structure
Hello !
I'm new on this forum and I recently started working with wolfCrypt on STM32(H725).
I would like to get a secured communication with a Python application with which the STM32 is communicating using RSA data encryption/decryption and digital signature. I started small trying to manually populate the keys its components (n, e for public key, n, d, p, q, dP, dQ, u for private key) in order for each entity to know the public key of the other entity. When doing so and verifying the key using wc_CheckRsaKey, I got ret = RSA_KEY_PAIR_E (-262, from rsa.c -> wc_CheckRsaKey -> _ifc_pairwise_consistency_test -> wc_RsaSSL_Sign -> ret = -234 -> ret = -262).
I know it is possible to create a RsaKey object in Python using Crypto.PublicKey.RSA with (n, e, d, p, q, dP, dQ, u) and I would like to do the same thing using wolfCrypt on STM32. Is it possible ?
Also, I would like to store the STM32 RSA private key on internal flash memory to get it back after a reboot. Is there a solution ?
Thanks for your help !