#[non_exhaustive]pub enum Signature {
Show 13 variants
RSA {
s: MPI,
},
DSA {
r: MPI,
s: MPI,
},
ElGamal {
r: MPI,
s: MPI,
},
EdDSA {
r: MPI,
s: MPI,
},
ECDSA {
r: MPI,
s: MPI,
},
Ed25519 {
s: Box<[u8; 64]>,
},
Ed448 {
s: Box<[u8; 114]>,
},
MLDSA65_Ed25519 {
eddsa: Box<[u8; 64]>,
mldsa: Box<[u8; 3309]>,
},
MLDSA87_Ed448 {
eddsa: Box<[u8; 114]>,
mldsa: Box<[u8; 4627]>,
},
SLHDSA128s {
sig: Box<[u8; 7856]>,
},
SLHDSA128f {
sig: Box<[u8; 17088]>,
},
SLHDSA256s {
sig: Box<[u8; 29792]>,
},
Unknown {
mpis: Box<[MPI]>,
rest: Box<[u8]>,
},
}Expand description
A cryptographic signature.
Provides a typed and structured way of storing multiple MPIs in
Signature packets.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
RSA
RSA signature.
DSA
NIST’s DSA signature.
ElGamal
ElGamal signature.
EdDSA
DJB’s “Twisted” Edwards curve DSA signature.
ECDSA
NIST’s Elliptic curve DSA signature.
Ed25519
Ed25519 signature.
Ed448
Ed448 signature.
MLDSA65_Ed25519
Composite signature algorithm using ML-DSA-65 and Ed25519.
Fields
MLDSA87_Ed448
Composite signature algorithm using ML-DSA-87 and Ed448.
Fields
SLHDSA128s
SLH-DSA-SHAKE-128s signature.
SLHDSA128f
SLH-DSA-SHAKE-128f signature.
SLHDSA256s
SLH-DSA-SHAKE-256s signature.
Unknown
Unknown number of MPIs for an unknown algorithm.
Implementations§
Trait Implementations§
impl Eq for Signature
Source§impl MarshalInto for Signature
impl MarshalInto for Signature
Source§fn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
Computes the maximal length of the serialized representation. Read more
Source§fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
Serializes into the given buffer. Read more
Source§impl Ord for Signature
impl Ord for Signature
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Signature
impl PartialOrd for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl Freeze for Signature
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnsafeUnpin for Signature
impl UnwindSafe for Signature
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