pub type SigningKey<D> = GenericSigningKey<D, BoxedUint, BoxedMontyParams>;Available on crate feature
alloc only.Expand description
Signing key for producing RSASSA-PSS signatures as described in RFC8017 § 8.1.
Aliased Type§
pub struct SigningKey<D> { /* private fields */ }Trait Implementations§
Source§impl<D> AssociatedAlgorithmIdentifier for SigningKey<D>where
D: Digest,
Available on crate feature encoding only.
impl<D> AssociatedAlgorithmIdentifier for SigningKey<D>where
D: Digest,
Available on crate feature
encoding only.Source§const ALGORITHM_IDENTIFIER: AlgorithmIdentifierRef<'static> = pkcs1::ALGORITHM_ID
const ALGORITHM_IDENTIFIER: AlgorithmIdentifierRef<'static> = pkcs1::ALGORITHM_ID
AlgorithmIdentifier for this structure.Source§impl<'de, D> Deserialize<'de> for SigningKey<D>where
D: Digest + AssociatedOid,
Available on crate feature serde only.
impl<'de, D> Deserialize<'de> for SigningKey<D>where
D: Digest + AssociatedOid,
Available on crate feature
serde only.Source§fn deserialize<De>(deserializer: De) -> Result<Self, De::Error>where
De: Deserializer<'de>,
fn deserialize<De>(deserializer: De) -> Result<Self, De::Error>where
De: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<D> DynSignatureAlgorithmIdentifier for SigningKey<D>where
D: Digest + AssociatedOid,
Available on crate feature encoding only.
impl<D> DynSignatureAlgorithmIdentifier for SigningKey<D>where
D: Digest + AssociatedOid,
Available on crate feature
encoding only.Source§fn signature_algorithm_identifier(&self) -> Result<AlgorithmIdentifierOwned>
fn signature_algorithm_identifier(&self) -> Result<AlgorithmIdentifierOwned>
AlgorithmIdentifier for the corresponding signature system. Read moreSource§impl<D> EncodePrivateKey for SigningKey<D>where
D: Digest,
Available on crate feature encoding only.
impl<D> EncodePrivateKey for SigningKey<D>where
D: Digest,
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<D> From<GenericRsaPrivateKey<BoxedUint, BoxedMontyParams>> for SigningKey<D>where
D: Digest,
impl<D> From<GenericRsaPrivateKey<BoxedUint, BoxedMontyParams>> for SigningKey<D>where
D: Digest,
Source§fn from(key: RsaPrivateKey) -> Self
fn from(key: RsaPrivateKey) -> Self
Converts to this type from the input type.
Source§impl<D> Keypair for SigningKey<D>where
D: Digest,
impl<D> Keypair for SigningKey<D>where
D: Digest,
Source§type VerifyingKey = GenericVerifyingKey<D, BoxedUint, BoxedMontyParams>
type VerifyingKey = GenericVerifyingKey<D, BoxedUint, BoxedMontyParams>
Verifying key type for this keypair.
Source§fn verifying_key(&self) -> Self::VerifyingKey
fn verifying_key(&self) -> Self::VerifyingKey
Get the verifying key which can verify signatures produced by the
signing key portion of this keypair.
Source§impl<D> PartialEq for SigningKey<D>where
D: Digest,
impl<D> PartialEq for SigningKey<D>where
D: Digest,
Source§impl<D> RandomizedDigestSigner<D, GenericSignature<BoxedUint>> for SigningKey<D>
impl<D> RandomizedDigestSigner<D, GenericSignature<BoxedUint>> for SigningKey<D>
Source§impl<D> RandomizedMultipartSigner<GenericSignature<BoxedUint>> for SigningKey<D>
impl<D> RandomizedMultipartSigner<GenericSignature<BoxedUint>> for SigningKey<D>
Source§fn try_multipart_sign_with_rng<R: TryCryptoRng + ?Sized>(
&self,
rng: &mut R,
msg: &[&[u8]],
) -> Result<Signature>
fn try_multipart_sign_with_rng<R: TryCryptoRng + ?Sized>( &self, rng: &mut R, msg: &[&[u8]], ) -> Result<Signature>
Equivalent of
RandomizedSigner::try_sign_with_rng() but the message is provided in
non-contiguous byte slices. Read moreSource§fn multipart_sign_with_rng<R>(&self, rng: &mut R, msg: &[&[u8]]) -> S
fn multipart_sign_with_rng<R>(&self, rng: &mut R, msg: &[&[u8]]) -> S
Equivalent of
RandomizedSigner::sign_with_rng() but the message is provided in
non-contiguous byte slices.Source§impl<D> RandomizedPrehashSigner<GenericSignature<BoxedUint>> for SigningKey<D>
impl<D> RandomizedPrehashSigner<GenericSignature<BoxedUint>> for SigningKey<D>
Source§fn sign_prehash_with_rng<R: TryCryptoRng + ?Sized>(
&self,
rng: &mut R,
prehash: &[u8],
) -> Result<Signature>
fn sign_prehash_with_rng<R: TryCryptoRng + ?Sized>( &self, rng: &mut R, prehash: &[u8], ) -> Result<Signature>
Attempt to sign the given message digest, returning a digital signature on success, or an
error if something went wrong. Read more
Source§impl<D> RandomizedSigner<GenericSignature<BoxedUint>> for SigningKey<D>
impl<D> RandomizedSigner<GenericSignature<BoxedUint>> for SigningKey<D>
Source§fn try_sign_with_rng<R: TryCryptoRng + ?Sized>(
&self,
rng: &mut R,
msg: &[u8],
) -> Result<Signature>
fn try_sign_with_rng<R: TryCryptoRng + ?Sized>( &self, rng: &mut R, msg: &[u8], ) -> Result<Signature>
Attempt to sign the given message, returning a digital signature on success, or an error if
something went wrong. Read more
Source§impl<D> Serialize for SigningKey<D>where
D: Digest,
Available on crate feature serde only.
impl<D> Serialize for SigningKey<D>where
D: Digest,
Available on crate feature
serde only.Source§impl<D> TryFrom<PrivateKeyInfo<AnyRef<'_>, &OctetStringRef, BitStringRef<'_>>> for SigningKey<D>where
D: Digest + AssociatedOid,
Available on crate feature encoding only.
impl<D> TryFrom<PrivateKeyInfo<AnyRef<'_>, &OctetStringRef, BitStringRef<'_>>> for SigningKey<D>where
D: Digest + AssociatedOid,
Available on crate feature
encoding only.