pub struct KeyPair<P: MlDsaParams> { /* private fields */ }
Expand description
An ML-DSA key pair
Implementations§
Source§impl<P: MlDsaParams> KeyPair<P>
impl<P: MlDsaParams> KeyPair<P>
Sourcepub fn signing_key(&self) -> &SigningKey<P>
pub fn signing_key(&self) -> &SigningKey<P>
The signing key of the key pair
Sourcepub fn verifying_key(&self) -> &VerifyingKey<P>
pub fn verifying_key(&self) -> &VerifyingKey<P>
The verifying key of the key pair
Trait Implementations§
Source§impl<P: MlDsaParams> AsRef<VerifyingKey<P>> for KeyPair<P>
impl<P: MlDsaParams> AsRef<VerifyingKey<P>> for KeyPair<P>
Source§fn as_ref(&self) -> &VerifyingKey<P>
fn as_ref(&self) -> &VerifyingKey<P>
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<P: MlDsaParams> Debug for KeyPair<P>
impl<P: MlDsaParams> Debug for KeyPair<P>
Source§impl<P> EncodePrivateKey for KeyPair<P>
Available on crate features alloc
and pkcs8
only.
impl<P> EncodePrivateKey for KeyPair<P>
Available on crate features
alloc
and pkcs8
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.Source§impl<P: MlDsaParams> KeypairRef for KeyPair<P>
impl<P: MlDsaParams> KeypairRef for KeyPair<P>
Source§type VerifyingKey = VerifyingKey<P>
type VerifyingKey = VerifyingKey<P>
Verifying key type for this keypair.
Source§impl<P> SignatureAlgorithmIdentifier for KeyPair<P>
Available on crate feature pkcs8
only.
impl<P> SignatureAlgorithmIdentifier for KeyPair<P>
Available on crate feature
pkcs8
only.Source§const SIGNATURE_ALGORITHM_IDENTIFIER: AlgorithmIdentifier<Self::Params> = Signature<P>::ALGORITHM_IDENTIFIER
const SIGNATURE_ALGORITHM_IDENTIFIER: AlgorithmIdentifier<Self::Params> = Signature<P>::ALGORITHM_IDENTIFIER
AlgorithmIdentifier
for the corresponding singature system.Source§impl<P: MlDsaParams> Signer<Signature<P>> for KeyPair<P>
The Signer
implementation for KeyPair
uses the optional deterministic variant of ML-DSA, and
only supports signing with an empty context string.
impl<P: MlDsaParams> Signer<Signature<P>> for KeyPair<P>
The Signer
implementation for KeyPair
uses the optional deterministic variant of ML-DSA, and
only supports signing with an empty context string.
Source§impl<P> TryFrom<PrivateKeyInfo<'_>> for KeyPair<P>
Available on crate feature pkcs8
only.
impl<P> TryFrom<PrivateKeyInfo<'_>> for KeyPair<P>
Available on crate feature
pkcs8
only.Auto Trait Implementations§
impl<P> Freeze for KeyPair<P>where
<<P as ParameterSet>::L as ArraySize>::ArrayType<Polynomial<BaseField>>: Freeze,
<<P as ParameterSet>::K as ArraySize>::ArrayType<Polynomial<BaseField>>: Freeze,
<<P as ParameterSet>::L as ArraySize>::ArrayType<NttPolynomial<BaseField>>: Freeze,
<<P as ParameterSet>::K as ArraySize>::ArrayType<NttPolynomial<BaseField>>: Freeze,
<<P as ParameterSet>::K as ArraySize>::ArrayType<NttVector<BaseField, <P as ParameterSet>::L>>: Freeze,
impl<P> RefUnwindSafe for KeyPair<P>where
<<P as ParameterSet>::L as ArraySize>::ArrayType<Polynomial<BaseField>>: RefUnwindSafe,
<<P as ParameterSet>::K as ArraySize>::ArrayType<Polynomial<BaseField>>: RefUnwindSafe,
<<P as ParameterSet>::L as ArraySize>::ArrayType<NttPolynomial<BaseField>>: RefUnwindSafe,
<<P as ParameterSet>::K as ArraySize>::ArrayType<NttPolynomial<BaseField>>: RefUnwindSafe,
<<P as ParameterSet>::K as ArraySize>::ArrayType<NttVector<BaseField, <P as ParameterSet>::L>>: RefUnwindSafe,
impl<P> Send for KeyPair<P>
impl<P> Sync for KeyPair<P>
impl<P> Unpin for KeyPair<P>where
<<P as ParameterSet>::L as ArraySize>::ArrayType<Polynomial<BaseField>>: Unpin,
<<P as ParameterSet>::K as ArraySize>::ArrayType<Polynomial<BaseField>>: Unpin,
<<P as ParameterSet>::L as ArraySize>::ArrayType<NttPolynomial<BaseField>>: Unpin,
<<P as ParameterSet>::K as ArraySize>::ArrayType<NttPolynomial<BaseField>>: Unpin,
<<P as ParameterSet>::K as ArraySize>::ArrayType<NttVector<BaseField, <P as ParameterSet>::L>>: Unpin,
impl<P> UnwindSafe for KeyPair<P>where
<<P as ParameterSet>::L as ArraySize>::ArrayType<Polynomial<BaseField>>: UnwindSafe,
<<P as ParameterSet>::K as ArraySize>::ArrayType<Polynomial<BaseField>>: UnwindSafe,
<<P as ParameterSet>::L as ArraySize>::ArrayType<NttPolynomial<BaseField>>: UnwindSafe,
<<P as ParameterSet>::K as ArraySize>::ArrayType<NttPolynomial<BaseField>>: UnwindSafe,
<<P as ParameterSet>::K as ArraySize>::ArrayType<NttVector<BaseField, <P as ParameterSet>::L>>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> DecodePrivateKey for T
impl<T> DecodePrivateKey for T
Source§impl<T> DynSignatureAlgorithmIdentifier for Twhere
T: SignatureAlgorithmIdentifier,
impl<T> DynSignatureAlgorithmIdentifier for Twhere
T: SignatureAlgorithmIdentifier,
Source§fn signature_algorithm_identifier(
&self,
) -> Result<AlgorithmIdentifier<Any>, Error>
fn signature_algorithm_identifier( &self, ) -> Result<AlgorithmIdentifier<Any>, Error>
AlgorithmIdentifier
for the corresponding singature system.Source§impl<K> Keypair for Kwhere
K: KeypairRef,
impl<K> Keypair for Kwhere
K: KeypairRef,
Source§type VerifyingKey = <K as KeypairRef>::VerifyingKey
type VerifyingKey = <K as KeypairRef>::VerifyingKey
Verifying key type for this keypair.
Source§fn verifying_key(&self) -> <K as Keypair>::VerifyingKey
fn verifying_key(&self) -> <K as Keypair>::VerifyingKey
Get the verifying key which can verify signatures produced by the
signing key portion of this keypair.