pub struct MlDsaSigner { /* private fields */ }Available on crate features
signatures and ml-dsa only.Expand description
ML-DSA-65 signer.
Uses the FIPS-204 ML-DSA-65 parameter set for post-quantum digital signatures.
§Key Format
Keys are represented as 32-byte seeds. A seed deterministically derives both the signing and verifying keys via ML-DSA.KeyGen_internal (FIPS 204).
Implementations§
Source§impl MlDsaSigner
impl MlDsaSigner
Sourcepub fn from_bytes(seed_bytes: &[u8], signer_info: SignerInfo) -> Result<Self>
pub fn from_bytes(seed_bytes: &[u8], signer_info: SignerInfo) -> Result<Self>
Sourcepub fn generate(signer_info: SignerInfo) -> Result<(Self, Vec<u8>)>
pub fn generate(signer_info: SignerInfo) -> Result<(Self, Vec<u8>)>
Generate a new random ML-DSA-65 key pair.
Returns the signer and the encoded public (verifying) key bytes.
§Errors
Returns an error if key generation fails.
Sourcepub fn public_key_bytes(&self) -> Vec<u8> ⓘ
pub fn public_key_bytes(&self) -> Vec<u8> ⓘ
Get the public (verifying) key bytes.
Trait Implementations§
Source§impl Signer for MlDsaSigner
impl Signer for MlDsaSigner
Source§fn algorithm(&self) -> SignatureAlgorithm
fn algorithm(&self) -> SignatureAlgorithm
Get the signature algorithm used by this signer.
Source§fn signer_info(&self) -> SignerInfo
fn signer_info(&self) -> SignerInfo
Get information about the signer.
Auto Trait Implementations§
impl Freeze for MlDsaSigner
impl RefUnwindSafe for MlDsaSigner
impl Send for MlDsaSigner
impl Sync for MlDsaSigner
impl Unpin for MlDsaSigner
impl UnsafeUnpin for MlDsaSigner
impl UnwindSafe for MlDsaSigner
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