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
sourceimpl 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
sourceimpl Clone for Ciphersuite
impl Clone for Ciphersuite
sourcefn clone(&self) -> Ciphersuite
fn clone(&self) -> Ciphersuite
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Ciphersuite
impl Debug for Ciphersuite
sourceimpl Deserialize for Ciphersuite
impl Deserialize for Ciphersuite
sourcefn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>
fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>
This function deserializes the bytes
from the provided a std::io::Read
and returns the populated struct. Read more
sourceimpl<'de> Deserialize<'de> for Ciphersuite
impl<'de> Deserialize<'de> for Ciphersuite
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Display for Ciphersuite
impl Display for Ciphersuite
sourceimpl From<&'_ Ciphersuite> for u16
impl From<&'_ Ciphersuite> for u16
sourcefn from(s: &Ciphersuite) -> u16
fn from(s: &Ciphersuite) -> u16
Performs the conversion.
sourceimpl From<Ciphersuite> for SignatureScheme
impl From<Ciphersuite> for SignatureScheme
sourcefn from(ciphersuite_name: Ciphersuite) -> Self
fn from(ciphersuite_name: Ciphersuite) -> Self
Performs the conversion.
sourceimpl From<Ciphersuite> for AeadType
impl From<Ciphersuite> for AeadType
sourcefn from(ciphersuite_name: Ciphersuite) -> Self
fn from(ciphersuite_name: Ciphersuite) -> Self
Performs the conversion.
sourceimpl From<Ciphersuite> for HpkeKemType
impl From<Ciphersuite> for HpkeKemType
sourcefn from(ciphersuite_name: Ciphersuite) -> Self
fn from(ciphersuite_name: Ciphersuite) -> Self
Performs the conversion.
sourceimpl From<Ciphersuite> for HpkeAeadType
impl From<Ciphersuite> for HpkeAeadType
sourcefn from(ciphersuite_name: Ciphersuite) -> Self
fn from(ciphersuite_name: Ciphersuite) -> Self
Performs the conversion.
sourceimpl From<Ciphersuite> for HpkeKdfType
impl From<Ciphersuite> for HpkeKdfType
sourcefn from(ciphersuite_name: Ciphersuite) -> Self
fn from(ciphersuite_name: Ciphersuite) -> Self
Performs the conversion.
sourceimpl From<Ciphersuite> for HashType
impl From<Ciphersuite> for HashType
sourcefn from(ciphersuite_name: Ciphersuite) -> Self
fn from(ciphersuite_name: Ciphersuite) -> Self
Performs the conversion.
sourceimpl Hash for Ciphersuite
impl Hash for Ciphersuite
sourceimpl PartialEq<Ciphersuite> for Ciphersuite
impl PartialEq<Ciphersuite> for Ciphersuite
sourceimpl Serialize for Ciphersuite
impl Serialize for Ciphersuite
sourceimpl Serialize for Ciphersuite
impl Serialize for Ciphersuite
sourceimpl Serialize for &Ciphersuite
impl Serialize for &Ciphersuite
sourceimpl Size for Ciphersuite
impl Size for Ciphersuite
fn tls_serialized_len(&self) -> usize
sourceimpl Size for &Ciphersuite
impl Size for &Ciphersuite
fn tls_serialized_len(&self) -> usize
sourceimpl TryFrom<u16> for Ciphersuite
impl TryFrom<u16> for Ciphersuite
impl Copy for Ciphersuite
impl Eq for Ciphersuite
impl StructuralEq for Ciphersuite
impl StructuralPartialEq for Ciphersuite
Auto Trait Implementations
impl RefUnwindSafe for Ciphersuite
impl Send for Ciphersuite
impl Sync for Ciphersuite
impl Unpin for Ciphersuite
impl UnwindSafe for Ciphersuite
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more