remove mitigation w.r.t slot 10 of se2, for Q

This commit is contained in:
Peter D. Gray 2024-02-19 10:21:35 -05:00
parent 8cb010ca04
commit d4885cc30a
No known key found for this signature in database
GPG Key ID: A2DCD558C2BE5D7C
2 changed files with 5 additions and 4 deletions

View File

@ -141,7 +141,7 @@ We will summarize transaction outputs as "change" back into same wallet, however
# Trick Pins
- "deltamode" PIN must be same length as true pin, and differ only in final 4 positions.
- there are 14 trick "slots", but we avoid slot 10, so 13 available.
- there are 14 trick "slots", but on mk4, we avoid slot 10, so 13 available. (Q: 14)
- duress wallets consume 2 slots (or 3 slots for legacy duress wallet) which must be contiguous
- when restoring trick pins from backup files, "forgotten" pins are not restored,
and any trick pin which matches the true PIN of the restored system will be dropped

View File

@ -7,7 +7,7 @@
# - replaces old "duress wallet" and "brickme" features
# - changes require knowledge of real PIN code (it is checked)
#
import uctypes, errno, ngu, sys, stash, bip39
import uctypes, errno, ngu, sys, stash, bip39, version
from menu import MenuSystem, MenuItem
from ux import ux_show_story, ux_confirm, ux_dramatic_pause, ux_enter_number, the_ux, ux_aborted
from stash import SecretStash
@ -163,8 +163,9 @@ class TrickPinMgmt:
blk = slot.blank_slots
# bug workaround: don't use slot 10, in bootrom 3.1.4 and earlier
blk &= ~(1<<10)
if not version.has_qwerty:
# bug workaround: don't use slot 10, in Mk4 bootrom 3.1.4 and earlier
blk &= ~(1<<10)
return [i for i in range(NUM_TRICKS) if (1<<i & blk)]