encryption: Argon2 KDF + envelope behind a default-on kdf feature - #333
Conversation
…ture The only in-tree consumer, ogar-encryption, carries its own KDF and envelope on argon2 0.6 and only needs aead/hash/sign/channel from this crate. With default-features = false it no longer compiles argon2 0.5. Default builds are unchanged; wasm-bindings implies kdf. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019HnekoM1EidTwQLS3oFVFm
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (3)
Included review availability: 1 review is currently available. Your included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour. 📝 WalkthroughWalkthroughThe encryption crate now gates its Argon2 KDF and envelope APIs behind the ChangesEncryption KDF Feature Gating
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Refactor Suggested reviewers: Merge Risk: ⚪ Minimal · up to The default build retains the KDF and envelope APIs, and wasm bindings enable them as well. No in-tree consumer breakage or other material merge risk is established. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
A rabbit checks the feature gate, Comment |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_efd9e6c6-9f4f-467e-badc-cb7db89a6071) |
What
In
crates/encryption:argon2(0.5) is now optional.kdf = ["dep:argon2"], on by default.wasm-bindingsnow implieskdf.kdf:kdf,envelope, and the rootseal/open/KdfParams/EnvelopeErrorre-exports.Default builds are unchanged.
Why
The only in-tree consumer is OGAR's
ogar-encryption(every repo under the workspace was checked). It carries its own KDF and envelope on argon2 0.6, from theAdaWorldAPI/password-hashesfork, and uses onlyaead,hash,signandRngErrorfrom this crate. Once it depends withdefault-features = false, argon2 0.5 is no longer compiled into it. The OGAR side is a separate PR.Verification
cargo test -p encryptionis green in three configurations:--no-default-features: 12 + 28, andcargo treeshows no argon2;--features wasm-bindings: 13 + 46.cargo clippy -p encryption --no-default-features --all-targets -- -D warningsis clean.cargo check -p encryption --no-default-features --target wasm32-unknown-unknownis green..claude/blackboard.mdhas an entry for the change.🤖 Generated with Claude Code
https://claude.ai/code/session_019HnekoM1EidTwQLS3oFVFm
Generated by Claude Code
Summary by CodeRabbit