|
|
@ -151,10 +151,10 @@ class TestSlip39(unittest.TestCase):
|
|
|
|
check(BackupType.Slip39_Advanced, ["ocean"])
|
|
|
|
check(BackupType.Slip39_Advanced, ["ocean"])
|
|
|
|
|
|
|
|
|
|
|
|
# if backup type is not set we can not do any checks
|
|
|
|
# if backup type is not set we can not do any checks
|
|
|
|
self.assertIsNone(check(None, ["ocean"]))
|
|
|
|
check(None, ["ocean"])
|
|
|
|
|
|
|
|
|
|
|
|
# BIP-39 has no "on-the-fly" checks
|
|
|
|
# BIP-39 has no "on-the-fly" checks
|
|
|
|
self.assertIsNone(check(BackupType.Bip39, ["ocean"]))
|
|
|
|
check(BackupType.Bip39, ["ocean"])
|
|
|
|
|
|
|
|
|
|
|
|
# let's store two shares in the storage
|
|
|
|
# let's store two shares in the storage
|
|
|
|
secret, share = process_slip39("trash smug adjust ambition criminal prisoner security math cover pecan response pharmacy center criminal salary elbow bracelet lunar briefing dragon")
|
|
|
|
secret, share = process_slip39("trash smug adjust ambition criminal prisoner security math cover pecan response pharmacy center criminal salary elbow bracelet lunar briefing dragon")
|
|
|
@ -170,6 +170,10 @@ class TestSlip39(unittest.TestCase):
|
|
|
|
with self.assertRaises(IdentifierMismatch):
|
|
|
|
with self.assertRaises(IdentifierMismatch):
|
|
|
|
check(BackupType.Slip39_Advanced, ["trash", "slush"])
|
|
|
|
check(BackupType.Slip39_Advanced, ["trash", "slush"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# same identifier but different group settings for Slip 39 Basic
|
|
|
|
|
|
|
|
with self.assertRaises(IdentifierMismatch):
|
|
|
|
|
|
|
|
check(BackupType.Slip39_Basic, ["trash", "smug", "slush"])
|
|
|
|
|
|
|
|
|
|
|
|
# same mnemonic found out using the index
|
|
|
|
# same mnemonic found out using the index
|
|
|
|
with self.assertRaises(AlreadyAdded):
|
|
|
|
with self.assertRaises(AlreadyAdded):
|
|
|
|
check(BackupType.Slip39_Advanced, ["trash", "smug", "adjust", "ambition"])
|
|
|
|
check(BackupType.Slip39_Advanced, ["trash", "smug", "adjust", "ambition"])
|
|
|
|