Struct mls_rs::CipherSuite
source · 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.
Methods from Deref<Target = u16>§
pub const MIN: u16 = 0u16
pub const MAX: u16 = 65_535u16
pub const BITS: u32 = 16u32
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§fn eq(&self, other: &CipherSuite) -> bool
fn eq(&self, other: &CipherSuite) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for CipherSuite
impl PartialOrd 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
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl 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