Skip to main content

Crate crypto_profile_awslc3

Crate crypto_profile_awslc3 

Source
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 kdf in 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 of resolve: a profile whose TLS lists are empty on this module still admits its MACs, KDFs, key agreement, AEADs, hashes and signatures. Built only by admit, and read-only, so a constructor that takes it checks the profile’s own admission.
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.
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 Protocol cell.
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_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.
ParseAlgorithmError
A name that is not one of the crate’s algorithms of the type parsed.
ParseProfileError
A name that is not one of the crate’s profiles. Names are matched exactly: no trimming and no case folding.
PeerCertificateRule
Immutable cited certificate-policy data.
PeerKeyRule
The key families and parameters admitted for a certificate role.
ProfileSpec
A profile’s contents, each list in preference order.
Resolved
A profile resolved against this backend’s module. profile and options say what resolve was called with; tls goes to tls::client_builder, tls::server_builder and the verifier builders; Resolved::certified_key binds this side’s certificate and key to the profile.

Enums§

AeadAlgorithm
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.
CertStatus
A certificate’s CMVP status as recorded when this crate version was released.
CertificateSignature
A certificate signature algorithm, independent of CertificateVerify schemes.
CipherSuite
A TLS cipher suite.
CryptoError
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.
GoverningText
The text a profile follows.
HashAlgorithm
A hash function: SHA-2 (FIPS 180-4) or SHA-3 (FIPS 202), with its full-length output.
KdfAlgorithm
A key-derivation function.
KeyAgreementAlgorithm
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.
MlDsaParameterSet
A standardized pure ML-DSA parameter set.
ModuleLine
An AWS-LC FIPS module line.
PeerCertificateRuleId
A finite certificate-policy identity.
PeerCertificateViolation
Why a peer certificate failed the profile rule. Descriptors never carry DER or key bytes.
PeerCurve
A supported named elliptic curve.
PeerKey
A bounded public-key descriptor, carrying no key bytes.
PeerVerifierIdentity
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_text names, and changes only when a new edition is published.
RsaSizeRule
The published RSA modulus-size condition, separate from implementation limits.
SignatureAlgorithm
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.
TlsSignatureScheme
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, under options. Never refuses: a family left empty refuses each of its constructors instead.
assert_admitted_approved
Checks the families the caller uses from a. Refuses with CryptoError::NotFips unless the module is in FIPS mode; then with CryptoError::FamilyNotAdmitted for the first family in families that is not walked here (every TLS family, which assert_module_approves checks instead, and any family this backend does not walk); then, when families names Family::Kdf, with CryptoError::KdfInfoMayBeEmpty if a’s profile admits KDFs and an empty info, which the module does not approve (unrestricted); then unless every algorithm a admits in each named family is Approved for the running module, walking Family::Mac, Family::Kdf, Family::KeyAgreement, Family::Aead, Family::Hash, then Family::Signature, and failing on the first that is not. Asserting nothing approves nothing: an empty families, or a named family a admits nothing in, is not a refusal. Independent of assert_module_approves.
assert_module_approves
Refuses with CryptoError::NotFips unless the module is in FIPS mode, with CryptoError::PolicyEmpty naming the first family r leaves empty, and otherwise unless every algorithm r names, each protocol version included, is Approved for the running module. Fails on the first cell that is not Approved; AlgorithmTested is 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 m can do for a, 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 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”.
peer_certificate_rule
The canonical, immutable certificate rule for a profile.
resolve
Resolves profile, narrowed by options, against this backend’s module. Refuses with CryptoError::EmptyProfile when a family comes out empty. Entries the module line lacks are recorded in Resolved::excluded; approval is checked separately.
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.