Crypto Provider
Rustls supports multiple cryptographic backends. CrateStack does not pin one — the workspace exposes a feature flag so banks can ship a binary linked against the validated provider their compliance regime requires.Default backend
Without thecrypto-aws-lc-rs feature, the workspace builds against
rustls’s default backend (currently ring). This is fine for:
- development and CI
- internal services that don’t terminate TLS themselves
- consumer-facing services in jurisdictions with no FIPS requirement
FIPS-validated backend
Enable the workspace feature:aws-lc-rs is the only rustls backend with current FIPS 140-3 module
validation among the pure-Rust providers.
Operational steps for a real FIPS deployment (out of scope for the
framework itself):
- Build the workspace with
--features crypto-aws-lc-rs. - Use an
aws-lc-rs/rustlsbuild configured against the vendor’s FIPS-validatedlibcrypto. - Call
cratestack::install_fips_crypto_provider()from your service’smain()before any TLS-using code runs. - Pin the binary’s
cargo auditreport and the validated module’s certificate id in your release process.
CoolError::Internal("cratestack was not compiled with crypto-aws-lc-rs feature; FIPS-validated crypto provider is unavailable").
The actual provider install
(rustls::crypto::aws_lc_rs::default_provider().install_default()) lives
in the bank’s own binary so adding rustls as a direct dependency here
doesn’t force every downstream crate to inherit the choice.
What this is not
- Not a FIPS certification. Selecting the feature lets you compile a binary that uses the validated module — it doesn’t make the binary “FIPS-certified.” That requires the vendor’s validated binary and your organisation’s accreditation process.
- Not a kernel-level toggle. The feature only affects rustls’s crypto provider. Other TLS-using crates in the dependency graph (PostgreSQL drivers, HTTP clients) need their own selection.
- Not a database TLS configuration. SQLx’s PostgreSQL TLS is
configured separately through the connection string and feature
flags on
sqlx.
Read Next
- Banking readiness — the broader context for when FIPS matters in this stack