Skip to main content

MlDsa87P384Keypair

Struct MlDsa87P384Keypair 

Source
pub struct MlDsa87P384Keypair { /* private fields */ }
Available on crate features mldsa and p384 only.
Expand description

ML-DSA-87 and ECDSA P-384 composite keypair.

Implementations§

Source§

impl MlDsa87P384Keypair

Source

pub fn random<R: CryptoRng + ?Sized>(rng: &mut R) -> Self

Generate a random composite keypair.

Source

pub fn algorithm(&self) -> Algorithm

Get the SSH algorithm for this keypair.

Source

pub fn private(&self) -> &MlDsa87P384PrivateKey

Borrow the composite private key.

Trait Implementations§

Source§

impl AsRef<MlDsa87P384PublicKey> for MlDsa87P384Keypair

Source§

fn as_ref(&self) -> &MlDsa87P384PublicKey

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for MlDsa87P384Keypair

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl CtEq for MlDsa87P384Keypair

Source§

fn ct_eq(&self, other: &Self) -> Choice

Determine if self is equal to other in constant-time.
Source§

fn ct_ne(&self, other: &Rhs) -> Choice

Determine if self is NOT equal to other in constant-time.
Source§

impl Debug for MlDsa87P384Keypair

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Decode for MlDsa87P384Keypair

Source§

type Error = Error

Type returned in the event of a decoding error.
Source§

fn decode(reader: &mut Decoder<impl Reader>) -> Result<Self>

Attempt to decode a value of this type using the provided Decoder. Read more
Source§

impl Encode for MlDsa87P384Keypair

Source§

fn encoded_len(&self) -> Result<usize>

Get the length of this type encoded in bytes, prior to Base64 encoding. Read more
Source§

fn encode(&self, writer: &mut impl Writer) -> Result<()>

Encode this value using the provided Writer. Read more
Source§

fn encoded_len_prefixed(&self) -> Result<usize, Error>

Return the length of this type after encoding when prepended with a uint32 length prefix. Read more
Source§

fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Error>

Encode this value, first prepending a uint32 length prefix set to Encode::encoded_len. Read more
Source§

fn encode_vec(&self) -> Result<Vec<u8>, Error>

Available on crate feature alloc only.
Encode this value, returning a Vec<u8> containing the encoded message. Read more
Source§

impl Eq for MlDsa87P384Keypair

Source§

impl From<&MlDsa87P384Keypair> for MlDsa87P384PublicKey

Source§

fn from(keypair: &MlDsa87P384Keypair) -> Self

Converts to this type from the input type.
Source§

impl From<MlDsa87P384Keypair> for KeypairData

Source§

fn from(keypair: MlDsa87P384Keypair) -> KeypairData

Converts to this type from the input type.
Source§

impl From<MlDsa87P384Keypair> for PrivateKey

Source§

fn from(keypair: MlDsa87P384Keypair) -> PrivateKey

Converts to this type from the input type.
Source§

impl From<MlDsa87P384Keypair> for MlDsa87P384PublicKey

Source§

fn from(keypair: MlDsa87P384Keypair) -> Self

Converts to this type from the input type.
Source§

impl From<MlDsa87P384PrivateKey> for MlDsa87P384Keypair

Source§

fn from(private: MlDsa87P384PrivateKey) -> Self

Converts to this type from the input type.
Source§

impl KeypairRef for MlDsa87P384Keypair

Source§

type VerifyingKey = MlDsa87P384PublicKey

Verifying key type for this keypair.
Source§

impl PartialEq for MlDsa87P384Keypair

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl RandomizedSigner<Signature> for MlDsa87P384Keypair

Source§

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§

fn sign_with_rng<R>(&self, rng: &mut R, msg: &[u8]) -> S
where R: CryptoRng + ?Sized,

Sign the given message and return a digital signature
Source§

impl Signer<Signature> for MlDsa87P384Keypair

Source§

fn try_sign(&self, 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§

fn sign(&self, msg: &[u8]) -> S

Sign the given message and return a digital signature.

Auto Trait Implementations§

§

impl Forget for MlDsa87P384Keypair

§

impl Freeze for MlDsa87P384Keypair

§

impl Move for MlDsa87P384Keypair

§

impl RefUnwindSafe for MlDsa87P384Keypair

§

impl Send for MlDsa87P384Keypair
where BoxRaw<Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, B0>, B0>, B0>, B1>, B0>, B0>, B0>, B0>, B0>>>: Send, Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B0>, B0>, B1>>: Send, Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>: Send, Uint<6>: Send,

§

impl Sync for MlDsa87P384Keypair
where BoxRaw<Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, B0>, B0>, B0>, B1>, B0>, B0>, B0>, B0>, B0>>>: Sync, Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B0>, B0>, B1>>: Sync, Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>: Sync, Uint<6>: Sync,

§

impl Unpin for MlDsa87P384Keypair
where Box<Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, B0>, B0>, B0>, B1>, B0>, B0>, B0>, B0>, B0>>>: Unpin, [u8; 97]: Unpin, [u8; 32]: Unpin, Uint<6>: Unpin,

§

impl UnsafeUnpin for MlDsa87P384Keypair

§

impl UnwindSafe for MlDsa87P384Keypair
where BoxRaw<Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, B0>, B0>, B0>, B1>, B0>, B0>, B0>, B0>, B0>>>: UnwindSafe, [u8; 97]: UnwindSafe, [u8; 32]: UnwindSafe, Uint<6>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<S, T> AsyncRandomizedSigner<S> for T
where T: RandomizedSigner<S>,

Source§

async fn try_sign_with_rng_async<R>( &self, rng: &mut R, msg: &[u8], ) -> Result<S, Error>
where R: TryCryptoRng + ?Sized,

Attempt to sign the given message, returning a digital signature on success, or an error if something went wrong. Read more
Source§

async fn sign_with_rng_async<R>(&self, rng: &mut R, msg: &[u8]) -> S
where R: CryptoRng + ?Sized,

Sign the given message and return a digital signature. Read more
Source§

impl<S, T> AsyncSigner<S> for T
where T: Signer<S>,

Source§

async fn sign_async(&self, msg: &[u8]) -> Result<S, Error>

Attempt to sign the given message, returning a digital signature on success, or an error if something went wrong. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<K> Keypair for K
where K: KeypairRef,

Source§

type VerifyingKey = <K as KeypairRef>::VerifyingKey

Verifying key type for this keypair.
Source§

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.
Source§

impl<S, T> RandomizedSignerMut<S> for T
where T: RandomizedSigner<S>,

Source§

fn try_sign_with_rng<R>(&mut self, rng: &mut R, msg: &[u8]) -> Result<S, Error>
where R: TryCryptoRng + ?Sized,

Attempt to sign the given message, updating the state, and returning a digital signature on success, or an error if something went wrong. Read more
Source§

fn sign_with_rng<R>(&mut self, rng: &mut R, msg: &[u8]) -> S
where R: CryptoRng + ?Sized,

Sign the given message, update the state, and return a digital signature. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.