Skip to main content

SignatureAlgorithm

Enum SignatureAlgorithm 

Source
#[repr(u16)]
pub enum SignatureAlgorithm { MlDsa44 = 769, MlDsa65 = 770, MlDsa87 = 771, SlhDsaShake128s = 1_025, SlhDsaShake128f = 1_026, SlhDsaShake192s = 1_027, SlhDsaShake192f = 1_028, SlhDsaShake256s = 1_029, SlhDsaShake256f = 1_030, MlDsa65Ed25519 = 1_281, }
Expand description

Supported Post-Quantum & Hybrid Digital Signature algorithms.

Variants§

§

MlDsa44 = 769

NIST FIPS 204 ML-DSA-44 (NIST Security Category 2).

§

MlDsa65 = 770

NIST FIPS 204 ML-DSA-65 (NIST Security Category 3).

§

MlDsa87 = 771

NIST FIPS 204 ML-DSA-87 (NIST Security Category 5).

§

SlhDsaShake128s = 1_025

NIST FIPS 205 SLH-DSA-SHAKE-128s (NIST Category 1, hash-only, small signature).

§

SlhDsaShake128f = 1_026

NIST FIPS 205 SLH-DSA-SHAKE-128f (NIST Category 1, hash-only, fast signing).

§

SlhDsaShake192s = 1_027

NIST FIPS 205 SLH-DSA-SHAKE-192s (NIST Category 3, hash-only, small signature).

§

SlhDsaShake192f = 1_028

NIST FIPS 205 SLH-DSA-SHAKE-192f (NIST Category 3, hash-only, fast signing).

§

SlhDsaShake256s = 1_029

NIST FIPS 205 SLH-DSA-SHAKE-256s (NIST Category 5, hash-only, small signature).

§

SlhDsaShake256f = 1_030

NIST FIPS 205 SLH-DSA-SHAKE-256f (NIST Category 5, hash-only, fast signing).

§

MlDsa65Ed25519 = 1_281

IETF LAMPS Composite ML-DSA (MLDSA65-Ed25519-SHA512, NIST Category 3 + Classical 128-bit).

Implementations§

Source§

impl SignatureAlgorithm

Source

pub const fn wire_id(self) -> u16

Stable 16-bit big-endian wire identifier used in agile signature keys and envelopes.

Source

pub const fn from_wire_id(id: u16) -> Result<Self>

Parses a 16-bit wire identifier.

Source

pub const fn name(self) -> &'static str

Canonical human-readable algorithm name (suitable for CBOM / inventory reporting).

Source

pub const fn nist_category(self) -> u8

NIST Post-Quantum Security Category (1, 2, 3, or 5).

Source

pub const fn is_hybrid(self) -> bool

Returns true if this algorithm combines classical and post-quantum security.

Source

pub const fn oid(self) -> Option<&'static str>

Returns the official RFC 9881 / RFC 9909 NIST CSOR OID string if standardized.

Trait Implementations§

Source§

impl Clone for SignatureAlgorithm

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SignatureAlgorithm

Source§

impl Debug for SignatureAlgorithm

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for SignatureAlgorithm

Source§

impl Hash for SignatureAlgorithm

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for SignatureAlgorithm

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SignatureAlgorithm

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.