Take the 24-word backup from @gryt/crypto (GRYT-898) - #380
Merged
Conversation
`seedToWords`, `wordsToSeed`, `SEED_BYTES` and `assertUsableSeed` moved to @gryt/crypto in crypto#6. The phone had all four, agreeing with these by hand. This is the one duplicate where drift would not fail loudly. A changed encoding still round-trips against itself; what it strands is every phrase already written down, and nobody finds out until somebody restores a backup on a new device. Crypto pins it to a fixed vector taken from what this app produced before the move. `assertUsableSeed` now carries the phone's wording rather than this one's. Same two checks, different strings, and one of them had to go. Checked that the phrase for a known seed is byte-identical to what this app produced before the change. `yarn lint` clean, and identity-vault, message-vault, message-key, message-key-offer, server-notice and reset-warning all pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Separate commit because the lockfile could not be written until the release existed: yarn refuses a pin it cannot resolve, and CI installs with --frozen-lockfile. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Review-required path (
src/packages/common/src/auth/), so this is yours to merge.seedToWords,wordsToSeed,SEED_BYTESandassertUsableSeedmoved to@gryt/cryptoin crypto#6, released as 0.4.0. The phone had all four, agreeing with these by hand.Why this one deserves a closer read than the last few
It is the only duplicate on the GRYT-898 list where drifting would not fail loudly. A changed encoding still round-trips perfectly against itself. What it strands is every phrase already written down on paper — and nobody finds out until somebody restores a backup on a new device.
So crypto pins it to a fixed vector rather than a round trip, taken from what this app produced before the move.
What I checked
0x00..0x1f) is byte-identical to what this app produced before the change.words.test.ts— 14 tests written against its implementation — passes unchanged against crypto's.One user-visible change
assertUsableSeednow carries the phone's error wording rather than this app's. Same two checks — length, and all-one-byte — different strings. One of them had to go and the phone's were the more direct.Verification
yarn lintclean, andidentity-vault,message-vault,message-key,message-key-offer,server-noticeandreset-warningall pass, against the published 0.4.0.The phone's half is Gryt-chat/mobile#189.
🤖 Generated with Claude Code