#[repr(u8)]pub enum CipherSuite {
Aes256Gcm = 1,
ChaCha20Poly1305 = 2,
}Expand description
Supported cipher suites.
The wire byte for each variant is stable across feature configurations —
Aes256Gcm = 1, ChaCha20Poly1305 = 2 — so a peer’s CipherSuite
offer round-trips through to_byte / from_byte regardless of which
build the peer is running. Under --features fips only Aes256Gcm
is actually selectable; ChaCha20Poly1305 is reserved for
wire-format stability and is rejected at negotiate_cipher /
CryptoSession::with_suite{_peer} with
CoreError::CipherSuiteUnavailable.
Variants§
Aes256Gcm = 1
AES-256-GCM — optimal on HW-accelerated platforms.
FIPS-approved; the only suite selectable under --features fips.
ChaCha20Poly1305 = 2
ChaCha20-Poly1305 — optimal on SW-only platforms (IoT, old ARM).
Reserved for wire-format stability under --features fips.
The variant remains in the enum so a peer’s offer can still be
parsed and a clear CipherSuiteUnavailable error returned;
construction via CryptoSession::with_suite{_peer} and selection
in negotiate_cipher are explicitly rejected under fips. Not
FIPS-approved (RFC 7539 / 8439 — outside FIPS 140-3 Annex A).
Implementations§
Trait Implementations§
Source§impl Clone for CipherSuite
impl Clone for CipherSuite
Source§fn clone(&self) -> CipherSuite
fn clone(&self) -> CipherSuite
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CipherSuite
Source§impl Debug for CipherSuite
impl Debug for CipherSuite
impl Eq for CipherSuite
Source§impl PartialEq for CipherSuite
impl PartialEq 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 ==.