Repository navigation
feat(aws-lc-rs): rind-aws-lc-rs offers aws-lc-rs 1.x's API backed by rind - #465
Conversation
Quest-Claim: 35835ebd50a81e0e
…rind
A crate on aws-lc-rs swaps in rind with
`aws-lc-rs = { package = "rind-aws-lc-rs", version = "1" }` and no code
changes, for every item rind backs. Items rind refuses or lacks stay out
and the README lists them. Every feature but `fips` is accepted.
Tested differentially against aws-lc-rs, with ctgrind tests for the
secret paths the adapter adds. rind's `Digest` becomes `Copy` so the
adapter's `Digest` can be, as aws-lc-rs's is.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-lc-rs/rind-aws-lc-rs
- Load and encode RSA public keys through rind, which refuses an even modulus or an exponent of 1 and accepts an SPKI without NULL parameters, instead of hand-rolled DER that could also emit malformed lengths. - Check TLS scatter buffers before taking the nonce, and join scatter plaintexts with a fallible allocation. - PBKDF2 verify fails rather than panicking on an oversized value. - Wipe only encodings that hold a private key, and drop the extra wipe on a failed AEAD open, which rind already clears. - Add Wycheproof HKDF vectors and an allocator-based wipe test for the adapter's own secret storage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Read freed blocks with volatile byte loads in the wipe test, as rind's own zeroing test does, and say what the read risks. Document that the adapter panics where aws-lc-rs does, such as an oversized PBKDF2 derive, so its signatures stay aws-lc-rs's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… feature The maintainer settled review round 3's checkpoint: the adapter's heap copies of secrets follow rind's opt-in wiping, under a new `wipe` feature, and the zeroing test runs only with it. The aws-lc-rs patch quest's fixture starts with s2n-quic-crypto and jsonwebtoken. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Design change: following the maintainer's decisions of 2026-11-07 at review round 3's checkpoint, the adapter wipes its own heap copies of secrets only under a new (Written by Claude Opus 5.5 with high) |
# Conflicts: # rind/src/high/pbkdf2.rs
`Digest` is now `Copy`, so `Secret::block` copies the first `U` rather than cloning it, and the extracted Lean no longer calls `clone` there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Your OpenCode Go account is out of credit. Top it up, then re-trigger Pullfrog. OpenCode Go's response
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 24 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Design change: moq-dev/rind#461 merged during this round, so the adapter's (Written by Claude Opus 5.5 with high) |
|
quest land watch: the merge queue removed this pull request at 7c0b8cf because it conflicts with The land fixer works on it in the background, and the watcher re-enqueues it at the back of the queue once it is fixed or judged flaky, or hands it back here with what it needs. (written by quest land watch) |
|
codex, gpt-6.1-sol, medium effort land fixer note:
(written by codex, gpt-6.1-sol, medium effort) |
|
codex, gpt-6.1-sol, medium effort land fixer: Auto-merging .github/workflows/build.yml CONFLICT (content): Merge conflict in .github/workflows/build.yml Auto-merging Cargo.lock Auto-merging Cargo.toml Auto-merging MIGRATE.md Auto-merging MIGRATING.md Auto-merging README.md Auto-merging sh/armv7.sh CONFLICT (content): Merge conflict in sh/armv7.sh Auto-merging sh/dispatch.sh Automatic merge failed; fix conflicts and then commit the result. (written by codex, gpt-6.1-sol, medium effort) |
Mechanical resolution: keep rind-str0m from main and rind-aws-lc-rs from this branch in each package list. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>

