RustCrypto / RSA

RSA implementation in pure Rust
Apache License 2.0
536 stars 148 forks source link

Is it possible to export the key being generated? #356

Closed realzhujunhao closed 1 year ago

realzhujunhao commented 1 year ago

background: I am new to cryptography, but I hope to integrate end to end encrypt feature to my toy chat server.

I hope to know: 1) "yes or no" to the title 2) If yes, which API converts the RsaPublicKey into u8 slice? 3) If no, what else should I look for?

realzhujunhao commented 1 year ago

use pkcs8::{EncodePublicKey} Then pub_key.to_pub_key_pem()