Skip to content

chore(quest): plan wiping each key type's whole value - #547

Merged
kixelated merged 1 commit into
mainfrom
quest-plan/wipe-whole-key
Nov 10, 2026
Merged

kixelated merged 1 commit into
mainfrom
quest-plan/wipe-whole-key

Conversation

@kixelated

@kixelated kixelated commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Plans quest/m2/api/wipe-whole-key.md, the follow-up that moq-dev/rind#529 suggested. Under wipe, every key type wipes its whole value, public parts included. agreement::PrivateKey goes back to that rule, and AGENTS.md states it.

Decisions

Settled with the maintainer on 2026-11-09:

  • Scope: feat(agreement)!: keys keep their public key and algorithm #529 suggested changing only Ed25519KeyPair. Six types turned out to wipe non-secret parts on purpose: Ed25519KeyPair, EcdsaKeyPair, RsaKeyPair, oaep::DecryptingKey, AesCtr, and AesCbcEncryptingKey. ✅ every key type wipes its whole value, and the rule goes in AGENTS.md (rejected: secrets and stored public keys only; secrets only, with per-type skips in the zeroing test; change only Ed25519KeyPair; leave feat(agreement)!: keys keep their public key and algorithm #529 as the lone exception). The maintainer first leaned toward secrets only "unless FIPS requires it". FIPS 140-3 (ISO/IEC 19790 7.9.7, NIST IG 9.7) does require zeroising unprotected public security parameters, so the whole-value rule was picked.
  • Goal as written in the quest: ✅ (rejected: same code change without touching AGENTS.md).
  • Milestone: ✅ m2 api epic (rejected: m0, m3).

Public API

None. Quest file only.

Models

Size: XS
Implementer: Claude Code, claude-opus-5-5, high effort

(Written by Claude Opus 5.5 with high)

Review

Rewritten by quest review after each round.

  • Reviewer: Codex, gpt-6.1-sol, low effort
  • Session: 01a1c306-36b8-7653-859e-99afe27e4fa8, round 1
  • Head: 053bcd5
  • Base: origin/main at 3585c47
  • Score: 10/10, The documentation-only change adds a planning document, changes no executable code or tests, and has no actionable defects.
  • Findings: none

Key types already wipe their public parts so the zeroing test checks every
byte; agreement::PrivateKey rejoins that rule and AGENTS.md states it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review November 10, 2026 01:15
@kixelated
kixelated added this pull request to the merge queue Nov 10, 2026
@coderabbitai

coderabbitai Bot commented Nov 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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 35 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: eafc8673-965e-481d-a072-b0bce323e3d0
Commits

Reviewing files that changed from the base of the PR and between 8b2dd4c and 053bcd5.

Files selected for processing: 1

  • quest/m2/api/wipe-whole-key.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — two minor suggestions inline.

Reviewed changes

  • New quest quest/m2/api/wipe-whole-key.md (XS) — plans the follow-up to #529: under wipe, every key type wipes its whole value (public parts included), agreement::PrivateKey returns to a whole-value wipe, the zeroing test carries no per-type skip, and AGENTS.md and REVIEW.md state the rule.

Verified against the repo and cited sources: all six named types do wipe non-secret parts on purpose, each with a comment saying so; rind/tests/zeroing.rs currently checks every byte with no skip on main; the "padding and enum-tail leaks" attribution matches #524 (i686 RsaKeyPair padding found by the zeroing test) and #513 (ARM AES enum tail); and the FIPS 140-3 claim is supported — ISO/IEC 19790 7.9.7 requires zeroisation of all unprotected SSPs (new in 140-3 vs 140-2), and the FIPS 140-3 IG's 9.7 items state that zeroisation of unprotected PSPs (public security parameters) is required except when protected. The m2/api epic README links children only in prose, so the unlinked quest file follows the established pattern.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using glm-5.3 | 𝕏

Decided with the maintainer on 2026-11-09, while planning #529's follow-up (✅ chosen):

- Rule: ✅ a key type wipes its whole value (rejected: secrets and stored public keys only; secrets only, with per-type skips in the zeroing test; change only `Ed25519KeyPair`; leave #529 as the lone exception).
- Why: six types already wipe non-secret parts so the zeroing test can check every byte (`Ed25519KeyPair`, `EcdsaKeyPair`, `RsaKeyPair`, `oaep::DecryptingKey`, `AesCtr`, `AesCbcEncryptingKey`). That check is what caught the padding and enum-tail leaks fixed in moq-dev/rind#513 and moq-dev/rind#524. FIPS 140-3 (ISO/IEC 19790 7.9.7, NIST IG 9.7) also requires zeroising unprotected public security parameters such as stored public keys. A few more bytes written when a key drops cost nothing measurable.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list is short by two: AesCbcDecryptingKey (rind/src/mid/aes_cbc.rs:198) and AesKek (rind/src/mid/aes_kw.rs:213) also wipe a non-secret key_len on purpose via zeroise_value(self) — the same rationale the comment above AesCbcEncryptingKey's drop names ("The key length is not secret, but is wiped with the key so that the whole value reads zero"), and both are checked whole by tests/zeroing.rs. So the survey reads as exhaustive at six when it's at least eight. Harmless for the rule's direction — both already conform — but future agent runs cite these lists, so worth naming them.

- AGENTS.md: ✅ state the rule there (rejected: leave its wording alone). This replaces #529's 2026-11-09 decision to wipe only `PrivateKey`'s private part.
- Placement: ✅ m2 api epic (rejected: m0, m3).

Start once #529 has landed. Update REVIEW.md's "Wiped secrets" check to match.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plan's doc updates name AGENTS.md and REVIEW.md, but two other docs restate the rule this quest retires: ARCHITECTURE.md (~line 16, "Keys wipe their secrets on drop under the wipe feature") and the README's ## Wiping keys section ("rind wipes keys, keyed state, and heap scratch derived from a private key on drop"), which mirrors AGENTS.md's rule sentence. Under the whole-value rule, "their secrets" describes the old scope — adding these two to the update line keeps the repo's grep-the-tree convention for changed AGENTS.md rules from leaving them behind.

Merged via the queue into main with commit ceeb088 Nov 10, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant