rind

Move from aws-lc-rs to rind

This page describes rind-aws-lc-rs as main has it, ahead of rind-aws-lc-rs 1.0.2 on crates.io. Until its next release, take it from git at the commit this page describes. Beside the lines below, add this line under the [patch.crates-io] table of your workspace's root Cargo.toml (add the table if it has none), then run cargo update -p rind-aws-lc-rs:

rind-aws-lc-rs = { git = "https://github.com/kixel-ai/rind", rev = "80fc7ba544b53a6ca9ab21ba9a946c275eb19a06" }

That moves every crate in your tree that depends on rind-aws-lc-rs, and cargo tree -i rind-aws-lc-rs then shows it from git+https://github.com/kixel-ai/rind.

This crate offers aws-lc-rs 1.x's API, name for name, for every item rind backs. rind is a pure-Rust fork of Graviola, so this needs no C compiler, CMake, or NASM. A crate on aws-lc-rs swaps it in by renaming its dependency, with no code changes:

[dependencies]
aws-lc-rs = { package = "rind-aws-lc-rs", version = "1" }

The rename reaches only the crate that makes it, not dependencies that use aws-lc-rs themselves.

It panics wherever aws-lc-rs panics, such as pbkdf2::derive asked for more than PBKDF2 allows, so its signatures stay aws-lc-rs's, as rind-ring's stay ring's.

Every aws-lc-rs feature but fips is accepted. ring-io and ring-sig-verify gate the items they gate in aws-lc-rs, and the rest change nothing. fips is refused, since rind is not FIPS validated: try_fips_mode() always fails and fips_version() is None.

Wiping keys

Keys, and the adapter's own copies of secrets such as PKCS#8 documents, Ed25519 seeds, and ML-KEM shared secrets, are wiped on drop, as aws-lc-rs wipes them.

What rind cannot back

These items are left out, so code using them fails to build:

Behaves differently

WebAssembly

It builds for wasm32-wasip2 and wasm32-unknown-unknown, the browser, for neither of which aws-lc-rs builds. In the browser, rind needs its JavaScript random source, getrandom = { version = "0.4", features = ["wasm_js"] }. PLATFORMS.md lists what each adapter's upstream needs there too, and why rind's constant-time checks do not cover wasm.

Switch with an agent

Paste this into your coding agent, in your repository:

Move this repository from ring or aws-lc-rs to rind, following
https://raw.githubusercontent.com/kixel-ai/rind/main/MIGRATE.md

It migrates on a local branch, reports the build time, binary size, benchmarks, and tests before and after, and asks before opening a PR or filing an issue. To migrate by hand, MIGRATING.md maps each ring and aws-lc-rs item to rind's.

Other libraries