pub struct CipherSuite(/* private fields */);
Expand description
Wrapper type representing a ciphersuite identifier
along with default values defined by the MLS RFC. Custom ciphersuites
can be defined using a custom CryptoProvider
.
§Default Ciphersuites
Note: KEM values are defined by the HPKE standard (RFC 9180).
ID | KEM | AEAD | Hash Function | Signature Scheme |
1 | DHKEMX25519 | AES 128 | SHA 256 | Ed25519 |
2 | DHKEMP256 | AES 128 | SHA 256 | P256 |
3 | DHKEMX25519 | ChaCha20Poly1305 | SHA 256 | Ed25519 |
4 | DHKEMX448 | AES 256 | SHA 512 | Ed448 |
5 | DHKEMP521 | AES 256 | SHA 512 | P521 |
6 | DHKEMX448 | ChaCha20Poly1305 | SHA 512 | Ed448 |
7 | DHKEMP384 | AES 256 | SHA 512 | P384 |
Implementations§
Source§impl CipherSuite
impl CipherSuite
Sourcepub const CURVE25519_AES128: CipherSuite
pub const CURVE25519_AES128: CipherSuite
MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519
Sourcepub const P256_AES128: CipherSuite
pub const P256_AES128: CipherSuite
MLS_128_DHKEMP256_AES128GCM_SHA256_P256
Sourcepub const CURVE25519_CHACHA: CipherSuite
pub const CURVE25519_CHACHA: CipherSuite
MLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519
Sourcepub const CURVE448_AES256: CipherSuite
pub const CURVE448_AES256: CipherSuite
MLS_256_DHKEMX448_AES256GCM_SHA512_Ed448
Sourcepub const P521_AES256: CipherSuite
pub const P521_AES256: CipherSuite
MLS_256_DHKEMP521_AES256GCM_SHA512_P521
Sourcepub const CURVE448_CHACHA: CipherSuite
pub const CURVE448_CHACHA: CipherSuite
MLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448
Sourcepub const P384_AES256: CipherSuite
pub const P384_AES256: CipherSuite
MLS_256_DHKEMP384_AES256GCM_SHA384_P384
Sourcepub const fn new(value: u16) -> CipherSuite
pub const fn new(value: u16) -> CipherSuite
Ciphersuite from a raw value.
Sourcepub fn all() -> impl Iterator<Item = CipherSuite>
pub fn all() -> impl Iterator<Item = CipherSuite>
An iterator over all of the default MLS ciphersuites.
Trait Implementations§
Source§impl Clone for CipherSuite
impl Clone for CipherSuite
Source§fn clone(&self) -> CipherSuite
fn clone(&self) -> CipherSuite
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CipherSuite
impl Debug for CipherSuite
Source§impl Deref for CipherSuite
impl Deref for CipherSuite
Source§impl From<CipherSuite> for u16
impl From<CipherSuite> for u16
Source§fn from(val: CipherSuite) -> u16
fn from(val: CipherSuite) -> u16
Converts to this type from the input type.
Source§impl From<u16> for CipherSuite
impl From<u16> for CipherSuite
Source§fn from(value: u16) -> CipherSuite
fn from(value: u16) -> CipherSuite
Converts to this type from the input type.
Source§impl MlsDecode for CipherSuite
impl MlsDecode for CipherSuite
fn mls_decode(reader: &mut &[u8]) -> Result<CipherSuite, Error>
Source§impl MlsEncode for CipherSuite
impl MlsEncode for CipherSuite
Source§impl MlsSize for CipherSuite
impl MlsSize for CipherSuite
fn mls_encoded_len(&self) -> usize
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,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CipherSuite
impl PartialEq for CipherSuite
Source§impl PartialOrd for CipherSuite
impl PartialOrd for CipherSuite
impl Copy for CipherSuite
impl Eq for CipherSuite
impl StructuralPartialEq for CipherSuite
Auto Trait Implementations§
impl Freeze for CipherSuite
impl RefUnwindSafe for CipherSuite
impl Send for CipherSuite
impl Sync for CipherSuite
impl Unpin for CipherSuite
impl UnwindSafe for CipherSuite
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more