keys: add derivation_version to DerivedKey - #40
Conversation
Add a version discriminator so consumers can distinguish derivation constructions. Version 0 is the legacy construction; proto3 scalar defaults make every already-stored DerivedKey read 0 and keep deriving byte-identically. Consumers must reject an unknown version instead of falling back to a default. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TyAMGaLYMykDnnCA5ZNKsS
|
The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (1)
Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📜 Recent review details🔇 Additional comments (1)
WalkthroughThe public ChangesDerived key contract
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This adds a backward-compatible derivation version field while preserving legacy behavior for existing keys; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Comment |
Summary
Adds a version discriminator to
splitsecure.keys.v1.DerivedKey:0is the legacy derivation construction. Because proto3 scalars default to0, every already-storedDerivedKeyreads0and keeps deriving byte-identically — no data migration.1will be a FIPS 186-5 §A.2.2 construction (implemented downstream in priv).Field number 4 was unclaimed and the message has no
reservedranges.Verification
./bufgen.sh(buf format + lint + generate); generated Go and TS committedbuf breaking --against '.git#branch=main'passesgo build ./...passes🤖 Generated with Claude Code
https://claude.ai/code/session_01TyAMGaLYMykDnnCA5ZNKsS
monday: 12937366421