Skip to main content

AlgorithmId

Enum AlgorithmId 

Source
#[non_exhaustive]
pub enum AlgorithmId {
Show 77 variants Sha256, Sha384, Sha512, Sha512_256, Sha3_256, Sha3_384, Sha3_512, Blake2b256, Blake2b512, Blake2s256, Blake3, Aes128Gcm, Aes256Gcm, ChaCha20Poly1305, Aes128GcmSiv, Aes256GcmSiv, XChaCha20Poly1305, Aes128Ccm, Aes256Ccm, Aes128Ocb3, Aes256Ocb3, DeoxysII128, AesKeyWrap128, AesKeyWrap256, HmacSha256, HmacSha384, HmacSha512, HmacSha3_256, HmacSha3_512, Poly1305, CmacAes128, CmacAes256, Kmac128, Kmac256, Ed25519, Ed448, EcdsaP256, EcdsaP384, EcdsaP521, RsaPkcs1v15Sha256, RsaPkcs1v15Sha384, RsaPkcs1v15Sha512, RsaPssSha256, RsaPssSha384, RsaPssSha512, SchnorrBip340, X25519, X448, EcdhP256, EcdhP384, EcdhP521, HkdfSha256, HkdfSha384, HkdfSha512, Pbkdf2Sha256, Pbkdf2Sha512, Argon2id, Scrypt, Balloon, MlKem512, MlKem768, MlKem1024, MlDsa44, MlDsa65, MlDsa87, XWing768X25519, HybridKem1024P384, SlhDsaSha2_128s, SlhDsaSha2_128f, SlhDsaSha2_192s, SlhDsaSha2_192f, SlhDsaSha2_256s, SlhDsaSha2_256f, SlhDsaShake128s, SlhDsaShake128f, SlhDsaShake256s, SlhDsaShake256f,
}
Expand description

Canonical algorithm identifier covering all OxiCrypto algorithm families.

This enum is #[non_exhaustive] so that future algorithm additions do not constitute a breaking change for crates that match on it in external code. Inside this crate all matches are exhaustive (no wildcard fallback needed).

Each variant’s name() returns the canonical IANA/NIST string representation.

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.
§

Sha256

SHA-256 (FIPS 180-4)

§

Sha384

SHA-384 (FIPS 180-4)

§

Sha512

SHA-512 (FIPS 180-4)

§

Sha512_256

SHA-512/256 (FIPS 180-4 §6.7)

§

Sha3_256

SHA3-256 (FIPS 202)

§

Sha3_384

SHA3-384 (FIPS 202)

§

Sha3_512

SHA3-512 (FIPS 202)

§

Blake2b256

BLAKE2b-256

§

Blake2b512

BLAKE2b-512

§

Blake2s256

BLAKE2s-256

§

Blake3

BLAKE3

§

Aes128Gcm

AES-128-GCM (NIST SP 800-38D, RFC 5116)

§

Aes256Gcm

AES-256-GCM (NIST SP 800-38D, RFC 5116)

§

ChaCha20Poly1305

ChaCha20-Poly1305 (RFC 8439)

§

Aes128GcmSiv

AES-128-GCM-SIV (RFC 8452)

§

Aes256GcmSiv

AES-256-GCM-SIV (RFC 8452)

§

XChaCha20Poly1305

XChaCha20-Poly1305

§

Aes128Ccm

AES-128-CCM (NIST SP 800-38C)

§

Aes256Ccm

AES-256-CCM (NIST SP 800-38C)

§

Aes128Ocb3

AES-128-OCB3 (RFC 7253)

§

Aes256Ocb3

AES-256-OCB3 (RFC 7253)

§

DeoxysII128

Deoxys-II-128-128 (CAESAR final portfolio, nonce-misuse resistant)

§

AesKeyWrap128

AES-128-KW — AES Key Wrap with 128-bit key (RFC 3394)

§

AesKeyWrap256

AES-256-KW — AES Key Wrap with 256-bit key (RFC 3394)

§

HmacSha256

HMAC-SHA-256 (RFC 2104)

§

HmacSha384

HMAC-SHA-384 (RFC 2104)

§

HmacSha512

HMAC-SHA-512 (RFC 2104)

§

HmacSha3_256

HMAC-SHA3-256

§

HmacSha3_512

HMAC-SHA3-512

§

Poly1305

Poly1305 (RFC 8439)

§

CmacAes128

