Skip to main content

Algorithm

Enum Algorithm 

pub enum Algorithm {
Show 65 variants MlKem512, MlKem768, MlKem1024, CbKem348864, CbKem460896, CbKem6688128, CbKem6960119, CbKem8192128, Hqc128, Hqc192, Hqc256, MlDsa44, MlDsa65, MlDsa87, FnDsa, FnDsa512, FnDsa1024, SlhDsaSha256128fRobust, SlhDsaSha256192fRobust, SlhDsaSha256256fRobust, SlhDsaShake256128fRobust, SlhDsaShake256192fRobust, SlhDsaShake256256fRobust, Shake128, Shake256, CShake128, CShake256, Sha3_224, Sha3_256, Sha3_384, Sha3_512, Keccak224, Keccak256, Keccak384, Keccak512, Kt128, Kt256, TurboShake128, TurboShake256, Kmac128, Kmac256, TupleHash128, TupleHash256, ParallelHash128, ParallelHash256, Sha224, Sha256, Sha384, Sha512, Sha512_224, Sha512_256, Saturnin, Shake256Aead, DuplexSpongeAead, TweakAead, RomulusN, RomulusM, LatticeRingSignature, LatticeBlindIssuance, LatticeAnonymousToken, LatticeNullifierRegistry, LatticeWitnessNullifier, LatticeDualRingLb, MixOnionRouting, SessionResumptionBinding,
}
Expand description

Algorithm identifiers for cryptographic operations

Variants§

§

MlKem512

§

MlKem768

§

MlKem1024

§

CbKem348864

§

CbKem460896

§

CbKem6688128

§

CbKem6960119

§

CbKem8192128

§

Hqc128

§

Hqc192

§

Hqc256

§

MlDsa44

§

MlDsa65

§

MlDsa87

§

FnDsa

§

FnDsa512

§

FnDsa1024

§

SlhDsaSha256128fRobust

§

SlhDsaSha256192fRobust

§

SlhDsaSha256256fRobust

§

SlhDsaShake256128fRobust

§

SlhDsaShake256192fRobust

§

SlhDsaShake256256fRobust

§

Shake128

§

Shake256

§

CShake128

§

CShake256

§

Sha3_224

§

Sha3_256

§

Sha3_384

§

Sha3_512

§

Keccak224

§

Keccak256

§

Keccak384

§

Keccak512

§

Kt128

§

Kt256

§

TurboShake128

§

TurboShake256

§

Kmac128

§

Kmac256

§

TupleHash128

§

TupleHash256

§

ParallelHash128

§

ParallelHash256

§

Sha224

§

Sha256

§

Sha384

§

Sha512

§

Sha512_224

§

Sha512_256

§

Saturnin

§

Shake256Aead

§

DuplexSpongeAead

§

TweakAead

§

RomulusN

§

RomulusM

§

LatticeRingSignature

Privacy-protocol identifiers (not standalone KEM/sig/hash providers).

§

LatticeBlindIssuance

§

LatticeAnonymousToken

§

LatticeNullifierRegistry

§

LatticeWitnessNullifier

Witness-derived nullifier mode (SHAKE256 over opening witness wire; see lib-q-lattice-zkp).

§

LatticeDualRingLb

DualRing-LB (CCS 2021 Alg. 3 aggregated verify on Ajtai openings, lib-q-ring-sig).

§

MixOnionRouting

ML-KEM-768 layered encapsulation with Saturnin AEAD per hop (mix-layer transport).

§

SessionResumptionBinding

SHAKE256 session token and stateless retry-cookie derivation for resumption handshakes.

Implementations§

§

impl Algorithm

pub fn security_level(&self) -> u32

Get the security level for this algorithm

pub fn category(&self) -> AlgorithmCategory

Get the algorithm category

pub fn supports_category(&self, category: AlgorithmCategory) -> bool

Check if an algorithm supports a specific category

Trait Implementations§

§

impl Clone for Algorithm

§

fn clone(&self) -> Algorithm

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
§

impl Debug for Algorithm

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Algorithm

§

fn deserialize<__D>( __deserializer: __D, ) -> Result<Algorithm, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for Algorithm

§

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

Formats the value using the given formatter. Read more
§

impl From<Algorithm> for JsValue

§

fn from(value: Algorithm) -> JsValue

Converts to this type from the input type.
§

impl FromWasmAbi for Algorithm

§

type Abi = u32

The Wasm ABI type that this converts from when coming back out from the ABI boundary.
§

unsafe fn from_abi(js: u32) -> Algorithm

Recover a Self from Self::Abi. Read more
§

impl Hash for Algorithm

§

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

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
§

impl IntoWasmAbi for Algorithm

§

type Abi = u32

The Wasm ABI type that this converts into when crossing the ABI boundary.
§

fn into_abi(self) -> u32

Convert self into Self::Abi so that it can be sent across the wasm ABI boundary.
§

impl OptionFromWasmAbi for Algorithm

§

fn is_none(val: &<Algorithm as FromWasmAbi>::Abi) -> bool

Tests whether the argument is a “none” instance. If so it will be deserialized as None, and otherwise it will be passed to FromWasmAbi.
§

impl OptionIntoWasmAbi for Algorithm

§

fn none() -> <Algorithm as IntoWasmAbi>::Abi

Returns an ABI instance indicating “none”, which JS will interpret as the None branch of this option. Read more
§

impl Ord for Algorithm

§

fn cmp(&self, other: &Algorithm) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
§

impl PartialEq for Algorithm

§

fn eq(&self, other: &Algorithm) -> 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.
§

impl PartialOrd for Algorithm

§

fn partial_cmp(&self, other: &Algorithm) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
§

impl Serialize for Algorithm

§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl TryFromJsValue for Algorithm

§

fn try_from_js_value_ref(value: &JsValue) -> Option<Algorithm>

Performs the conversion.
Source§

fn try_from_js_value(value: JsValue) -> Result<Self, JsValue>

Performs the conversion.
§

impl VectorFromWasmAbi for Algorithm

§

impl VectorIntoWasmAbi for Algorithm

§

impl Copy for Algorithm

§

impl Eq for Algorithm

§

impl StructuralPartialEq for Algorithm

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> ReturnWasmAbi for T
where T: IntoWasmAbi,

Source§

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi
Source§

fn return_abi(self) -> <T as ReturnWasmAbi>::Abi

Same as IntoWasmAbi::into_abi, except that it may throw and never return in the case of Err.
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.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,