pub struct PqKeyPair {
pub public: PqPublicKey,
/* private fields */
}Expand description
An ML-DSA-65 key pair.
The 32-byte seed (PqSecretKey) is zeroized on drop. Signing is
deterministic: the same seed + message always produces the same signature.
Fields§
§public: PqPublicKeyImplementations§
Source§impl PqKeyPair
impl PqKeyPair
Sourcepub fn sign(&self, message: &[u8]) -> Result<Signature>
pub fn sign(&self, message: &[u8]) -> Result<Signature>
Sign a message (ML-DSA-65, deterministic).
§Errors
Returns ExoError::CryptoError if the stored seed bytes are malformed.
Sourcepub fn verify(&self, message: &[u8], signature: &Signature) -> bool
pub fn verify(&self, message: &[u8], signature: &Signature) -> bool
Verify a PostQuantum signature against this key pair’s public key.
Sourcepub fn public_key(&self) -> &PqPublicKey
pub fn public_key(&self) -> &PqPublicKey
Return a reference to the PQ public key.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PqKeyPair
impl RefUnwindSafe for PqKeyPair
impl Send for PqKeyPair
impl Sync for PqKeyPair
impl Unpin for PqKeyPair
impl UnsafeUnpin for PqKeyPair
impl UnwindSafe for PqKeyPair
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