CMAC-AES-128 (NIST SP 800-38B)

§

CmacAes256

CMAC-AES-256 (NIST SP 800-38B)

§

Kmac128

KMAC128 (NIST SP 800-185)

§

Kmac256

KMAC256 (NIST SP 800-185)

§

Ed25519

Ed25519 (RFC 8032)

§

Ed448

Ed448 (RFC 8032)

§

EcdsaP256

ECDSA over P-256 (FIPS 186-4)

§

EcdsaP384

ECDSA over P-384 (FIPS 186-4)

§

EcdsaP521

ECDSA over P-521 (FIPS 186-4)

§

RsaPkcs1v15Sha256

RSA PKCS#1 v1.5 with SHA-256

§

RsaPkcs1v15Sha384

RSA PKCS#1 v1.5 with SHA-384

§

RsaPkcs1v15Sha512

RSA PKCS#1 v1.5 with SHA-512

§

RsaPssSha256

RSA-PSS with SHA-256 (RFC 8017)

§

RsaPssSha384

RSA-PSS with SHA-384 (RFC 8017)

§

RsaPssSha512

RSA-PSS with SHA-512 (RFC 8017)

§

SchnorrBip340

BIP-340 Schnorr over secp256k1

§

X25519

X25519 (RFC 7748)

§

X448

X448 (RFC 7748)

§

EcdhP256

ECDH over P-256

§

EcdhP384

ECDH over P-384

§

EcdhP521

ECDH over P-521

§

HkdfSha256

HKDF-SHA-256 (RFC 5869)

§

HkdfSha384

HKDF-SHA-384 (RFC 5869)

§

HkdfSha512

HKDF-SHA-512 (RFC 5869)

§

Pbkdf2Sha256

PBKDF2-SHA-256 (RFC 8018)

§

Pbkdf2Sha512

PBKDF2-SHA-512 (RFC 8018)

§

Argon2id

Argon2id (RFC 9106)

§

Scrypt

scrypt (RFC 7914)

§

Balloon

Balloon memory-hard hashing (SHA-256), Boneh-Corrigan-Gibbs-Schechter

§

MlKem512

ML-KEM-512 (FIPS 203)

§

MlKem768

ML-KEM-768 (FIPS 203)

§

MlKem1024

ML-KEM-1024 (FIPS 203)

§

MlDsa44

ML-DSA-44 (FIPS 204)

§

MlDsa65

ML-DSA-65 (FIPS 204)

§

MlDsa87

ML-DSA-87 (FIPS 204)

§

XWing768X25519

Hybrid KEM: ML-KEM-768 + X25519 (X-Wing draft)

§

HybridKem1024P384

Hybrid KEM: ML-KEM-1024 + P-384

§

SlhDsaSha2_128s

SLH-DSA-SHA2-128s (FIPS 205)

§

SlhDsaSha2_128f

SLH-DSA-SHA2-128f (FIPS 205)

§

SlhDsaSha2_192s

SLH-DSA-SHA2-192s (FIPS 205, security category 3)

§

SlhDsaSha2_192f

SLH-DSA-SHA2-192f (FIPS 205, security category 3)

§

SlhDsaSha2_256s

SLH-DSA-SHA2-256s (FIPS 205)

§

SlhDsaSha2_256f

SLH-DSA-SHA2-256f (FIPS 205)

§

SlhDsaShake128s

SLH-DSA-SHAKE-128s (FIPS 205)

§

SlhDsaShake128f

SLH-DSA-SHAKE-128f (FIPS 205)

§

SlhDsaShake256s

SLH-DSA-SHAKE-256s (FIPS 205, security category 5)

§

SlhDsaShake256f

SLH-DSA-SHAKE-256f (FIPS 205, security category 5)

Implementations§

Source§

impl AlgorithmId

Source

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

Return the canonical IANA/NIST name string for this algorithm.

Source

pub fn category(&self) -> AlgorithmCategory

Return the AlgorithmCategory for this algorithm.

Trait Implementations§

Source§

impl Clone for AlgorithmId

Source§

fn clone(&self) -> AlgorithmId

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 AlgorithmId

Source§

impl Debug for AlgorithmId

Source§

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

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

impl Display for AlgorithmId

Source§

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

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

impl Eq for AlgorithmId

Source§

impl Hash for AlgorithmId

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 AlgorithmId

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for AlgorithmId

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> MaybeDebug for T

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.