pub struct HybridSignature { /* private fields */ }Expand description
A hybrid signature: Ed25519 and ML-DSA-87, both always present.
Wire layout (QSS2, fixed 4697 bytes):
magic[4] | version u8 | suite u8 | ed25519_sig[64] | mldsa_sig[4627]Verification requires both components to be valid; there is no way to strip the post-quantum signature and still verify.
Implementations§
Source§impl HybridSignature
impl HybridSignature
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Parse a v2 signature.
§Errors
Returns Error::InvalidSignature on malformed input,
Error::LegacyV1Artifact for 0.1.x JSON artifacts, and
version/suite errors for unknown formats.
Trait Implementations§
Source§impl Clone for HybridSignature
impl Clone for HybridSignature
Source§fn clone(&self) -> HybridSignature
fn clone(&self) -> HybridSignature
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 HybridSignature
impl Debug for HybridSignature
Source§impl<'de> Deserialize<'de> for HybridSignature
Available on crate feature serde only.
impl<'de> Deserialize<'de> for HybridSignature
Available on crate feature
serde only.Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for HybridSignature
Source§impl PartialEq for HybridSignature
impl PartialEq for HybridSignature
Source§impl Serialize for HybridSignature
Available on crate feature serde only.
impl Serialize for HybridSignature
Available on crate feature
serde only.impl StructuralPartialEq for HybridSignature
Auto Trait Implementations§
impl Freeze for HybridSignature
impl RefUnwindSafe for HybridSignature
impl Send for HybridSignature
impl Sync for HybridSignature
impl Unpin for HybridSignature
impl UnsafeUnpin for HybridSignature
impl UnwindSafe for HybridSignature
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