pub struct Dilithium<P: DilithiumSchemeParams + 'static> { /* private fields */ }Expand description
ML-DSA signature scheme parameterized by a final FIPS 204 parameter set.
Implementations§
Source§impl<P> Dilithium<P>
impl<P> Dilithium<P>
Sourcepub fn sign_with_rng<R: CryptoRng + RngCore>(
message: &[u8],
secret_key: &DilithiumSecretKey,
rng: &mut R,
) -> ApiResult<DilithiumSignatureData>
pub fn sign_with_rng<R: CryptoRng + RngCore>( message: &[u8], secret_key: &DilithiumSecretKey, rng: &mut R, ) -> ApiResult<DilithiumSignatureData>
Generate a randomized FIPS 204 signature with an explicit caller RNG.
The dcrypt_api::Signature::sign implementation delegates to this
method with the operating system RNG.
Trait Implementations§
Source§impl<P> Signature for Dilithium<P>
impl<P> Signature for Dilithium<P>
Source§type PublicKey = DilithiumPublicKey
type PublicKey = DilithiumPublicKey
Public key type for this algorithm
Source§type SecretKey = DilithiumSecretKey
type SecretKey = DilithiumSecretKey
Secret key type - must be zeroizable but not byte-accessible Read more
Source§type SignatureData = DilithiumSignatureData
type SignatureData = DilithiumSignatureData
Signature data type
Source§type KeyPair = (<Dilithium<P> as Signature>::PublicKey, <Dilithium<P> as Signature>::SecretKey)
type KeyPair = (<Dilithium<P> as Signature>::PublicKey, <Dilithium<P> as Signature>::SecretKey)
Key pair type (typically a tuple of public and secret keys)
Source§fn keypair<R: CryptoRng + RngCore>(rng: &mut R) -> ApiResult<Self::KeyPair>
fn keypair<R: CryptoRng + RngCore>(rng: &mut R) -> ApiResult<Self::KeyPair>
Generate a new key pair using the provided RNG Read more
Source§fn public_key(keypair: &Self::KeyPair) -> Self::PublicKey
fn public_key(keypair: &Self::KeyPair) -> Self::PublicKey
Extract the public key from a key pair
Source§fn secret_key(keypair: &Self::KeyPair) -> Self::SecretKey
fn secret_key(keypair: &Self::KeyPair) -> Self::SecretKey
Extract the secret key from a key pair
Auto Trait Implementations§
impl<P> Freeze for Dilithium<P>
impl<P> RefUnwindSafe for Dilithium<P>where
P: RefUnwindSafe,
impl<P> Send for Dilithium<P>
impl<P> Sync for Dilithium<P>
impl<P> Unpin for Dilithium<P>where
P: Unpin,
impl<P> UnsafeUnpin for Dilithium<P>
impl<P> UnwindSafe for Dilithium<P>where
P: 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