Completes quest/m2/adoption/aws-lc-rs/rind-aws-lc-rs.md.
Problem
A crate that calls aws-lc-rs's API has no way onto rind without porting every call. rind-ring covers ring 0.17, but aws-lc-rs has diverged from ring: it takes algorithms by value, has extra modules (
cipher,kem,key_wrap,encoding,rsaOAEP), and has different constructors and errors.Approach
A new published crate,
rind-aws-lc-rs1.0.0, offers aws-lc-rs 1.x's API name for name for every item rind backs. A crate switches withaws-lc-rs = { package = "rind-aws-lc-rs", version = "1" }.cpumodule, as rind-ring does.fipsis declared and changes nothing.wipeis the crate's own (see Wiping).from_components, the streaming cipher contexts, and others. It also has a "Behaves differently" list.package.metadata.rind.upstream = "1"holds the version to aws-lc-rs's major throughsh/adapter-versions.sh.RSA_check_keyrefuses. Only the PKCS#1 field reader is hand-written.pbkdf2::derive, documented on the function), so its signatures stay aws-lc-rs's, as rind-ring's stay ring's.wipefeature, which aws-lc-rs lacks, turns onrind/wipe(from moq-dev/rind#461) and wipes the adapter's own copies of secrets on drop (PKCS#8 documents, the OAEP key's PKCS#8, Ed25519 seeds, raw cipher keys, private encodings, and ML-KEM shared secrets) through a crate-privateWiped<T>. Without it nothing is wiped, as in rind's default build. The crate's README documents it, and the root README's "Wiping keys" and MIGRATING.md's cross-API row, which said no adapter forwards the feature, now name it.rind::digest::DigestbecomesCopy, so the adapter'sDigestcan be, as aws-lc-rs's is.high::pbkdf2copies aDigestinstead of cloning it, and its Lean proof drops the clone step.Testing
tests/differential.rsruns proptests against aws-lc-rs 1.19 for digest, hmac, hkdf (and every key type HKDF fills), pbkdf2, aead, the TLS record keys, nonce sequences, cipher, and key_wrap.tests/keys.rschecks key and signature interop both ways: ECDH in raw, SPKI and compressed forms; ECDSA signing and verification across key encodings; Ed25519 PKCS#8 v1 and v2 bytes; ML-KEM-768; RSA PKCS#1 (equal signatures) and PSS (including Max and Custom salt lengths); and OAEP with labels.tests/ctgrind.rschecks the secret paths the adapter adds (HKDF and its keys, open_within, the short PBKDF2 compare, cipher, and key wrap). It is clean underadmin/ctgrind adapters --release.tests/wycheproof.rsruns the HKDF vectors (SHA-1 to SHA-512) through the adapter's own HKDF.tests/zeroing.rschecks the adapter's own heap copies of secrets (the OAEP key's PKCS#8 and its cached keys, seeds, private encodings, raw cipher keys, and ML-KEM shared secrets) are wiped before they are freed. It does this with a scanning global allocator and a positive control. It builds only withwipe, and the gate (sh/dispatch.sh check:rs) runs it with--features wipewhenever rind-aws-lc-rs is selected, and nightlybuild.ymlruns it on every OS beside rind's. With the gate removed and the feature off, all 5 secret tests fail, so the feature really controls the wipe.just checkpasses on 7c0b8cf, the merge of main at d259b75: 702 tests, then rind's 12 and the adapter's 6 zeroing tests underwipe.cargo test -p rind -p rind-aws-lc-rs --features rind/wipe,rind-aws-lc-rs/wipe --test zeroing, nightly's new command, passes on bfee6af.nix develop .#prove --command admin/provepasses. Merging moq-dev/rind#476's PBKDF2 proof conflicted withDigestbecomingCopy:Secret::blocknow copies its firstUrather than cloning it, andproofs/Rind/X86_64/Pbkdf2.leandrops the clone step that left unused.Impact
Copyderive.wipeenablesrind/wipe, so one switch wipes both rind's keys and the adapter's copies.aws_lc_rsprovider, rustls-webpki'saws-lc-rsfeature, and rcgen'saws_lc_rsfeature name ML-DSA (and rustls names ML-KEM-1024), so they do not build on this crate until rind has those algorithms. quinn-proto and libp2p are blocked through rustls. The README says so.Alternatives
hmac::Algorithmandhkdf::Algorithmby value, has differentDebugoutput, different error kinds, and extra trait impls on most types. A shared base would need a third crate, or rind-ring types that grow aws-lc-rs's quirks. The duplicated code is thin forwarding to rind.Follow-ups
cipher::StreamingEncryptingKeyand its siblings could be built on rind's CTR and CBC.verify_digestneeds a rind API that verifies a prehashed RSA message.Models
Implementer: Codex, gpt-6.1-sol, xhigh effort (integration)
Decisions
Settled by the maintainer on 2026-11-07 at review round 3's design checkpoint:
pbkdf2::deriveon an output over (2^32 - 1) hash outputs: ✅ panic, for name-for-name parity with aws-lc-rs and rind-ring, documented on the function (rejected: leavederiveout).tests/zeroing.rs's freed-memory scan: ✅ keep it, documented as unsound in principle as rind's own zeroing test is (rejected: per-type in-place checks, which miss theVecandArcheap copies; no test).wipefeature: the adapter wipes its heap copies of secrets only under its ownwipefeature, which enablesrind/wipe, and the zeroing test is gated on it (rejected: always wipe).Review
Rewritten by
quest reviewafter each round.01a1b771-c693-7f32-8a88-8b3df1390a63, round 1No actionable findings remain in the specified diff; the wipe integration and recorded validation support landing, though builds and tests were not rerun in the read-only sandbox.Round 1 of the new session (started because #461 changed AGENTS.md) reviewed bfee6af with no findings. 7c0b8cf adds only a conflict-free merge of main (d259b75).
Integration validation
Head 21a66e5 merges main at 63b68f4. The two conflicts only combined the package lists so both rind-str0m and rind-aws-lc-rs run on every existing target; no runtime behavior changed. This mechanical merge retains the clean local review recorded above.
just ci origin/main: passed, including 724 selected tests and both wiping suites.nix develop .#prove --command admin/prove: passed for x86_64 and aarch64.(Written by GPT-6.1 Sol with xhigh)