rsa_keygen-1.0.5 has been yanked.
rsa_keygen
How to use:
A keypair is a struct where the first element is the private key and the second element is the public key:
type Keypair = ;
pub use generate_seedphrase;
pub use keypair_from_seedphrase;
pub use keypair_from_private_key;
pub use generate_seedphrase_and_keypair;
pub use store_in_file;
//generate a 12 word seedphrase
let seedphrase = generate_seedphrase;
//generate an rsa keypair from the 12 word seedphrase
let = keypair_from_seedphrase.unwrap;
//generate an rsa keypair from an already known secret key
let = keypair_from_private_key;
you can generate the seedphrase and keypair easily using the generate_seedphrase_and_keypair function:
let = generate_seedphrase_and_keypair.unwrap;
you can export the private key or the public key to pem format in order to make it more readable, using the pkcsx_pem_from functions. Currently pkcs1 and pkcs8 are supported:
pub use pkcs8_pem_from_priv_key;
pub use pkcs8_pem_from_pub_key;
let priv_key_pem = pkcs8_pem_from_priv_key.unwrap;
let pub_key_pem = pkcs8_pem_from_pub_key.unwrap;
it's possible to write the keypair and seedphrase to a file using the store_in_file function:
store_in_file;
If you have any requests or improvements, make an issue or a pr on the github.