UX: rename Ephemeral Seed to Temporary Seed
(cherry picked from commit 3784e1e007)
This commit is contained in:
parent
73fa603200
commit
28c0fb4516
@ -1,44 +0,0 @@
|
||||
# Ephemeral Seeds
|
||||
|
||||
Ephemeral seed is temporary secret mostly stored only in Coldcard volatile
|
||||
memory (RAM). Ephemeral seed can also be stored in `Seed Vault` (5.2.0+).
|
||||
It only survives single boot, meaning after Coldcard
|
||||
restart it is gone. Ephemeral seeds *completely* defeats the design
|
||||
of Coldcard's security model, based on secure elements.
|
||||
|
||||
Make sure you know what you're doing!
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
- go to `Advanced/Tools -> Ephemeral Seed`
|
||||
- if ephemeral seed is already in use, top menu item `[<xfp>]` is visible
|
||||
with fingerprint of ephemeral master secret
|
||||
- an ephemeral seed can be Imported or Generated at random
|
||||
- go to `Advanced/Tools -> Ephemeral Seed`
|
||||
- `Generate Words`:
|
||||
- same options as generating new seed words, dice rolls included
|
||||
- Import words via NFC with `Import via NFC` option
|
||||
- `Import Words`:
|
||||
- same options as importing seed words
|
||||
- `Import XPRV`:
|
||||
- import extended private key
|
||||
- `Tapsigner Backup`
|
||||
- import TAPSIGNER encrypted backup
|
||||
- an ephemeral seed can also be a BIP-85 derived value
|
||||
|
||||
## Trick PIN Notes
|
||||
|
||||
If you intend to use the ephemeral seed feature frequently, you can
|
||||
define a "Trick PIN" which takes you to a "look blank" trick wallet
|
||||
(ie. no seed set appears to be set). Then you may then safely
|
||||
unlock your Coldcard, without revealing the true PIN, and perform
|
||||
all your ephemeral seed work in that state.
|
||||
|
||||
## Purpose
|
||||
|
||||
This feature is intended for those one-off signings, like recovering
|
||||
a lost seed from some other system or importing some seed as an
|
||||
balance check. We do not recommend handing unencrypted seed material
|
||||
on a regular basis!
|
||||
|
||||
122
docs/temporary-seeds.md
Normal file
122
docs/temporary-seeds.md
Normal file
@ -0,0 +1,122 @@
|
||||
# Temporary Seeds
|
||||
|
||||
|
||||
[_(new in v5.0.7, requires Mk4)_](upgrade.md)
|
||||
|
||||
|
||||
Temporary seed (renamed in `5.2.0` from Ephemeral seed) is a temporary secret completely separate
|
||||
from the master seed, typically held in **COLDCARD<sup>®</sup>** RAM and
|
||||
not persisted between reboots in the Secure Element.
|
||||
Temporary seeds *completely* defeat the design
|
||||
of Coldcard's security model, based on secure elements.
|
||||
Enable the `Seed Vault` feature to store these secrets longer-term.
|
||||
Read more about `Seed Vault` feature below.
|
||||
|
||||
|
||||
!!! warning "Make sure you know what you're doing!"
|
||||
|
||||
This feature is intended for those one-off signings, like recovering
|
||||
a lost seed from some other system or importing some seed as a
|
||||
balance check. We do not recommend handing unencrypted seed material
|
||||
on a regular basis!
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
* if temporary seed is already in use, first home menu option `[<xfp>]` is visible with fingerprint of temporary master secret
|
||||
* go to `Advanced/Tools > Temporary Seed`
|
||||
|
||||
* temporary seed words can be Generated with TRNG
|
||||
- `Advanced/Tools > Temporary Seed > Generate Words`
|
||||
|
||||
* temporary seed words can be imported
|
||||
- `Advanced/Tools > Temporary Seed > Import Words`
|
||||
|
||||
* importing extended private keys
|
||||
- `Advanced/Tools > Temporary Seed > Import XPRV`
|
||||
- `Advanced/Tools > Temporary Seed > Tapsigner Backup`
|
||||
|
||||
* temporary seed can be activated from BIP-85 derived secrets - go to `Advanced/Tools > Derive Seed B85` and pick types of secret. Keep in mind that only word based and xprv based secrets can be used as temporary seed.
|
||||
- `12 words`
|
||||
- `18 words`
|
||||
- `24 words`
|
||||
- `XPRV (BIP-32)`
|
||||
- pick derivation `Index` in next prompt, or just press OK for index 0
|
||||
- Press (2) in next prompt to activate derived secret as a temporary seed
|
||||
|
||||
* temporary seed can be activated from Duress Wallet
|
||||
- go to `Settings -> Login Settings -> Trick Pins`
|
||||
- add new Duress Wallet trick pin and save it
|
||||
- choose newly created trick pin in trick pins menu and use `Activate Wallet` option
|
||||
|
||||
* temporary seed can be obtained from `SeedXOR`
|
||||
- go to `Advanced/Tools -> Danger Zone -> Seed Functions -> SeedXOR`
|
||||
- pick `Restore Seed XOR` option and provide all XOR parts
|
||||
- Press (2) to activate restored seed as temporary seed
|
||||
|
||||
* BIP-39 passphrase is from version `5.2.0` handled internally as temporary seed
|
||||
|
||||
|
||||
Ability to generate and use **Temporary seed** is available on Coldcard when:
|
||||
|
||||
1. no PIN chosen and no secret chosen (newly unpacked Coldcard)
|
||||
2. PIN set up but no secret chosen yet
|
||||
3. with both PIN and secret already picked
|
||||
|
||||
|
||||
# Restore Master
|
||||
|
||||
[_(new in v5.2.0, requires Mk4)_](upgrade.md)
|
||||
|
||||
From version `5.2.0` users no longer need to reboot COLDCARD to return
|
||||
to their "master seed" (one stored in SE2). Once COLDCARD has temporary
|
||||
seed active, first item in home menu is `[xfp]` and is a clone of `Ready To Sign`.
|
||||
Last item in home menu is `Restore Master`.
|
||||
|
||||
`Restore Master` offers two options. First, if user presses OK, COLDCARD wipes temporary seed settings
|
||||
and switches back to master seed and its settings.
|
||||
If user presses (1) temporary seed settings are preserved for later use and COLDCARD only switches
|
||||
back to master seed and its settings.
|
||||
|
||||
If current temporary seed is also saved in Seed Vault, option to wipe settings is not available.
|
||||
Seed Vault entries can only be deleted in Seed Vault menu.
|
||||
|
||||
|
||||
# Seed Vault
|
||||
|
||||
[_(new in v5.2.0, requires Mk4)_](upgrade.md)
|
||||
|
||||
Seed Vault adds the ability to store multiple temporary secrets into encrypted settings for simple
|
||||
recall and later use (AES-256-CTR encrypted with your master seed's key).
|
||||
Users can capture and hold master secret from any temporary seed source, including: TRNG, Dice Rolls,
|
||||
SeedXOR, TAPSIGNER backups, BIP-85 derived values, BIP-39 passphrase wallets.
|
||||
|
||||
## Enable Seed Vault
|
||||
|
||||
Enable this functionality in `Advanced/Tools -> Danger Zone -> Seed Vault -> Enable`.
|
||||
Once seed vault is enabled new menu item is visible in home menu `Seed Vault`.
|
||||
To disable Seed Vault user needs to remove all entries from Seed Vault first.
|
||||
|
||||
|
||||
## Add Seed to Vault
|
||||
|
||||
After `Seed Vault` is enabled, users will see a new prompt, after
|
||||
creation of temporary seed, asking whether to save this temporary
|
||||
seed to Seed Vault. Press (1) to save or any other key to ignore.
|
||||
|
||||
If option to save was chosen, confirmation prompt is shown - `Saved to seed vault.`
|
||||
|
||||
|
||||
## Seed Vault menu
|
||||
|
||||
* if Seed Vault is empty `(none saved yet)` is the first menu item followed by shortcut to `Temporary Seed` menu.
|
||||
* if not empty, saved seeds are listed in menu as `[xfp]`
|
||||
* if current active temporary seed is stored in Seed Vault - it has checkmark next to it
|
||||
* if temporary seed is active - last menu item of Seed Vault menu is `Restore Master`
|
||||
|
||||
## Seed Vault entry submenu
|
||||
|
||||
1. by default `[xfp]` but can be renamed to allow user labeling and leads to additional information about the seed
|
||||
2. `Use This Seed` allows to switch to the saved temporary seed. If it is already active `In Use` is shown instead.
|
||||
3. `Rename` allows to change 1. menu item to something personalized to user (limited to 40 characters)
|
||||
4. `Delete` allows to remove temporary seed from Seed Vault and optionally to completely wipe its settings.
|
||||
@ -109,7 +109,7 @@ Extended Master Key:
|
||||
if stash.bip39_passphrase:
|
||||
msg += '\nBIP-39 passphrase is in effect.\n'
|
||||
elif pa.tmp_value:
|
||||
msg += '\nEphemeral seed is in effect.\n'
|
||||
msg += '\nTemporary seed is in effect.\n'
|
||||
|
||||
bn = callgate.get_bag_number()
|
||||
if bn:
|
||||
@ -560,14 +560,14 @@ async def convert_ephemeral_to_master(*a):
|
||||
from stash import bip39_passphrase
|
||||
|
||||
if not pa.tmp_value:
|
||||
await ux_show_story('You do not have an active ephemeral seed (including BIP-39 passphrase)'
|
||||
await ux_show_story('You do not have an active temporary seed (including BIP-39 passphrase)'
|
||||
' right now, so this command does little except forget the seed words.'
|
||||
' It does not enhance security in any way.')
|
||||
return
|
||||
|
||||
words = settings.get("words", True)
|
||||
msg = 'Convert currently used '
|
||||
msg += 'BIP-39 passphrase ' if bip39_passphrase else 'ephemeral seed '
|
||||
msg += 'BIP-39 passphrase ' if bip39_passphrase else 'temporary seed '
|
||||
msg += 'to main seed. '
|
||||
if words or bip39_passphrase:
|
||||
msg += 'Main seed words themselves are erased forever, '
|
||||
@ -944,7 +944,7 @@ async def restore_main_secret(*a):
|
||||
msg = "Restore main wallet and its settings?\n\n"
|
||||
if not await in_seed_vault():
|
||||
msg += (
|
||||
"Press OK to forget current ephemeral wallet "
|
||||
"Press OK to forget current temporary wallet "
|
||||
"settings, or press (1) to save & keep "
|
||||
"those settings if same seed is later restored."
|
||||
)
|
||||
@ -1489,7 +1489,7 @@ async def nfc_recv_ephemeral(*A):
|
||||
try:
|
||||
await NFC.import_ephemeral_seed_words_nfc()
|
||||
except Exception as e:
|
||||
await ux_show_story(title="ERROR", msg="Failed to import ephemeral seed via NFC. %s" % str(e))
|
||||
await ux_show_story(title="ERROR", msg="Failed to import temporary seed via NFC. %s" % str(e))
|
||||
|
||||
|
||||
async def import_tapsigner_backup_file(_1, _2, item):
|
||||
|
||||
@ -1209,7 +1209,7 @@ class NewPassphrase(UserAuthorizedAction):
|
||||
'USB connection. Should we switch to that wallet now?\n\n')
|
||||
if pa.tmp_value and settings.get("words", True):
|
||||
escape += "1"
|
||||
msg += "Press (1) to add passphrase to currently active ephemeral seed. "
|
||||
msg += "Press (1) to add passphrase to currently active temporary seed. "
|
||||
|
||||
msg += ('Press (2) to view the provided passphrase.\n\n'
|
||||
'OK to continue, X to cancel.')
|
||||
|
||||
@ -251,7 +251,7 @@ async def make_complete_backup(fname_pattern='backup.7z', write_sflash=False):
|
||||
bypass_tmp = True
|
||||
|
||||
elif pa.tmp_value:
|
||||
if not await ux_confirm("An ephemeral seed is in effect, "
|
||||
if not await ux_confirm("An temporary seed is in effect, "
|
||||
"so backup will be of that seed."):
|
||||
return
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ still backed-up.''')
|
||||
msg = ('You have a BIP-39 passphrase set right now '
|
||||
'and so it will be wrapped into the new secret.')
|
||||
else:
|
||||
msg = 'You have an ephemeral seed - deriving from ephemeral.'
|
||||
msg = 'You have a temporary seed active - deriving from temporary.'
|
||||
|
||||
if not await ux_confirm(msg):
|
||||
return
|
||||
|
||||
@ -173,7 +173,7 @@ DevelopersMenu = [
|
||||
AdvancedVirginMenu = [ # No PIN, no secrets yet (factory fresh)
|
||||
# xxxxxxxxxxxxxxxx
|
||||
MenuItem("View Identity", f=view_ident),
|
||||
MenuItem("Ephemeral Seed", menu=make_ephemeral_seed_menu),
|
||||
MenuItem("Temporary Seed", menu=make_ephemeral_seed_menu),
|
||||
MenuItem('Upgrade Firmware', menu=UpgradeMenu),
|
||||
MenuItem('Paper Wallets', f=make_paper_wallet, predicate=lambda: make_paper_wallet),
|
||||
MenuItem('Perform Selftest', f=start_selftest),
|
||||
@ -183,7 +183,7 @@ AdvancedVirginMenu = [ # No PIN, no secrets yet (factory fresh)
|
||||
AdvancedPinnedVirginMenu = [ # Has PIN but no secrets yet
|
||||
# xxxxxxxxxxxxxxxx
|
||||
MenuItem("View Identity", f=view_ident),
|
||||
MenuItem("Ephemeral Seed", menu=make_ephemeral_seed_menu),
|
||||
MenuItem("Temporary Seed", menu=make_ephemeral_seed_menu),
|
||||
MenuItem("Upgrade Firmware", menu=UpgradeMenu),
|
||||
MenuItem("File Management", menu=FileMgmtMenu),
|
||||
MenuItem('Paper Wallets', f=make_paper_wallet, predicate=lambda: make_paper_wallet),
|
||||
@ -221,7 +221,7 @@ DangerZoneMenu = [
|
||||
MenuItem("I Am Developer.", menu=maybe_dev_menu),
|
||||
ToggleMenuItem('Seed Vault', 'seedvault', ['Default Off', 'Enable'],
|
||||
on_change=change_seed_vault,
|
||||
story=("Enable Seed Vault? Adds prompt to store ephemeral secrets "
|
||||
story=("Enable Seed Vault? Adds prompt to store temporary seeds "
|
||||
"into Seed Vault, where they can easily be reused later.\n\n"
|
||||
"WARNING: Seed Vault is encrypted (AES-256-CTR) by your seed,"
|
||||
" but not held directly inside secure elements. Backups are required"
|
||||
@ -270,7 +270,7 @@ AdvancedNormalMenu = [
|
||||
MenuItem("File Management", menu=FileMgmtMenu),
|
||||
MenuItem('Derive Seed B85', f=drv_entro_start),
|
||||
MenuItem("View Identity", f=view_ident),
|
||||
MenuItem("Ephemeral Seed", menu=make_ephemeral_seed_menu),
|
||||
MenuItem("Temporary Seed", menu=make_ephemeral_seed_menu),
|
||||
MenuItem('Paper Wallets', f=make_paper_wallet, predicate=lambda: make_paper_wallet),
|
||||
ToggleMenuItem('Enable HSM', 'hsmcmd', ['Default Off', 'Enable'],
|
||||
story="Enable HSM? Enables all user management commands, and other HSM-only USB commands. \
|
||||
|
||||
@ -141,9 +141,9 @@ class PassphraseSaver:
|
||||
if pa.tmp_value and settings.get("words", None):
|
||||
xfp = settings.get("xfp", None)
|
||||
title = "[%s]" % xfp2str(xfp)
|
||||
ch = await ux_show_story("Ephemeral wallet is active. Press (1)"
|
||||
ch = await ux_show_story("Temporary wallet is active. Press (1)"
|
||||
" to add passphrase to the current active"
|
||||
" ephemeral seed instead of the main seed.",
|
||||
" temporary seed instead of the main seed.",
|
||||
title=title, escape='1')
|
||||
if ch == '1':
|
||||
bypass_tmp = False
|
||||
|
||||
@ -447,8 +447,8 @@ async def add_seed_to_vault(encoded, meta=None):
|
||||
|
||||
xfp_ui = "[%s]" % new_xfp_str
|
||||
story = ("Press (1) to "
|
||||
"store ephemeral secret into Seed Vault. This way you can easily switch "
|
||||
"to this secret and use it as ephemeral seed in future.\n\nPress OK "
|
||||
"store temporary seed into Seed Vault. This way you can easily switch "
|
||||
"to this secret and use it as temporary seed in future.\n\nPress OK "
|
||||
"to continue without saving.")
|
||||
|
||||
ch = await ux_show_story(story, escape="1")
|
||||
@ -488,11 +488,11 @@ async def set_ephemeral_seed(encoded, chain=None, summarize_ux=True, bip39pw='',
|
||||
if xfp:
|
||||
xfp = "[" + xfp2str(xfp) + "]"
|
||||
if not applied:
|
||||
await ux_show_story(title=xfp, msg="Ephemeral master key already in use.")
|
||||
await ux_show_story(title=xfp, msg="Temporary master key already in use.")
|
||||
return
|
||||
|
||||
if summarize_ux:
|
||||
await ux_show_story(title=xfp, msg="New ephemeral master key is in effect now.")
|
||||
await ux_show_story(title=xfp, msg="New temporary master key is in effect now.")
|
||||
|
||||
return applied
|
||||
|
||||
@ -955,7 +955,7 @@ class SeedVaultMenu(MenuSystem):
|
||||
cur_xfp = xfp2str(settings.get("xfp", 0))
|
||||
if not seeds:
|
||||
rv.append(MenuItem('(none saved yet)'))
|
||||
rv.append(MenuItem("Ephemeral Seed", menu=make_ephemeral_seed_menu))
|
||||
rv.append(MenuItem("Temporary Seed", menu=make_ephemeral_seed_menu))
|
||||
else:
|
||||
for i, (xfp_str, encoded, name, meta) in enumerate(seeds):
|
||||
current_active = cur_xfp == xfp_str
|
||||
@ -1038,7 +1038,7 @@ async def make_ephemeral_seed_menu(*a):
|
||||
if (not pa.tmp_value) and (not settings.get("seedvault", False)):
|
||||
# force a warning on them, unless they are already doing it.
|
||||
ch = await ux_show_story(
|
||||
"Ephemeral seed is a temporary secret completely separate "
|
||||
"Temporary seed is a secret completely separate "
|
||||
"from the master seed, typically held in device RAM and "
|
||||
"not persisted between reboots in the Secure Element. "
|
||||
"Enable the Seed Vault feature to store these secrets longer-term."
|
||||
@ -1164,7 +1164,7 @@ class PassphraseMenu(MenuSystem):
|
||||
if pa.tmp_value and settings.get("words", True):
|
||||
# we have ephemeral seed but can add passphrase to it as it is word based
|
||||
msg1 = (", or press (2) to add passphrase to the current "
|
||||
"active ephemeral seed instead of the main seed.")
|
||||
"active temporary seed instead of the main seed.")
|
||||
|
||||
ch = await ux_show_story(msg + msg1, title="[%s]" % xfp2str(xfp), escape='12')
|
||||
if ch == 'x':
|
||||
|
||||
@ -34,7 +34,7 @@ def test_make_backup(multisig, goto_home, pick_menu_item, cap_story, need_keypre
|
||||
elif st == "eph":
|
||||
eph_seed = generate_ephemeral_words(num_words=24, dice=False, from_main=True)
|
||||
_, story = cap_story()
|
||||
assert "New ephemeral master key is in effect now." in story
|
||||
assert "New temporary master key is in effect now." in story
|
||||
need_keypress("y")
|
||||
|
||||
if multisig:
|
||||
@ -61,7 +61,7 @@ def test_make_backup(multisig, goto_home, pick_menu_item, cap_story, need_keypre
|
||||
assert "ignores passphrases and produces backup of main seed" in body
|
||||
assert "(2) to back-up BIP39 passphrase wallet" in body
|
||||
if st == "eph":
|
||||
assert "An ephemeral seed is in effect" in body
|
||||
assert "An temporary seed is in effect" in body
|
||||
assert "so backup will be of that seed" in body
|
||||
|
||||
need_keypress("y")
|
||||
@ -177,7 +177,7 @@ def test_backup_ephemeral_wallet(stype, pick_menu_item, need_keypress, goto_home
|
||||
pick_menu_item("Backup System")
|
||||
time.sleep(.1)
|
||||
title, story = cap_story()
|
||||
assert "An ephemeral seed is in effect" in story
|
||||
assert "An temporary seed is in effect" in story
|
||||
assert "so backup will be of that seed" in story
|
||||
need_keypress("y")
|
||||
time.sleep(.1)
|
||||
|
||||
@ -181,7 +181,7 @@ def test_lockdown(stype, pick_menu_item, set_bip39_pw, goto_home, cap_story,
|
||||
if stype:
|
||||
assert 'Are you SURE' in story
|
||||
else:
|
||||
assert 'do not have an active ephemeral seed' in story
|
||||
assert 'do not have an active temporary seed' in story
|
||||
need_keypress('x')
|
||||
return
|
||||
|
||||
@ -246,7 +246,7 @@ def test_bip39pass_on_ephemeral_seed(generate_ephemeral_words, import_ephemeral_
|
||||
seed0 = Mnemonic.to_seed(simulator_fixed_words, passphrase=passphrase)
|
||||
expect0 = BIP32Node.from_master_secret(seed0)
|
||||
assert expect0.fingerprint().hex().upper() == xfp0
|
||||
assert "press (2) to add passphrase to the current active ephemeral seed" in story
|
||||
assert "press (2) to add passphrase to the current active temporary seed" in story
|
||||
|
||||
if on_eph:
|
||||
need_keypress("2")
|
||||
@ -265,7 +265,7 @@ def test_bip39pass_on_ephemeral_seed(generate_ephemeral_words, import_ephemeral_
|
||||
title, story = cap_story()
|
||||
to_check = None
|
||||
if seed_vault:
|
||||
assert "Press (1) to store ephemeral secret into Seed Vault" in story
|
||||
assert "Press (1) to store temporary seed into Seed Vault" in story
|
||||
need_keypress("1")
|
||||
time.sleep(.2)
|
||||
title, story = cap_story()
|
||||
|
||||
@ -43,7 +43,7 @@ def derive_bip85_secret(goto_home, need_keypress, pick_menu_item, cap_story,
|
||||
need_keypress('y')
|
||||
time.sleep(0.1)
|
||||
title, story = cap_story()
|
||||
if "You have an ephemeral seed - deriving from ephemeral" in story:
|
||||
if "You have a temporary seed active - deriving from temporary" in story:
|
||||
need_keypress("y")
|
||||
|
||||
time.sleep(0.1)
|
||||
@ -127,7 +127,7 @@ def activate_bip85_ephemeral(need_keypress, cap_story, sim_exec, reset_seed_word
|
||||
|
||||
time.sleep(0.1)
|
||||
title, story = cap_story()
|
||||
if "Press (1) to store ephemeral secret into Seed Vault" in story:
|
||||
if "Press (1) to store temporary seed into Seed Vault" in story:
|
||||
if save_to_vault:
|
||||
need_keypress("1") # store to seed vault
|
||||
time.sleep(.2)
|
||||
@ -139,7 +139,7 @@ def activate_bip85_ephemeral(need_keypress, cap_story, sim_exec, reset_seed_word
|
||||
time.sleep(0.1)
|
||||
title, story = cap_story()
|
||||
|
||||
assert 'ephemeral master key is in effect now' in story
|
||||
assert 'temporary master key is in effect now' in story
|
||||
|
||||
encoded = sim_exec('from pincodes import pa; RV.write(repr(pa.fetch()))')
|
||||
print(encoded)
|
||||
|
||||
@ -105,11 +105,11 @@ def goto_eph_seed_menu(goto_home, pick_menu_item, cap_story, need_keypress):
|
||||
def _doit():
|
||||
goto_home()
|
||||
pick_menu_item("Advanced/Tools")
|
||||
pick_menu_item("Ephemeral Seed")
|
||||
pick_menu_item("Temporary Seed")
|
||||
|
||||
title, story = cap_story()
|
||||
if title == "WARNING":
|
||||
assert "Ephemeral seed is a temporary secret completely separate from the master seed" in story
|
||||
assert "Temporary seed is a secret completely separate from the master seed" in story
|
||||
assert "typically held in device RAM" in story
|
||||
assert "not persisted between reboots in the Secure Element." in story
|
||||
assert "Enable the Seed Vault feature to store these secrets longer-term." in story
|
||||
@ -146,10 +146,10 @@ def restore_main_seed(goto_home, pick_menu_item, cap_story, cap_menu,
|
||||
|
||||
assert "Restore main wallet and its settings?" in story
|
||||
if seed_vault:
|
||||
assert "Press OK to forget current ephemeral wallet " not in story
|
||||
assert "Press OK to forget current temporary wallet " not in story
|
||||
assert "settings, or press (1) to save & keep " not in story
|
||||
else:
|
||||
assert "Press OK to forget current ephemeral wallet " in story
|
||||
assert "Press OK to forget current temporary wallet " in story
|
||||
assert "settings, or press (1) to save & keep " in story
|
||||
assert "those settings if same seed is later restored." in story
|
||||
if preserve_settings:
|
||||
@ -183,7 +183,7 @@ def verify_ephemeral_secret_ui(cap_story, need_keypress, cap_menu, dev, fake_txn
|
||||
in_effect_xfp = title[1:-1]
|
||||
if expected_xfp is not None:
|
||||
assert in_effect_xfp == expected_xfp
|
||||
assert 'ephemeral master key is in effect now' in story in story
|
||||
assert 'temporary master key is in effect now' in story in story
|
||||
need_keypress("y") # just confirm new master key message
|
||||
|
||||
menu = cap_menu()
|
||||
@ -246,10 +246,10 @@ def verify_ephemeral_secret_ui(cap_story, need_keypress, cap_menu, dev, fake_txn
|
||||
ident_xfp = ident_story.split("\n\n")[1].strip()
|
||||
if sv_wipe and seed_vault:
|
||||
# we had to wipe the settings so we're back in main wallet
|
||||
assert "Ephemeral seed is in effect" not in ident_story
|
||||
assert "Temporary seed is in effect" not in ident_story
|
||||
assert ident_xfp == xfp2str(simulator_fixed_xfp)
|
||||
else:
|
||||
assert "Ephemeral seed is in effect" in ident_story
|
||||
assert "Temporary seed is in effect" in ident_story
|
||||
assert ident_xfp == in_effect_xfp
|
||||
|
||||
if mnemonic:
|
||||
@ -324,7 +324,7 @@ def generate_ephemeral_words(goto_eph_seed_menu, pick_menu_item,
|
||||
if seed_vault:
|
||||
time.sleep(0.1)
|
||||
_, story = cap_story()
|
||||
assert "Press (1) to store ephemeral secret into Seed Vault" in story
|
||||
assert "Press (1) to store temporary seed into Seed Vault" in story
|
||||
need_keypress("1") # store it
|
||||
need_keypress("y") # confirm saved to Seed Vault
|
||||
|
||||
@ -407,7 +407,7 @@ def import_ephemeral_xprv(microsd_path, virtdisk_path, goto_eph_seed_menu,
|
||||
if seed_vault:
|
||||
time.sleep(.1)
|
||||
_, story = cap_story()
|
||||
assert "Press (1) to store ephemeral secret into Seed Vault" in story
|
||||
assert "Press (1) to store temporary seed into Seed Vault" in story
|
||||
need_keypress("1") # store it
|
||||
need_keypress("y") # confirm saved to Seed Vault
|
||||
|
||||
@ -484,7 +484,7 @@ def test_ephemeral_seed_import_words(nfc, truncated, num_words, cap_menu, pick_m
|
||||
if seed_vault:
|
||||
time.sleep(.1)
|
||||
_, story = cap_story()
|
||||
assert "Press (1) to store ephemeral secret into Seed Vault" in story
|
||||
assert "Press (1) to store temporary seed into Seed Vault" in story
|
||||
need_keypress("1") # store it
|
||||
need_keypress("y") # confirm saved to Seed Vault
|
||||
|
||||
@ -563,7 +563,7 @@ def test_ephemeral_seed_import_tapsigner(way, testnet, pick_menu_item, cap_story
|
||||
if seed_vault:
|
||||
time.sleep(.1)
|
||||
_, story = cap_story()
|
||||
assert "Press (1) to store ephemeral secret into Seed Vault" in story
|
||||
assert "Press (1) to store temporary seed into Seed Vault" in story
|
||||
need_keypress("1") # store it
|
||||
need_keypress("y") # confirm saved to Seed Vault
|
||||
|
||||
@ -706,12 +706,12 @@ def test_activate_current_tmp_secret(reset_seed_words, goto_eph_seed_menu,
|
||||
time.sleep(0.3)
|
||||
title, story = cap_story()
|
||||
if seed_vault:
|
||||
assert "Press (1) to store ephemeral secret into Seed Vault" in story
|
||||
assert "Press (1) to store temporary seed into Seed Vault" in story
|
||||
# do not save
|
||||
need_keypress("y")
|
||||
time.sleep(0.2)
|
||||
title, story = cap_story()
|
||||
assert 'ephemeral master key is in effect now' in story
|
||||
assert 'temporary master key is in effect now' in story
|
||||
|
||||
in_effect_xfp = title[1:-1]
|
||||
need_keypress("y")
|
||||
@ -725,13 +725,13 @@ def test_activate_current_tmp_secret(reset_seed_words, goto_eph_seed_menu,
|
||||
time.sleep(0.2)
|
||||
title, story = cap_story()
|
||||
if seed_vault:
|
||||
assert "Press (1) to store ephemeral secret into Seed Vault" in story
|
||||
assert "Press (1) to store temporary seed into Seed Vault" in story
|
||||
# do not save
|
||||
need_keypress("y")
|
||||
time.sleep(0.2)
|
||||
title, story = cap_story()
|
||||
|
||||
assert "Ephemeral master key already in use" in story
|
||||
assert "Temporary master key already in use" in story
|
||||
already_used_xfp = title[1:-1]
|
||||
assert already_used_xfp == in_effect_xfp == expected_xfp
|
||||
need_keypress("y")
|
||||
@ -818,7 +818,7 @@ def test_seed_vault_menus(dev, data, settings_set, settings_get, pick_menu_item,
|
||||
time.sleep(.1)
|
||||
title, story = cap_story()
|
||||
assert xfp in title
|
||||
assert 'ephemeral master key is in effect now' in story
|
||||
assert 'temporary master key is in effect now' in story
|
||||
need_keypress("y")
|
||||
active = get_seed_value_ux()
|
||||
if mnemonic:
|
||||
@ -831,7 +831,7 @@ def test_seed_vault_menus(dev, data, settings_set, settings_get, pick_menu_item,
|
||||
assert node.secret_exponent() == int(pk.hex(), 16)
|
||||
|
||||
istory = get_identity_story()
|
||||
assert "Ephemeral seed is in effect" in istory
|
||||
assert "Temporary seed is in effect" in istory
|
||||
|
||||
ident_xfp = istory.split("\n\n")[1].strip()
|
||||
assert ident_xfp == xfp
|
||||
@ -943,7 +943,7 @@ def test_seed_vault_captures(request, dev, settings_set, settings_get, pick_menu
|
||||
time.sleep(0.1)
|
||||
|
||||
title, story = cap_story()
|
||||
assert 'New ephemeral master key' in story
|
||||
assert 'New temporary master key' in story
|
||||
assert 'power down' not in story
|
||||
assert xfp in title
|
||||
need_keypress("y") # confirm activation of ephemeral secret
|
||||
|
||||
@ -557,7 +557,7 @@ def test_ux_duress_choices(with_wipe, subchoice, expect, xflags, xargs,
|
||||
time.sleep(.1)
|
||||
if stop_after_activated: return
|
||||
_, story = cap_story()
|
||||
assert 'ephemeral master key is in effect now' in story
|
||||
assert 'temporary master key is in effect now' in story
|
||||
|
||||
xp = repl.eval("settings.get('xpub')")
|
||||
assert xp == wallet.hwif(as_private=False)
|
||||
@ -836,7 +836,7 @@ def build_duress_wallets(request, seed_vault=False):
|
||||
with_wipe=False, stop_after_activated=True, **args)
|
||||
time.sleep(.1)
|
||||
_, story = cap_story()
|
||||
assert '(1) to store ephemeral secret' in story
|
||||
assert '(1) to store temporary seed' in story
|
||||
need_keypress('1')
|
||||
time.sleep(.1)
|
||||
_, story = cap_story()
|
||||
@ -845,7 +845,7 @@ def build_duress_wallets(request, seed_vault=False):
|
||||
need_keypress('y')
|
||||
time.sleep(0.1)
|
||||
_, story = cap_story()
|
||||
assert 'ephemeral master key is in effect now' in story
|
||||
assert 'temporary master key is in effect now' in story
|
||||
need_keypress("y")
|
||||
|
||||
# re-login to reset to normal seed
|
||||
|
||||
@ -127,7 +127,7 @@ def restore_seed_xor(set_seed_words, goto_home, pick_menu_item, cap_story,
|
||||
time.sleep(0.01)
|
||||
title, body = cap_story()
|
||||
|
||||
assert 'New ephemeral master key is in effect now' in body
|
||||
assert 'New temporary master key is in effect now' in body
|
||||
need_keypress("y")
|
||||
assert get_secrets()['mnemonic'] == expect
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user