Expand description
The crypto-profile backend on the AWS-LC FIPS 3.x module (aws-lc-rs 1.17, fips).
rustls is re-exported because its types are this crate’s API; aws-lc-rs is not.
Re-exports§
pub use rustls;
Modules§
- aead
- AEAD (RFC 5116) under a profile: AES-128-GCM, AES-256-GCM and ChaCha20-Poly1305, each with a 96-bit nonce the crate’s module call chooses and a 128-bit tag.
- algorithm
- The algorithms the crate names: signature keys, TLS signature schemes, key-exchange groups, cipher suites, hashes, TLS versions, MACs, KDFs, key agreements and AEADs.
- capability
- What each AWS-LC FIPS module can do and what the published evidence says about each algorithm: the module’s security policy, cited by table for every sourced cell, or, for a module with none published, one CAVP certificate, which is never an approval (decision 0004).
- csr
- Certificate signing requests for a TLS certificate key.
- digest
- Hashing under a profile: SHA-2 (FIPS 180-4) and SHA-3 (FIPS 202), full-length digests only.
- ecdh
- Elliptic-curve Diffie-Hellman key agreement under a profile: one-pass Diffie-Hellman (SP
800-56A Rev. 3 §6.2.2.2) in both roles, each agreement completing into
kdfin the same call, so the shared secret never leaves the crate. A NIST-curve public key is an uncompressed SEC 1 point (65, 97 or 133 bytes); an X25519 public key is 32 bytes (RFC 7748). - fips
- The FIPS checks: the module’s own mode, and a TLS configuration’s FIPS status.
- hmac
- HMAC (FIPS 198-1) under a profile.
- kdf
- Key derivation under a profile: HKDF (RFC 5869; SP 800-56C Rev. 2 §5) and the hash-based one-step KDF (SP 800-56C Rev. 2 §4.1, option 1).
- peer_
certificate - Immutable certificate rules, independent of handshake signature schemes.
- profile
- 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.
- random
- Random bytes from the FIPS module’s DRBG.
- sealbox
- A sealed box: an ephemeral P-384 ECDH to the recipient’s static key, HKDF-SHA384 keyed by a caller-chosen domain, and AES-256-GCM over the plaintext with the caller’s AAD. Wire format: version, ephemeral point, nonce, ciphertext, tag. Every operation refuses unless the profile admits ECDH on P-384, HKDF-SHA384 and AES-256-GCM.
- sealbox_
wire - The sealed box’s version-1 framing: version, ephemeral P-384 point, nonce, ciphertext and tag.
- signature
- Signature keys under a profile: generation, import, signing, verification, and the SubjectPublicKeyInfo shape check.
- tls
- TLS configuration from a
Policy: which versions, cipher suites, key-exchange groups and handshake signature schemes a provider carries, in preference order.
Structs§
- Admitted
- A profile’s non-TLS families on this backend’s module, under
options. Independent ofresolve: a profile whose TLS lists are empty on this module still admits its MACs, KDFs, key agreement, AEADs, hashes and signatures. Built only byadmit, and read-only, so a constructor that takes it checks the profile’s own admission. - Admitted
Selection - 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.
- Capability
- One cell of the capability table. A cipher suite cell speaks only to the suite’s algorithms;
whether its protocol version is approved is the
Protocolcell. - Certificate
- The certificate a module carries.
- Module
- An AWS-LC FIPS module: a line and a linkage.
- Options
- Options applied on top of any profile. The default changes nothing;
cnsa1_unclassified_nsswidenscnsa1’s MACs, HKDFs, hashes and signatures, and the others narrow. Outside this crate, build it fromOptions::default()and set the fields you need. - Parse
Algorithm Error - A name that is not one of the crate’s algorithms of the type parsed.
- Parse
Profile Error - A name that is not one of the crate’s profiles. Names are matched exactly: no trimming and no case folding.
- Peer
Certificate Rule - Immutable cited certificate-policy data.
- Peer
KeyRule - The key families and parameters admitted for a certificate role.
- Profile
Spec - A profile’s contents, each list in preference order.
- Resolved
- A profile resolved against this backend’s module.
profileandoptionssay whatresolvewas called with;tlsgoes totls::client_builder,tls::server_builderand the verifier builders;Resolved::certified_keybinds this side’s certificate and key to the profile.
Enums§
- Aead
Algorithm - An authenticated-encryption algorithm outside TLS (RFC 5116), with a 96-bit nonce and a 128-bit
tag. TLS record protection is
CipherSuite. - Algorithm
- Any algorithm the capability table has a cell for.
- Approval
- A module’s approval status for one algorithm, as its published evidence settles it.
- Cert
Status - A certificate’s CMVP status as recorded when this crate version was released.
- Certificate
Signature - A certificate signature algorithm, independent of CertificateVerify schemes.
- Cipher
Suite - A TLS cipher suite.
- Crypto
Error - A refusal from one of the crate’s operations. It never carries key or plaintext material.
- CsrError
- Why a certificate signing request could not be produced.
- Family
- A family of algorithms in a TLS policy or a profile.
- Governing
Text - The text a profile follows.
- Hash
Algorithm - A hash function: SHA-2 (FIPS 180-4) or SHA-3 (FIPS 202), with its full-length output.
- KdfAlgorithm
- A key-derivation function.
- KeyAgreement
Algorithm - A key-agreement algorithm outside TLS: Diffie-Hellman on a curve (SP 800-56A Rev. 3; RFC
7748). TLS key exchange is
KxGroup. - KxGroup
- A TLS key-exchange group.
- Linkage
- How the FIPS module is linked; each linkage is a separate module, with its own certificate or submission.
- MacAlgorithm
- A message authentication code.
- MlDsa
Parameter Set - A standardized pure ML-DSA parameter set.
- Module
Line - An AWS-LC FIPS module line.
- Peer
Certificate Rule Id - A finite certificate-policy identity.
- Peer
Certificate Violation - Why a peer certificate failed the profile rule. Descriptors never carry DER or key bytes.
- Peer
Curve - A supported named elliptic curve.
- PeerKey
- A bounded public-key descriptor, carrying no key bytes.
- Peer
Verifier Identity - Bounded identity of a peer verifier, independent of certificates and trust anchors.
- Profile
- A named profile. Each one that is named for a regime follows that regime’s published text, in
the edition
Profile::governing_textnames, and changes only when a new edition is published. - RsaSize
Rule - The published RSA modulus-size condition, separate from implementation limits.
- Signature
Algorithm - A signature key algorithm: what a key is generated as, and what its CSR is signed with.
- TlsError
- Why a TLS configuration step was refused.
- TlsSignature
Scheme - A TLS handshake signature scheme.
- TlsVersion
- A TLS protocol version.
Constants§
- 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.
- MODULE
- The AWS-LC FIPS module (line and linkage) this build links. Its certificate status is
fips::certificate(); for 3.x the certified release is 3.1.0.
Functions§
- admit
profile’s non-TLS families on this backend’s module, underoptions. Never refuses: a family left empty refuses each of its constructors instead.- assert_
admitted_ approved - Checks the families the caller uses from
a. Refuses withCryptoError::NotFipsunless the module is in FIPS mode; then withCryptoError::FamilyNotAdmittedfor the first family infamiliesthat is not walked here (every TLS family, whichassert_module_approveschecks instead, and any family this backend does not walk); then, whenfamiliesnamesFamily::Kdf, withCryptoError::KdfInfoMayBeEmptyifa’s profile admits KDFs and an emptyinfo, which the module does not approve (unrestricted); then unless every algorithmaadmits in each named family isApprovedfor the running module, walkingFamily::Mac,Family::Kdf,Family::KeyAgreement,Family::Aead,Family::Hash, thenFamily::Signature, and failing on the first that is not. Asserting nothing approves nothing: an emptyfamilies, or a named familyaadmits nothing in, is not a refusal. Independent ofassert_module_approves. - assert_
module_ approves - Refuses with
CryptoError::NotFipsunless the module is in FIPS mode, withCryptoError::PolicyEmptynaming the first familyrleaves empty, and otherwise unless every algorithmrnames, each protocol version included, isApprovedfor the running module. Fails on the first cell that is notApproved;AlgorithmTestedis not. It refuses every profile today, on both lines: no module’s evidence approves TLS 1.3 or TLS 1.2 (decision 0019). - awslc_
version - Returns the exact runtime-linked AWS-LC release, independently of its certificate release.
- capability
- What the backend for
mcan do fora, and what that module’s published evidence says about it: its security policy, or one CAVP certificate (decision 0004). - certificate
- The certificate for a module.
- ensure_
available - Refuses an algorithm the module’s backend does not implement.
- kdf_
info_ may_ be_ empty - Whether
profileadmits an empty HKDFinfo:unrestrictedonly, which makes no approval claim. The module does not mark an HKDF call with an emptyinfoapproved (AWS-LCHKDF_verify_service_indicator), so every other profile refuses one (decision 0010). - mac_
key_ floor_ bits - The shortest HMAC key, in bits,
profileadmits. 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).bsitakes 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”. - peer_
certificate_ rule - The canonical, immutable certificate rule for a profile.
- resolve
- Resolves
profile, narrowed byoptions, against this backend’s module. Refuses withCryptoError::EmptyProfilewhen a family comes out empty. Entries the module line lacks are recorded inResolved::excluded; approval is checked separately. - select_
admitted - The backend-independent half of a backend’s
admit:profile’s non-TLS families, underoptions, less whatmodulelacks. Independent ofselect.