fixup! fixup! feat(core): add ability to request backups with any number of groups/shares.

Ioan Bizău 2 weeks ago
parent 39e10c48c0
commit 25e9198da0

@ -58,8 +58,8 @@ MNEMONIC_SLIP39_ADVANCED_33 = [
"wildlife deal beard romp alcohol space mild usual clothes union nuclear testify course research heat listen task location thank hospital slice smell failure fawn helpful priest ambition average recover lecture process dough stadium",
"wildlife deal acrobat romp anxiety axis starting require metric flexible geology game drove editor edge screw helpful have huge holy making pitch unknown carve holiday numb glasses survive already tenant adapt goat fangs",
]
MNEMONIC_SLIP39_CUSTOM_20_1of1 = ["tolerate flexible academic academic average dwarf square home promise aspect temple cluster roster forward hand unfair tenant emperor ceramic element forget perfect knit adapt review usual formal receiver typical pleasure duke yield party"]
MNEMONIC_SLIP39_CUSTOM_20_SECRET = "3439316237393562383066633231636364663436366330666263393863386663"
MNEMONIC_SLIP39_CUSTOM_1of1 = ["tolerate flexible academic academic average dwarf square home promise aspect temple cluster roster forward hand unfair tenant emperor ceramic element forget perfect knit adapt review usual formal receiver typical pleasure duke yield party"]
MNEMONIC_SLIP39_CUSTOM_SECRET = "3439316237393562383066633231636364663436366330666263393863386663"
# External entropy mocked as received from trezorlib.
EXTERNAL_ENTROPY = b"zlutoucky kun upel divoke ody" * 2
# fmt: on

