Repository navigation
fix(aws-lc-rs): offer exactly aws-lc-rs 1.x's API - #522
Merged
Merged
Conversation
Quest-Claim: 186aaa4f7adaa222
open_in_place_separate_tag takes aws-lc-rs's (nonce, aad, &[u8], in_out) rather than ring's, the kem and key_wrap constructors are generic, ring-io and ring-sig-verify gate what they gate upstream, and the cpu module, the pbkdf2::Algorithm Debug impl, and the TryFrom impl upstream lacks are gone. Set to 1.0.3 by hand, as a fix restoring upstream's API. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
November 9, 2026 07:34
|
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 27 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. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — every API change in this PR verified line-for-line against the aws-lc-rs v1.19.0 tag sources, and the adapter's test matrix run locally (default features, --no-default-features, --features wipe, --all-features check, wycheproof HKDF): all pass.
aead::LessSafeKey::open_in_place_separate_tagnow takes aws-lc-rs 1.17+'s(nonce, aad, tag: &[u8], in_out), matching upstream's signature exactly (including its#[allow(clippy::needless_pass_by_value)]); a wrong-length tag fails withUnspecifiedviaTag::try_from, and the differential test exercises the separate-tag path at full length and one byte short through code compiled against both crates.cipher::OperatingModeandrsa::KeySizegain upstream's#[non_exhaustive], andpbkdf2::AlgorithmdropsDebug— all three match upstream's attributes and derive lists.PublicKeyComponents<B>implementsTryInto<PublicEncryptingKey>directly (with the explicitPublicEncryptingKey::newpath, sinceSelfis the components type), as upstream does.kem::AlgorithmIdentifiergainsnid()with the same supertrait bounds;NID_MLKEM768 = 989confirmed against aws-lc-sys's bindings; the KEM andkey_wrapconstructors are now generic over the algorithm, as upstream's are.UnspecifiedandKeyRejectedoverride the deprecateddescription()/cause()with upstream's exact values.- The
cpumodule is gone;ring-iogatesio,rsa::PublicKey::{modulus, exponent}, andFrom<&PublicKey> for PublicKeyComponents<Vec<u8>>, andFrom<untrusted::EndOfInput>carries upstream'sany(ring-sig-verify, ring-io)gate —der.rs's explicitmap_err(unspecified)keeps the error mapping identical when the impl is compiled out. Thecfg_attronPublicKey::ealone is correct:nstays live through the un-gatedmodulus_len(). - Docs drop the
cpu::check()advice consistently (README, MIGRATING.md, MIGRATE.md), with no stale references left repo-wide; the quest file deletion is clean — nothing in the tree links to it. - Version 1.0.3 set by hand with no
!in the title, matching CONTRIBUTING.md's restoring-upstream-is-a-bugfix policy;Cargo.lockupdated in step.
glm-5.3 | 𝕏
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Finishes
quest/m0/adapters/aws-lc-rs.md(epicquest/m0/adapters/README.md): rind-aws-lc-rs now offers exactly aws-lc-rs 1.x's API, adding only itswipefeature.Changes
aead::LessSafeKey::open_in_place_separate_tagtakes aws-lc-rs 1.17+'s(nonce, aad, tag: &[u8], in_out)instead of ring's(nonce, aad, Tag, in_out, RangeFrom). A tag of the wrong length fails withUnspecified, as upstream's does.cipher::OperatingModeandrsa::KeySizeare#[non_exhaustive].pbkdf2::Algorithmno longer implementsDebug.PublicKeyComponents<B>implementsTryInto<PublicEncryptingKey>directly, notTryFrom.kem::AlgorithmIdentifiergainsnid();AlgorithmId::MlKem768returns AWS-LC'sNID_MLKEM768(989).kem::DecapsulationKey::{generate, encapsulation_key},EncapsulationKey::new, andkey_wrap::KeyEncryptionKey::neware generic over the algorithm, as upstream's are. The sealed traits mean only this crate's algorithms reach them.ErrorforUnspecifiedandKeyRejectedoverridesdescription()andcause()as upstream does.cpumodule (check,MissingFeature) is gone, per the epic.ring-iogatesio,rsa::PublicKey::{modulus, exponent}, andFrom<&PublicKey> for PublicKeyComponents<Vec<u8>>;ring-sig-verify(already) gatesVerificationAlgorithm::verify; either gatesFrom<untrusted::EndOfInput> for Unspecified, matching upstream. The quest named onlyio; upstream gates the twoPublicKeymethods and theFromimpl withring-iotoo, so they follow.cpu::check()advice for this adapter. MIGRATING.md's aead row now shows aws-lc-rs'sopen_in_place_separate_tagsignature, with ring's noted.nid().Public API
Breaking for rind-aws-lc-rs 1.0.2 users of the items above, but each change restores aws-lc-rs's API, so per CONTRIBUTING.md's Releases this is a fix: the version is set by hand to 1.0.3 and the title carries no
!. Migration: write the code as for aws-lc-rs 1.19. The maintainer may yank 1.0.0 through 1.0.2. No wire impact.Choices made without asking
untrustedstays a required dependency (upstream makes it optional behindring-ioandring-sig-verify), since the adapter's private DER reader uses it; it is not API.Idmaps to rind's algorithm throughnid(), rather than through a hidden method on the public trait.Checks
just checkpasses, as docargo test -p rind-aws-lc-rswith default features and with--no-default-features, and thewipezeroing test.Caused by
Models
Size: M
Implementer: Claude Code, claude-opus-5-5, medium effort
(Written by Claude Opus 5.5 with medium)
Review
Rewritten by
quest reviewafter each round.01a1bf3a-028d-7543-a88c-4b2e1fe70696, round 1The changes appear ready to land based on code review, with no actionable defects found and API changes matching inspected upstream definitions, though builds and tests were not run as instructed.