pub type RsaPrivateKey = GenericRsaPrivateKey<BoxedUint, BoxedMontyParams>;Available on crate feature
alloc only.Expand description
Boxed RSA private key alias used by the alloc code path.
from_public_and_d is unreachable through this alias — BoxedUint
doesn’t impl [RawPrivateKeyConstructible]:
ⓘ
use rsa_heapless::RsaPrivateKey;
fn must_not_compile(pub_key: rsa_heapless::RsaPublicKey, d: crypto_bigint::BoxedUint) {
let _: RsaPrivateKey = RsaPrivateKey::from_public_and_d(pub_key, d);
}Aliased Type§
pub struct RsaPrivateKey { /* private fields */ }Trait Implementations§
Source§impl AsRef<GenericRsaPublicKey<BoxedUint, BoxedMontyParams>> for RsaPrivateKey
impl AsRef<GenericRsaPublicKey<BoxedUint, BoxedMontyParams>> for RsaPrivateKey
Source§fn as_ref(&self) -> &RsaPublicKey
fn as_ref(&self) -> &RsaPublicKey
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl DecodeRsaPrivateKey for RsaPrivateKey
Available on crate feature encoding only.
impl DecodeRsaPrivateKey for RsaPrivateKey
Available on crate feature
encoding 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, Error>
fn from_pkcs1_pem(s: &str) -> Result<Self, Error>
Available on crate feature
pem only.Deserialize PKCS#1-encoded private key from PEM. Read more
Source§impl<'de> Deserialize<'de> for RsaPrivateKey
Available on crate feature serde only.
impl<'de> Deserialize<'de> for RsaPrivateKey
Available on crate feature
serde only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl EncodePrivateKey for RsaPrivateKey
Available on crate feature encoding only.
impl EncodePrivateKey for RsaPrivateKey
Available on crate feature
encoding only.Source§fn to_pkcs8_der(&self) -> Result<SecretDocument>
fn to_pkcs8_der(&self) -> Result<SecretDocument>
Serialize a
SecretDocument containing a PKCS#8-encoded private key. Read moreSource§fn to_pkcs8_pem(
&self,
line_ending: LineEnding,
) -> Result<Zeroizing<String>, Error>
fn to_pkcs8_pem( &self, line_ending: LineEnding, ) -> Result<Zeroizing<String>, Error>
Available on crate feature
pem only.Serialize this private key as PEM-encoded PKCS#8 with the given
LineEnding. Read moreSource§fn write_pkcs8_der_file(&self, path: impl AsRef<Path>) -> Result<(), Error>
fn write_pkcs8_der_file(&self, path: impl AsRef<Path>) -> Result<(), Error>
Available on crate feature
std only.Write ASN.1 DER-encoded PKCS#8 private key to the given path. Read more
Source§fn write_pkcs8_pem_file(
&self,
path: impl AsRef<Path>,
line_ending: LineEnding,
) -> Result<(), Error>
fn write_pkcs8_pem_file( &self, path: impl AsRef<Path>, line_ending: LineEnding, ) -> Result<(), Error>
Available on crate features
pem and std only.Write ASN.1 PEM-encoded PKCS#8 private key to the given path. Read more
Source§impl EncodeRsaPrivateKey for RsaPrivateKey
Available on crate feature encoding only.
impl EncodeRsaPrivateKey for RsaPrivateKey
Available on crate feature
encoding only.Source§fn to_pkcs1_der(&self) -> Result<SecretDocument>
fn to_pkcs1_der(&self) -> Result<SecretDocument>
Serialize a
SecretDocument containing a PKCS#1-encoded private key.Source§fn to_pkcs1_pem(
&self,
line_ending: LineEnding,
) -> Result<Zeroizing<String>, Error>
fn to_pkcs1_pem( &self, line_ending: LineEnding, ) -> Result<Zeroizing<String>, Error>
Available on crate feature
pem only.Serialize this private key as PEM-encoded PKCS#1 with the given
LineEnding.Source§fn write_pkcs1_der_file(&self, path: impl AsRef<Path>) -> Result<(), Error>
fn write_pkcs1_der_file(&self, path: impl AsRef<Path>) -> Result<(), Error>
Available on crate feature
std only.Write ASN.1 DER-encoded PKCS#1 private key to the given path.
Source§fn write_pkcs1_pem_file(
&self,
path: impl AsRef<Path>,
line_ending: LineEnding,
) -> Result<(), Error>
fn write_pkcs1_pem_file( &self, path: impl AsRef<Path>, line_ending: LineEnding, ) -> Result<(), Error>
Available on crate features
pem and std only.Write ASN.1 PEM-encoded PKCS#1 private key to the given path.
impl Eq for RsaPrivateKey
Source§impl<D> From<BlindedSigningKey<D>> for RsaPrivateKeywhere
D: Digest,
impl<D> From<BlindedSigningKey<D>> for RsaPrivateKeywhere
D: Digest,
Source§fn from(key: BlindedSigningKey<D>) -> Self
fn from(key: BlindedSigningKey<D>) -> Self
Converts to this type from the input type.
Source§impl<D> From<GenericSigningKey<D, BoxedUint, BoxedMontyParams>> for RsaPrivateKeywhere
D: Digest,
impl<D> From<GenericSigningKey<D, BoxedUint, BoxedMontyParams>> for RsaPrivateKeywhere
D: Digest,
Source§fn from(key: SigningKey<D>) -> Self
fn from(key: SigningKey<D>) -> Self
Converts to this type from the input type.
Source§impl<D> From<GenericSigningKey<D, BoxedUint, BoxedMontyParams>> for RsaPrivateKeywhere
D: Digest,
impl<D> From<GenericSigningKey<D, BoxedUint, BoxedMontyParams>> for RsaPrivateKeywhere
D: Digest,
Source§fn from(key: SigningKey<D>) -> Self
fn from(key: SigningKey<D>) -> Self
Converts to this type from the input type.
Source§impl Hash for RsaPrivateKey
impl Hash for RsaPrivateKey
Source§impl PartialEq for RsaPrivateKey
impl PartialEq for RsaPrivateKey
Source§impl Serialize for RsaPrivateKey
Available on crate feature serde only.
impl Serialize for RsaPrivateKey
Available on crate feature
serde only.Source§impl TryFrom<PrivateKeyInfo<AnyRef<'_>, &OctetStringRef, BitStringRef<'_>>> for RsaPrivateKey
Available on crate feature encoding only.
impl TryFrom<PrivateKeyInfo<AnyRef<'_>, &OctetStringRef, BitStringRef<'_>>> for RsaPrivateKey
Available on crate feature
encoding only.Source§impl TryFrom<RsaPrivateKey<'_>> for RsaPrivateKey
Available on crate feature encoding only.
impl TryFrom<RsaPrivateKey<'_>> for RsaPrivateKey
Available on crate feature
encoding only.Source§fn try_from(pkcs1_key: RsaPrivateKey<'_>) -> Result<RsaPrivateKey>
fn try_from(pkcs1_key: RsaPrivateKey<'_>) -> Result<RsaPrivateKey>
Performs the conversion.