RustCrypto / RSA

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

Decoding a public key from DER #436

Closed JohnScience closed 2 months ago

JohnScience commented 2 months ago

I would like the rsa crate to also provide a function like https://docs.rs/rsa-der/latest/rsa_der/fn.public_key_from_der.html.

I can't use it directly because it returns Vec<u8> and I can't convert it in place because of the deallocation requirement for Layout.

tarcieri commented 2 months ago

Please see the documentation for decoding PKCS#1 and PKCS#8 keys: