#[non_exhaustive]pub enum CipherProfile {
Mozilla,
Fips1403Compliant,
Fips1402Compliant,
Fips1403Validated,
Cnsa1,
Cnsa2,
}Expand description
A named set of algorithms a Policy allows: cipher suites, key-exchange groups and
signature schemes, each profile exactly what its name claims.
A policy lists the profiles it allows (Policy::cipher_profiles); what it offers is their
union, in the order of the first listed, narrowed to its TLS versions, to what the crypto
provider has, and to Policy::cipher_suites and Policy::kx_groups when set. A TLS
version left with no suite is dropped; none left is PeerError::Policy. Profiles are
choices, not non-default settings: Policy::non_defaults does not report them.
Text form: mozilla, fips-140-3-compliant, fips-140-2-compliant, fips-140-3-validated,
cnsa-1.0, cnsa-2.0.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Mozilla
mozilla: Mozilla’s server-side TLS guideline 6.0, intermediate (which holds modern’s):
TLS 1.3 AES-128-GCM, AES-256-GCM and ChaCha20-Poly1305; TLS 1.2 ECDHE-ECDSA and
ECDHE-RSA with the same three, in Mozilla’s order; X25519MLKEM768 (aws-lc only),
X25519, P-256 and P-384; every signature scheme the provider verifies. The default.
Fips1403Compliant
fips-140-3-compliant: the FIPS 140-3 approved algorithms for TLS, per NIST SP 800-52
Rev. 2 and SP 800-131A Rev. 2: TLS 1.3 AES-128-GCM and AES-256-GCM; TLS 1.2 ECDHE-ECDSA
and ECDHE-RSA with AES-GCM; P-256 and P-384, and with aws-lc SecP256r1MLKEM768,
X25519MLKEM768, MLKEM768 and MLKEM1024; RSA-PSS and RSA PKCS#1 with SHA-256/384/512,
ECDSA P-256 with SHA-256 and P-384 with SHA-384. No ChaCha20, no X25519 alone, no
Ed25519, no ML-DSA. Algorithm selection only; not a FIPS 140-3 validated module;
makes no validation claim. It works on either provider.
Fips1402Compliant
fips-140-2-compliant: fips-140-3-compliant without the ML-KEM groups, which only a
FIPS 140-3 module can have approved. Algorithm selection only, no validation claim. On
ring the two lists are the same. Every FIPS 140-2 certificate moved to the CMVP
Historical List in September 2026 (usable for existing systems only); the TLS rules
themselves (SP 800-52r2, SP 800-131A) are the same for both.
Fips1403Validated
fips-140-3-validated: the fips-140-3-compliant list on rustls’s FIPS provider
(AWS-LC’s FIPS module, feature fips), whatever Policy::crypto says. Listed alone
or with others, the configuration uses that provider, keeps only what the module
reports approved (so other listed profiles lose ChaCha20 and X25519), and is refused
unless rustls reports it FIPS (ClientConfig::fips() / ServerConfig::fips(), which
also needs Policy::require_ems). Validated only as AWS-LC’s CMVP certificate and
its tested operating environments state. Without the feature it is
PeerError::Policy; CipherProfile::FIPS_VALIDATED_AVAILABLE says which.
Cnsa1
cnsa-1.0: NSA’s CNSA 1.0 (CNSSP 15, RFC 9151) as far as rustls goes, on either
provider: TLS 1.3 AES-256-GCM-SHA384; TLS 1.2 ECDHE-ECDSA and ECDHE-RSA
AES-256-GCM-SHA384; secp384r1; ECDSA P-384 with SHA-384, RSA-PSS with SHA-384 and RSA
PKCS#1 with SHA-384 (keys of 3072 bits or more). Not met: the static-RSA and DHE suites
and the ffdhe3072/4096 groups RFC 9151 also lists (absent from rustls, and SP 800-131A
disallows static RSA), and the 3072-bit floor for RSA-PSS keys (2048-bit keys pass).
Needs an identity of P-384 or RSA 3072+: generated identities are P-256.
Cnsa2
cnsa-2.0: NSA’s CNSA 2.0 (ML-KEM-1024, ML-DSA-87, AES-256, SHA-384) in the TLS shape of
draft-becker-cnsa2-tls-profile-05: TLS 1.3 only, AES-256-GCM-SHA384, MLKEM1024 only,
ML-DSA-87 only. Met in full with Crypto::AwsLc; with ring, which has no ML-KEM
or ML-DSA, it is PeerError::Policy. The ML-KEM-768 hybrids are category 3, not CNSA
2.0, and are left out; SecP384r1MLKEM1024 is not in rustls and the draft does not use it.
Certificates must be signed with ML-DSA-87 along the chain, so the consumer brings its
own identity and CA. The TLS profile is an individual draft and this list follows it.
Implementations§
Source§impl CipherProfile
impl CipherProfile
Sourcepub const ALL: &'static [CipherProfile]
pub const ALL: &'static [CipherProfile]
Every profile, in the order of the text form’s documentation.
Sourcepub const FIPS_VALIDATED_AVAILABLE: bool = false
pub const FIPS_VALIDATED_AVAILABLE: bool = false
Whether this build has the FIPS module fips-140-3-validated needs (feature fips).