Skip to main content

Module profile

Module profile 

Source
Expand description

Named profiles: algorithm sets a backend resolves into a TLS policy and the key algorithms it admits. A profile is an algorithm set, not a validation claim; whether the running module is validated for it is a separate check.

Structs§

AdmittedSelection
A profile’s non-TLS families under its options, every entry implemented by the module’s backend, in preference order. Never refused: an empty family means every constructor of that family refuses under the profile.
Options
Options applied on top of any profile. The default changes nothing; cnsa1_unclassified_nss widens cnsa1’s MACs, HKDFs, hashes and signatures, and the others narrow. Outside this crate, build it from Options::default() and set the fields you need.
ParseProfileError
A name that is not one of the crate’s profiles. Names are matched exactly: no trimming and no case folding.
ProfileSpec
A profile’s contents, each list in preference order.
Selection
A profile narrowed by its options, every entry implemented by the module’s backend, in the profile’s preference order.

Enums§

GoverningText
The text a profile follows.
Profile
A named profile. Each one that is named for a regime follows that regime’s published text, in the edition Profile::governing_text names, and changes only when a new edition is published.

Constants§

BSI
bsi: BSI TR-02102-2 (TLS) and TR-02102-1, version 2026-01.
CNSA1
cnsa1: the CNSA 1.0 algorithm set of CNSSP 15 (20 October 2016), Annex B (p. B-1), in the TLS 1.2 and 1.3 profile of RFC 9151 (April 2022). Transition dates: CNSSP 15 (December 2024) ¶18 (pp. 7-8).
CNSA2
cnsa2: the CNSA 2.0 algorithm set of CNSSP 15 (December 2024), Annex B, pp. B-1 to B-2, on TLS 1.3. No CNSA 2.0 TLS profile is published: CNSSP 15 ¶8a, footnote 1 (p. 5).
FIPS1402
fips1402: FIPS 140-2 Annex A and Annex D (2021-10-12 editions), FIPS 186-4, SP 800-131A r2 and SP 800-52r2. An algorithm set, not a validation claim.
FIPS1403
fips1403: NIST SP 800-140C r2 and SP 800-140D r2 with the CMVP lists (updated August 21, 2026), the FIPS 140-3 Implementation Guidance (August 19, 2026), SP 800-52r2 and SP 800-131A r2. An algorithm set, not a validation claim.
MAC_KEY_MAX_BITS
The longest HMAC key, in bits, the module was tested with: “Key Length: 112-524288” in the AWS-LC FIPS 3.1.0 security policies (Table 5, p. 9) and on CAVP certificate A7855.
PREFERRED
preferred: the crate’s recommendation. Not a government profile; see docs/profiles.md.
UNRESTRICTED
unrestricted: the crate’s own set, following no published text. Not a government profile.

Functions§

kdf_info_may_be_empty
Whether profile admits an empty HKDF info: unrestricted only, which makes no approval claim. The module does not mark an HKDF call with an empty info approved (AWS-LC HKDF_verify_service_indicator), so every other profile refuses one (decision 0010).
mac_key_floor_bits
The shortest HMAC key, in bits, profile admits. 112 is the module’s approved minimum: SP 800-131A r2 §10 Table 9 (p. 20) disallows shorter keys for MAC generation, and the AWS-LC FIPS 3.1.0 security policies list “Key Length: 112-524288” (Table 5, p. 9). bsi takes the 128 of TR-02102-1 Table 5.2 (p. 50). SP 800-107 r1 §5.3.2 (pp. 13-14): a key “shall have a security strength that meets or exceeds the security strength required to protect the data”.
select
The backend-independent half of a backend’s resolve: profile’s lists, narrowed by options; pq_key_exchange_required also removes TLS 1.2, its suites and the RSA PKCS#1 v1.5 handshake schemes. Records entries the module line lacks in Selection::excluded, then refuses a family left empty with CryptoError::EmptyProfile. Both use versions, suites, groups, schemes and keys order, preserving preference order. Approval is a separate check.
select_admitted
The backend-independent half of a backend’s admit: profile’s non-TLS families, under options, less what module lacks. Independent of select.