Enum openmls_traits::types::Ciphersuite
source · #[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
impl Ciphersuite
sourcepub const fn hash_algorithm(&self) -> HashType
pub const fn hash_algorithm(&self) -> HashType
Get the HashType
for this Ciphersuite
sourcepub const fn signature_algorithm(&self) -> SignatureScheme
pub const fn signature_algorithm(&self) -> SignatureScheme
Get the SignatureScheme
for this Ciphersuite
.
sourcepub const fn aead_algorithm(&self) -> AeadType
pub const fn aead_algorithm(&self) -> AeadType
Get the AeadType
for this Ciphersuite
.
sourcepub const fn hpke_kdf_algorithm(&self) -> HpkeKdfType
pub const fn hpke_kdf_algorithm(&self) -> HpkeKdfType
Get the HpkeKdfType
for this Ciphersuite
.
sourcepub const fn hpke_kem_algorithm(&self) -> HpkeKemType
pub const fn hpke_kem_algorithm(&self) -> HpkeKemType
Get the HpkeKemType
for this Ciphersuite
.
sourcepub const fn hpke_aead_algorithm(&self) -> HpkeAeadType
pub const fn hpke_aead_algorithm(&self) -> HpkeAeadType
Get the HpkeAeadType
for this Ciphersuite
.
sourcepub const fn hpke_config(&self) -> HpkeConfig
pub const fn hpke_config(&self) -> HpkeConfig
Get the HpkeConfig
for this Ciphersuite
.
sourcepub const fn hash_length(&self) -> usize
pub const fn hash_length(&self) -> usize
Get the length of the used hash algorithm.
sourcepub const fn mac_length(&self) -> usize
pub const fn mac_length(&self) -> usize
Get the length of the AEAD tag.
sourcepub const fn aead_key_length(&self) -> usize
pub const fn aead_key_length(&self) -> usize
Returns the key size of the used AEAD.
sourcepub const fn aead_nonce_length(&self) -> usize
pub const fn aead_nonce_length(&self) -> usize
Returns the length of the nonce of the AEAD.
Trait Implementations§
source§impl Clone for Ciphersuite
impl Clone for Ciphersuite
source§fn clone(&self) -> Ciphersuite
fn clone(&self) -> Ciphersuite
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Ciphersuite
impl Debug for Ciphersuite
source§impl<'de> Deserialize<'de> for Ciphersuite
impl<'de> Deserialize<'de> for Ciphersuite
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl Deserialize for Ciphersuite
impl Deserialize for Ciphersuite
source§fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>
fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>
bytes
from the provided a std::io::Read
and returns the populated struct. Read moresource§impl Display for Ciphersuite
impl Display for Ciphersuite
source§impl From<&Ciphersuite> for u16
impl From<&Ciphersuite> for u16
source§fn from(s: &Ciphersuite) -> u16
fn from(s: &Ciphersuite) -> u16
source§impl From<Ciphersuite> for AeadType
impl From<Ciphersuite> for AeadType
source§fn from(ciphersuite_name: Ciphersuite) -> Self
fn from(ciphersuite_name: Ciphersuite) -> Self
source§impl From<Ciphersuite> for HashType
impl From<Ciphersuite> for HashType
source§fn from(ciphersuite_name: Ciphersuite) -> Self
fn from(ciphersuite_name: Ciphersuite) -> Self
source§impl From<Ciphersuite> for HpkeAeadType
impl From<Ciphersuite> for HpkeAeadType
source§fn from(ciphersuite_name: Ciphersuite) -> Self
fn from(ciphersuite_name: Ciphersuite) -> Self
source§impl From<Ciphersuite> for HpkeKdfType
impl From<Ciphersuite> for HpkeKdfType
source§fn from(ciphersuite_name: Ciphersuite) -> Self
fn from(ciphersuite_name: Ciphersuite) -> Self
source§impl From<Ciphersuite> for HpkeKemType
impl From<Ciphersuite> for HpkeKemType
source§fn from(ciphersuite_name: Ciphersuite) -> Self
fn from(ciphersuite_name: Ciphersuite) -> Self
source§impl From<Ciphersuite> for SignatureScheme
impl From<Ciphersuite> for SignatureScheme
source§fn from(ciphersuite_name: Ciphersuite) -> Self
fn from(ciphersuite_name: Ciphersuite) -> Self
source§impl From<Ciphersuite> for VerifiableCiphersuite
impl From<Ciphersuite> for VerifiableCiphersuite
source§fn from(value: Ciphersuite) -> Self
fn from(value: Ciphersuite) -> Self
source§impl From<Ciphersuite> for u16
impl From<Ciphersuite> for u16
source§fn from(s: Ciphersuite) -> u16
fn from(s: Ciphersuite) -> u16
source§impl Hash for Ciphersuite
impl Hash for Ciphersuite
source§impl Ord for Ciphersuite
impl Ord for Ciphersuite
source§fn cmp(&self, other: &Ciphersuite) -> Ordering
fn cmp(&self, other: &Ciphersuite) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<Ciphersuite> for Ciphersuite
impl PartialEq<Ciphersuite> for Ciphersuite
source§fn eq(&self, other: &Ciphersuite) -> bool
fn eq(&self, other: &Ciphersuite) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<Ciphersuite> for Ciphersuite
impl PartialOrd<Ciphersuite> for Ciphersuite
source§fn partial_cmp(&self, other: &Ciphersuite) -> Option<Ordering>
fn partial_cmp(&self, other: &Ciphersuite) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more