#[repr(u16)]
pub enum Ciphersuite { MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519, MLS_128_DHKEMP256_AES128GCM_SHA256_P256, MLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519, MLS_256_DHKEMX448_AES256GCM_SHA512_Ed448, MLS_256_DHKEMP521_AES256GCM_SHA512_P521, MLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448, MLS_256_DHKEMP384_AES256GCM_SHA384_P384, }
Expand description

MLS ciphersuites.

Variants§

§

MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519

DH KEM x25519 | AES-GCM 128 | SHA2-256 | Ed25519

§

MLS_128_DHKEMP256_AES128GCM_SHA256_P256

DH KEM P256 | AES-GCM 128 | SHA2-256 | EcDSA P256

§

MLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519

DH KEM x25519 | Chacha20Poly1305 | SHA2-256 | Ed25519

§

MLS_256_DHKEMX448_AES256GCM_SHA512_Ed448

DH KEM x448 | AES-GCM 256 | SHA2-512 | Ed448

§

MLS_256_DHKEMP521_AES256GCM_SHA512_P521

DH KEM P521 | AES-GCM 256 | SHA2-512 | EcDSA P521

§

MLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448

DH KEM x448 | Chacha20Poly1305 | SHA2-512 | Ed448

§

MLS_256_DHKEMP384_AES256GCM_SHA384_P384

DH KEM P384 | AES-GCM 256 | SHA2-384 | EcDSA P384

Implementations§

source§

impl Ciphersuite

source

pub const fn hash_algorithm(&self) -> HashType

Get the HashType for this Ciphersuite

source

pub const fn signature_algorithm(&self) -> SignatureScheme

Get the SignatureScheme for this Ciphersuite.

source

pub const fn aead_algorithm(&self) -> AeadType

Get the AeadType for this Ciphersuite.

source

pub const fn hpke_kdf_algorithm(&self) -> HpkeKdfType

Get the HpkeKdfType for this Ciphersuite.

source

pub const fn hpke_kem_algorithm(&self) -> HpkeKemType

Get the HpkeKemType for this Ciphersuite.

source

pub const fn hpke_aead_algorithm(&self) -> HpkeAeadType

Get the HpkeAeadType for this Ciphersuite.

source

pub const fn hpke_config(&self) -> HpkeConfig

Get the HpkeConfig for this Ciphersuite.

source

pub const fn hash_length(&self) -> usize

Get the length of the used hash algorithm.

source

pub const fn mac_length(&self) -> usize

Get the length of the AEAD tag.

source

pub const fn aead_key_length(&self) -> usize

Returns the key size of the used AEAD.

source

pub const fn aead_nonce_length(&self) -> usize

Returns the length of the nonce of the AEAD.

Trait Implementations§

source§

impl Clone for Ciphersuite

source§

fn clone(&self) -> Ciphersuite

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Ciphersuite

source§

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

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

impl<'de> Deserialize<'de> for Ciphersuite

source§

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

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

impl Deserialize for Ciphersuite

source§

fn tls_deserialize<R>(bytes: &mut R) -> Result<Ciphersuite, Error>where R: Read,

This function deserializes the bytes from the provided a std::io::Read and returns the populated struct. Read more
source§

fn tls_deserialize_exact(bytes: impl AsRef<[u8]>) -> Result<Self, Error>where Self: Sized,

This function deserializes the provided bytes and returns the populated struct. All bytes must be consumed. Read more
source§

fn tls_deserialize_bytes(bytes: impl AsRef<[u8]>) -> Result<Self, Error>where Self: Sized,

This function deserializes the provided bytes and returns the populated struct. Read more
source§

impl Display for Ciphersuite

source§

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

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

impl From<Ciphersuite> for AeadType

source§

fn from(ciphersuite_name: Ciphersuite) -> AeadType

Converts to this type from the input type.
source§

impl From<Ciphersuite> for HashType

source§

fn from(ciphersuite_name: Ciphersuite) -> HashType

Converts to this type from the input type.
source§

impl From<Ciphersuite> for HpkeAeadType

source§

fn from(ciphersuite_name: Ciphersuite) -> HpkeAeadType

Converts to this type from the input type.
source§

impl From<Ciphersuite> for HpkeKdfType

source§

fn from(ciphersuite_name: Ciphersuite) -> HpkeKdfType

Converts to this type from the input type.
source§

impl From<Ciphersuite> for HpkeKemType

source§

fn from(ciphersuite_name: Ciphersuite) -> HpkeKemType

Converts to this type from the input type.
source§

impl From<Ciphersuite> for SignatureScheme

source§

fn from(ciphersuite_name: Ciphersuite) -> SignatureScheme

Converts to this type from the input type.
source§

impl From<Ciphersuite> for VerifiableCiphersuite

source§

fn from(value: Ciphersuite) -> VerifiableCiphersuite

Converts to this type from the input type.
source§

impl Hash for Ciphersuite

source§

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

impl Ord for Ciphersuite

source§

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

This method returns an Ordering between self and other. Read more
1.21.0 · source§

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

Compares and returns the maximum of two values. Read more
1.21.0 · source§

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

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<Ciphersuite> for Ciphersuite

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<Ciphersuite> for Ciphersuite

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

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

impl Serialize for &Ciphersuite

source§

fn tls_serialize<W>(&self, writer: &mut W) -> Result<usize, Error>where W: Write,

Serialize self and write it to the writer. The function returns the number of bytes written to writer.
source§

fn tls_serialize_detached(&self) -> Result<Vec<u8, Global>, Error>

Serialize self and return it as a byte vector.
source§

impl Serialize for Ciphersuite

source§

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

impl Serialize for Ciphersuite

source§

fn tls_serialize<W>(&self, writer: &mut W) -> Result<usize, Error>where W: Write,

Serialize self and write it to the writer. The function returns the number of bytes written to writer.
source§

fn tls_serialize_detached(&self) -> Result<Vec<u8, Global>, Error>

Serialize self and return it as a byte vector.
source§

impl Size for &Ciphersuite

source§

impl Size for Ciphersuite

source§

impl TryFrom<u16> for Ciphersuite

§

type Error = Error

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

fn try_from(v: u16) -> Result<Ciphersuite, <Ciphersuite as TryFrom<u16>>::Error>

Performs the conversion.
source§

impl Copy for Ciphersuite

source§

impl Eq for Ciphersuite

source§

impl StructuralEq for Ciphersuite

source§

impl StructuralPartialEq for Ciphersuite

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for Twhere T: Clone,

§

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 Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

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

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

§

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 Twhere U: TryFrom<T>,

§

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<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,