pub type RsaPrivateKeyOwned = RsaPrivateKey<Uint>;Expand description
PKCS#1 RSA Private Keys as defined in [RFC 8017 Appendix 1.2].
Owns its integer data. Use DecodeRsaPrivateKey and EncodeRsaPrivateKey
for DER decoding and encoding, or PEM when the pem feature is enabled.
Aliased Type§
pub struct RsaPrivateKeyOwned {
pub modulus: Uint,
pub public_exponent: Uint,
pub private_exponent: Uint,
pub prime1: Uint,
pub prime2: Uint,
pub exponent1: Uint,
pub exponent2: Uint,
pub coefficient: Uint,
pub other_prime_infos: Option<Vec<OtherPrimeInfo<Uint>>>,
}Fields§
§modulus: Uintn: RSA modulus.
public_exponent: Uinte: RSA public exponent.
private_exponent: Uintd: RSA private exponent.
prime1: Uintp: first prime factor of n.
prime2: Uintq: Second prime factor of n.
exponent1: UintFirst exponent: d mod (p-1).
exponent2: UintSecond exponent: d mod (q-1).
coefficient: UintCRT coefficient: (inverse of q) mod p.
other_prime_infos: Option<Vec<OtherPrimeInfo<Uint>>>Additional primes r_3, …, r_u, in order, if this is a multi-prime
RSA key (i.e. version is multi).
Trait Implementations§
Source§impl DecodeRsaPrivateKey for RsaPrivateKeyOwned
Available on crate feature alloc only.
impl DecodeRsaPrivateKey for RsaPrivateKeyOwned
Available on crate feature
alloc only.Source§fn from_pkcs1_der(bytes: &[u8]) -> Result<Self>
fn from_pkcs1_der(bytes: &[u8]) -> Result<Self>
Deserialize PKCS#1 private key from ASN.1 DER-encoded data
(binary format).
Source§fn from_pkcs1_pem(s: &str) -> Result<Self>
fn from_pkcs1_pem(s: &str) -> Result<Self>
Deserialize PKCS#1-encoded private key from PEM. Read more