pub struct DilithiumSecretKey(/* private fields */);Expand description
Dilithium Secret Key.
Stores the FIPS 204 compliant packed representation of (rho, K, tr, s1, s2, t0).
This implementation follows the standard FIPS 204 format exclusively.
Implementations§
Source§impl DilithiumSecretKey
impl DilithiumSecretKey
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, SignError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, SignError>
Create from FIPS 204 format bytes
The secret key must be in the standard FIPS 204 format which includes the tr component and appropriate padding.
Sourcepub fn to_bytes(&self) -> &[u8] ⓘ
pub fn to_bytes(&self) -> &[u8] ⓘ
Get the serialized bytes of this secret key (FIPS 204 format)
Sourcepub fn public_key(&self) -> Result<DilithiumPublicKey, SignError>
pub fn public_key(&self) -> Result<DilithiumPublicKey, SignError>
Extract the public key from this secret key
Trait Implementations§
Source§impl AsRef<[u8]> for DilithiumSecretKey
impl AsRef<[u8]> for DilithiumSecretKey
Source§impl Clone for DilithiumSecretKey
impl Clone for DilithiumSecretKey
Source§fn clone(&self) -> DilithiumSecretKey
fn clone(&self) -> DilithiumSecretKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DilithiumSecretKey
impl Debug for DilithiumSecretKey
Source§impl Drop for DilithiumSecretKey
impl Drop for DilithiumSecretKey
Auto Trait Implementations§
impl Freeze for DilithiumSecretKey
impl RefUnwindSafe for DilithiumSecretKey
impl Send for DilithiumSecretKey
impl Sync for DilithiumSecretKey
impl Unpin for DilithiumSecretKey
impl UnwindSafe for DilithiumSecretKey
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ConstantTimeEquals for T
impl<T> ConstantTimeEquals for T
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)