@ -26,8 +26,8 @@ from ..common import (
MNEMONIC12,
MNEMONIC_SLIP39_ADVANCED_20,
MNEMONIC_SLIP39_BASIC_20_3of6,
MNEMONIC_SLIP39_CUSTOM_20_1of1,
MNEMONIC_SLIP39_CUSTOM_20_SECRET,
MNEMONIC_SLIP39_CUSTOM_1of1,
MNEMONIC_SLIP39_CUSTOM_SECRET,
)
from ..input_flows import (
InputFlowBip39Backup,
@ -115,7 +115,7 @@ def test_backup_slip39_advanced(client: Client, click_info: bool):
@pytest.mark.skip_t1b1
@pytest.mark.setup_client(needs_backup=True, mnemonic=MNEMONIC_SLIP39_CUSTOM_20_1of1[0])
@pytest.mark.setup_client(needs_backup=True, mnemonic=MNEMONIC_SLIP39_CUSTOM_1of1[0])
@pytest.mark.parametrize(
"share_threshold,share_count",
[(1, 1), (2, 2), (3, 5)],
@ -138,7 +138,7 @@ def test_backup_slip39_custom(client: Client, share_threshold, share_count):
assert client.features.no_backup is False
assert len(IF.mnemonics) == share_count
assert shamir.combine_mnemonics(IF.mnemonics[-share_threshold:]).hex() == MNEMONIC_SLIP39_CUSTOM_20_SECRET
assert shamir.combine_mnemonics(IF.mnemonics[-share_threshold:]).hex() == MNEMONIC_SLIP39_CUSTOM_SECRET
# we only test this with bip39 because the code path is always the same

@ -835,7 +835,9 @@
"T3T1_en_test_autolock.py::test_dryrun_enter_word_slowly": "be557c3e4e0492d0b884d4ed549d3ae18e6175b74b5945e7ab6f2f96aab58748",
"T3T1_en_test_autolock.py::test_dryrun_locks_at_number_of_words": "700aa42142055535b4123d84f6d307a0589b43600c2dec525312d06c2af9aa18",
"T3T1_en_test_autolock.py::test_dryrun_locks_at_word_entry": "736652b5298a7a4ee2e51282323d1150c9844b6f7b738f421ac4ad3a83d0788d",
"T3T1_en_test_backup_slip39_single.py::test_backup_slip39_single[1of1]": "b13e22bddd80296bb0d08dff4bc94dad287c40247045eb779b88ba5c53050507",
"T3T1_en_test_backup_slip39_custom.py::test_backup_slip39_custom[1of1]": "b13e22bddd80296bb0d08dff4bc94dad287c40247045eb779b88ba5c53050507",
"T3T1_en_test_backup_slip39_custom.py::test_backup_slip39_custom[2of3]": "ebab6dc1bbf5648693ff34ffece0b67d829d44ac03a751c72dcf623b2cd2c8ba",
"T3T1_en_test_backup_slip39_custom.py::test_backup_slip39_custom[5of5]": "aadf5b948d034af305b275fd0d837619b8f133039b4ed431fa31fd65cc2e143e",
"T3T1_en_test_lock.py::test_hold_to_lock": "9d60d7aa2fbe6a0de14379e02ea825fbf9e21471596498f7be686f2538391f1d",
"T3T1_en_test_passphrase_tt.py::test_cycle_through_last_character": "2a8d54c8014cc0c1bf46c0e4b58d6a002009b62aa8b92db663f88af0ad2f5e19",
"T3T1_en_test_passphrase_tt.py::test_passphrase_click_same_button_many_times": "6a579067b4395a260d173e78643b67ac701304ea833a112cb2da1bce94cbb102",
@ -5102,9 +5104,9 @@
"T3T1_en_test_msg_backup_device.py::test_backup_slip39_advanced[no_click_info]": "31f143785472dad5adc46df21cf80ae3210c30c22fc719d9f56446d1915a36e8",
"T3T1_en_test_msg_backup_device.py::test_backup_slip39_basic[click_info]": "63db4c01cc1abddf73ece3c61d9d0de6bfd6499559e01bc58c2981f416a922f8",
"T3T1_en_test_msg_backup_device.py::test_backup_slip39_basic[no_click_info]": "f1cab327533697803793725144e42200106e05f1d81b75ff0a8eb55453a37dfa",
"T3T1_en_test_msg_backup_device.py::test_backup_slip39_custom[2_of_2]": "02784e05be37613bbd41836a18e57378dbd4b1e031864c4da0f63c72eb1cb156",
"T3T1_en_test_msg_backup_device.py::test_backup_slip39_custom[1_of_1]": "4a8e597346e174c32b2e6a3667c6c236b076f1ff28400586ab3b069ac6c7ce0f",
"T3T1_en_test_msg_backup_device.py::test_backup_slip39_custom[3_of_5]": "0a4d6ee5ad699483dfd7ecef83829c64e95b958e9ad8be04e76ce0c2db5cdd9a",
"T3T1_en_test_msg_backup_device.py::test_backup_slip39_custom[2_of_2]": "b0c0eccecc9e7a84ce9af7fca76d6edce2b1fd0ea48b41354cd0a2f31b8ff604",
"T3T1_en_test_msg_backup_device.py::test_backup_slip39_custom[1_of_1]": "8e6156bc4caf5f75de7c164844de9405e6c08bb74352dc6976a8d93dbc994e53",
"T3T1_en_test_msg_backup_device.py::test_backup_slip39_custom[3_of_5]": "61014a41b3c84831b6c82d0d3f8527452fed48f52cde4737b66f62a72bac3d5e",
"T3T1_en_test_msg_backup_device.py::test_interrupt_backup_fails": "ae147498028d68aa71c7337544e4a5049c4c943897f905c6fe29e88e5c3ab056",
"T3T1_en_test_msg_backup_device.py::test_no_backup_fails": "fada9d38ec099b3c6a4fd8bf994bb1f3431e40085128b4e0cd9deb8344dec53e",
"T3T1_en_test_msg_backup_device.py::test_no_backup_show_entropy_fails": "c47cfc38ee8a29b79808336a6f99b037f4a760b907bb9c680a554f92a194d262",
@ -8134,7 +8136,9 @@
"TR_en_test_autolock.py::test_dryrun_enter_word_slowly": "f35d159c13b36c428e68969bbeb87fb4bdbfa6c21eb98985b5832849938d6934",
"TR_en_test_autolock.py::test_dryrun_locks_at_number_of_words": "df7a17ab9cd2c617ce22a615e1da9bedee41f978459cbe103f2eecb8dfe8db12",
"TR_en_test_autolock.py::test_dryrun_locks_at_word_entry": "53b39b3ff0548a91e87ac3391462850e4f6060fa1a19ae873eca6fc5cce8dbb2",
"TR_en_test_backup_slip39_single.py::test_backup_slip39_single[1of1]": "9e620acfff4ef1442996b81c1fd9c73d20490c2deecc6bc05aa0b665d9cd217c",
"TR_en_test_backup_slip39_custom.py::test_backup_slip39_custom[1of1]": "9e620acfff4ef1442996b81c1fd9c73d20490c2deecc6bc05aa0b665d9cd217c",
"TR_en_test_backup_slip39_custom.py::test_backup_slip39_custom[2of3]": "aa0d1382ef0f2e16e24d0afbd25a105f572cd4f17d91dd44ca6a3f46a60bf6c4",
"TR_en_test_backup_slip39_custom.py::test_backup_slip39_custom[5of5]": "5586a21ef466d85077021c289690f22afe787445523b29900f49ec03468598d8",
"TR_en_test_lock.py::test_hold_to_lock": "83e2d055215b03150069d9fcb3aee6dc3f78a0d2bc43d8133425bf6b000c191d",
"TR_en_test_passphrase_tr.py::test_cancel": "4a79e82b3ddf23c087e70767f2c4d4720f980370e22be209189d4ed42a453ee8",
"TR_en_test_passphrase_tr.py::test_passphrase_delete": "28468562292a54f2d8cc954129c6b1859c267bc5a9b94f9b406352e71a4c8036",
@ -15211,7 +15215,9 @@
"TT_en_test_autolock.py::test_dryrun_enter_word_slowly": "140ff1c01d0d27ade29e88af481a9a24385fbe01058bdbf35f2fa20c19e0c386",
"TT_en_test_autolock.py::test_dryrun_locks_at_number_of_words": "f9a5c8f92ca3b0b9545a9a5b3cf8df4de9943fbe45de113aa6f970d60b3b9b49",
"TT_en_test_autolock.py::test_dryrun_locks_at_word_entry": "2ea54adc6df443f758a6395b6b443fbfe5931cbd62a321504de9ae453aff8ca8",
"TT_en_test_backup_slip39_single.py::test_backup_slip39_single[1of1]": "6c33232fdff24175a489c83507bcde9bd859cc2d7f1ca687e154befd0cd2b883",
"TT_en_test_backup_slip39_custom.py::test_backup_slip39_custom[1of1]": "6c33232fdff24175a489c83507bcde9bd859cc2d7f1ca687e154befd0cd2b883",
"TT_en_test_backup_slip39_custom.py::test_backup_slip39_custom[2of3]": "20bdb47f4150af61b2a64927f7df2f49fedf9d02442d103c2833bddcc57f9f93",
"TT_en_test_backup_slip39_custom.py::test_backup_slip39_custom[5of5]": "97fb33be7f98498b0acfcade1e5333475c9e6dce131ca7bdde3a54cf72c595fe",
"TT_en_test_lock.py::test_hold_to_lock": "a5739f92ae28fc57769e444408ce5b58223d0d33b368022ef78ea68e0f8c9b80",
"TT_en_test_passphrase_tt.py::test_cycle_through_last_character": "2a8d54c8014cc0c1bf46c0e4b58d6a002009b62aa8b92db663f88af0ad2f5e19",
"TT_en_test_passphrase_tt.py::test_passphrase_click_same_button_many_times": "6a579067b4395a260d173e78643b67ac701304ea833a112cb2da1bce94cbb102",
@ -19604,9 +19610,9 @@
"TT_en_test_msg_backup_device.py::test_backup_slip39_advanced[no_click_info]": "4f13e0550f8e06481fd4f59d722d3893ea904f85fb20ec8018344347492aff1c",
"TT_en_test_msg_backup_device.py::test_backup_slip39_basic[click_info]": "b432bf3671b15fdcfb92113fcef0e95671c3d7beaae70b25a87d090d30f9a079",
"TT_en_test_msg_backup_device.py::test_backup_slip39_basic[no_click_info]": "4a6f3fdd5d7ae36e6b5ad84faa5385565fd13f4ce3f7d915fa16c2184f99ebbd",
"TT_en_test_msg_backup_device.py::test_backup_slip39_custom[2_of_2]": "eab39f646e9e45d4c6db01bd89f3b0ffbb651910e11786fb98b85b9b2d341f6b",
"TT_en_test_msg_backup_device.py::test_backup_slip39_custom[1_of_1]": "d0aae400aee9b006e98d0302bf5175cda95dc5302b80d83bf199e1b619ad3621",
"TT_en_test_msg_backup_device.py::test_backup_slip39_custom[3_of_5]": "bf6defdfed3a06c0ae27d88ae2c8ea1196af45527cf3207515fa06b8dea672b2",
"TT_en_test_msg_backup_device.py::test_backup_slip39_custom[2_of_2]": "53788010ec0f9c81ea07828ae32425c3d38a1d35789aa91d3163e117fa2cbe99",
"TT_en_test_msg_backup_device.py::test_backup_slip39_custom[1_of_1]": "e17b49d05f231444684b0ebad638456b4b6d7b0ae195180778c3f687b7d0ca7d",
"TT_en_test_msg_backup_device.py::test_backup_slip39_custom[3_of_5]": "ebc007c9801856ad27dd6332b7dc5413189191268e10fcf5604203b75d8c52ed",
"TT_en_test_msg_backup_device.py::test_interrupt_backup_fails": "ae147498028d68aa71c7337544e4a5049c4c943897f905c6fe29e88e5c3ab056",
"TT_en_test_msg_backup_device.py::test_no_backup_fails": "fada9d38ec099b3c6a4fd8bf994bb1f3431e40085128b4e0cd9deb8344dec53e",
"TT_en_test_msg_backup_device.py::test_no_backup_show_entropy_fails": "001377ce61dcd189e6a9d17e20dcd71130e951dc3314b40ff26f816bd9355bdd",

Loading…
Cancel
Save