Skip to content

Commit b3b1d2b

Browse files
authored
Merge pull request #15 from oroderico/drop-unreachable-checksum-notice
Drop the checksum notice the last-word filter made unreachable
2 parents a80a049 + f777027 commit b3b1d2b

3 files changed

Lines changed: 20 additions & 20 deletions

File tree

‎README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -370,11 +370,11 @@ the checksum, so most of the wordlist cannot end a given eleven or twenty-three:
370370
its eleven bits are the leftover entropy bits followed by the checksum bits,
371371
which leaves 128 of the 2048 words possible for a 12-word mnemonic and only 8
372372
for a 24-word one. The keyboard offers those and nothing else — so a word misread
373-
off a metal plate is not typeable in the first place, rather than being reported
374-
as `Invalid checksum` after the whole mnemonic has been entered. Few enough
375-
remain for a 24-word restore that entry lists them outright instead of asking
376-
for a letter. The narrowing is exact in both directions: everything it excludes
377-
genuinely fails validation, and no correct seed becomes harder to enter. It
373+
off a metal plate is not typeable in the first place, rather than being refused
374+
after the whole mnemonic has been entered. Few enough remain for a 24-word
375+
restore that entry lists them outright instead of asking for a letter. The
376+
narrowing is exact in both directions: everything it excludes genuinely fails
377+
validation, and no correct seed becomes harder to enter. It
378378
applies to both entry methods and to the last word on the review screen, where
379379
it is rebuilt from the words currently entered — but not to "Complete checksum",
380380
whose 11 or 23 words have no checksum in them yet, and not to the backup quiz,

‎host/origo_simulator.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1789,7 +1789,6 @@ static bool nav_chrome_bands_do_not_collide(void)
17891789
const char* line1;
17901790
const char* line2;
17911791
} notices[] = {
1792-
{ "Invalid checksum", "Check your words", "Fix one to continue" },
17931792
{ "Passphrase mismatch", "Nothing was derived", "Try again" },
17941793
{ "Backup confirmed", "Words matched", NULL },
17951794
{ "Too long for a QR", "Compact SeedQR", "Read it as text instead" },

‎main/seedtool_app.c‎

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1713,16 +1713,21 @@ static int revisit_prefix(char words[][SEEDTOOL_MAX_WORD_LEN + 1], const size_t
17131713
* seedtool_validate_mnemonic yet - the checksum gate belongs only where the
17141714
* mnemonic is meant to be whole and correct, which is why that flow reviews
17151715
* through review_prefix instead.
1716-
* join_words and seedtool_validate_mnemonic are the same pair review_and_
1717-
* confirm itself calls every time it redraws; reused once more here, before
1718-
* the first draw, so an invalid checksum is announced up front rather than
1719-
* only implied by "Review words" silently reading "Review - fix a word"
1720-
* instead - the inert "Checksum invalid" row this screen used to carry (see
1721-
* "Drop the inert 'Checksum invalid' row from word review") was removed for
1722-
* being a dead click, not because the reader shouldn't be told; a one-shot
1723-
* acknowledge, the same widget restore_seed's own "Checksum valid" already
1724-
* uses for the opposite verdict, says it without adding a row that does
1725-
* nothing when picked. */
1716+
*
1717+
* No checksum is announced here, and the absence is deliberate: there is
1718+
* nothing left for it to announce. The last word of a whole mnemonic is
1719+
* entered under seedtool_final_word_candidates, both keyboards narrow to that
1720+
* set rather than merely displaying it, and stepping back clears the word so
1721+
* the last one is always entered last against a filter rebuilt from the words
1722+
* currently standing. What leaves enter_mnemonic_words with success has a
1723+
* checksum that holds.
1724+
*
1725+
* A one-shot notice did stand here, from before that filter existed, and its
1726+
* own commit said the check was being moved to where it prevents the mistake
1727+
* instead of reporting it. Only the moving happened. Restoring it would mean
1728+
* restoring a screen no input can reach - and the reader is not left without a
1729+
* gate either way, since review_and_confirm still reads the checksum on every
1730+
* redraw and keeps Continue untakeable while it fails. */
17261731
static int restore_mnemonic(const size_t count, char words[][SEEDTOOL_MAX_WORD_LEN + 1], bool* const by_number,
17271732
char* mnemonic, const size_t mnemonic_len, bool resume)
17281733
{
@@ -1737,10 +1742,6 @@ static int restore_mnemonic(const size_t count, char words[][SEEDTOOL_MAX_WORD_L
17371742
if (entered != 1) {
17381743
return entered;
17391744
}
1740-
if (join_words(words, count, mnemonic, mnemonic_len)
1741-
&& seedtool_validate_mnemonic(mnemonic, NULL) != SEEDTOOL_OK) {
1742-
notice("Invalid checksum", "Check your words", "Fix one to continue");
1743-
}
17441745
}
17451746
resume = false;
17461747
const int reviewed = review_and_confirm(words, count, *by_number, mnemonic, mnemonic_len);

0 commit comments

Comments
 (0)