Land roadmap 9.3 on main (PR #228 merged into its stacked base, not main) - #229
Merged
Merged
Conversation
Roadmap 9.3. Creating a backup with a share set or a passkey wrote the passphrase slot and then enrolled each extra way in, and each enrolment reopened the container, deriving the password again: 1, 2, 2 and 3 derivations for password, +shares, +passkey, +both. encryptKeym2WithSlots writes every initial slot while the generated master key is still in hand, so the password is derived once and the share and passkey slots take only their HKDF. writeKeym2 generalises to writeKeym2Slots; the bytes are exactly the enrolment path's given the same random inputs. The password, KDF parameters, version, share threshold and count and passkey sizes are checked before any derivation. The worker and its no-worker fallback call it through encryptContainerWithSlots; §4.8 keeps its own writer, and enrolling into an existing backup is unchanged. The worker now reads the key file once, so the page transfers it on every path. Adds test:slot-transaction (derivation counts through the shipping worker for PBKDF2 and Argon2id, byte equality with the enrolment path for every cipher, version, slot combination and key-file case, every way in opens it, refusals cost no derivation, a failed write returns no container or shares), a census block in secret-erase-core, a bridge encryptslots subcommand compared byte for byte against the reference's three-step path in crosstest2.py, and three appended v3-slots fixtures (corpus 42 -> 45 in both languages).
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.
PR #228 (roadmap 9.3, one derivation per new backup) was merged into its stacked base branch,
claude/serene-carson-0739mv-secret-buffers, at the same moment PR #227 merged that branch intomain. So #228 was never retargeted. Its commit487f8beis on that branch, asde969a5, and not inmain. This is the case CLAUDE.md records for PR #23.This PR carries the same, unchanged commit from the same branch into
main. The diff is exactly487f8be, because its parent14937a1is already inmainvia #227. It merges cleanly withmainat2adefa3.Everything in #228's description still applies. That covers the change, the checks (Chromium, Firefox and WebKit green on
487f8be), the negative controls and the performance report. It is not repeated here.After merging, confirm that
maincontainssrc/lib/keym-v2.tswithencryptKeym2WithSlots, andscripts/slot-transaction-test.mjs.