cancel
Showing results for 
Search instead for 
Did you mean: 

How do you generate public and private keys for RSA?

MMart.9
Associate II

The user manual (UM1924) says in section 15 RSA Algorithm:

There are two structures that pass keys to the functions:

•RSAprivKey_stt for the private key

•RSApubKey_stt for the public key

All members of the above functions should be filled by the user before calls to the RSA functions.

So I need the keys before using the library.

In the STM32_Cryptographic_example, in the RSA subfolder there's an example code that already comes with a pre-generated array for modulus, public and private exponents, message and signature, but how do you generate those arrays?

How do you generate the keys?

I know that modulus n=p*q and private exponent d=(e^-1)mod(Phi)... and all that, but I would think those formulas come already in the libraries and if not, how should one generate large p's and q's then?

1 ACCEPTED SOLUTION

Accepted Solutions

You can use standard command line tools like openssl or use some kind of graphical tool like RSATool

View solution in original post

2 REPLIES 2

You can use standard command line tools like openssl or use some kind of graphical tool like RSATool

Thank you!