mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 09:28:13 +00:00
use TREZOR as passphrase to check protection
This commit is contained in:
parent
1c9046b66d
commit
6939275362
98
tests.c
98
tests.c
@ -295,76 +295,76 @@ START_TEST(test_mnemonic)
|
|||||||
static const char *vectors[] = {
|
static const char *vectors[] = {
|
||||||
"00000000000000000000000000000000",
|
"00000000000000000000000000000000",
|
||||||
"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about",
|
"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about",
|
||||||
"6ca6a10baeaeff4b9b2e0dbc9f880dd8428c61168caa8cdf57234e87b7ace148ee4531ef37d518439c42392ee3878f74efec1d677b0327bca7378bfd009722a1",
|
"cb5e7230ce8229de990674f6aa4288325fd4d8181f761734bd8b5cc944fedc2a4300e64422864b565352de7ffbc5ad0fafdf5344489f3a83e4a4bb5271cafaae",
|
||||||
"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f",
|
"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f",
|
||||||
"legal winner thank year wave sausage worth useful legal winner thank yellow",
|
"legal winner thank year wave sausage worth useful legal winner thank yellow",
|
||||||
"f0eee1f28591edfad85f47ccd64f1ba18c9b3d31d5c28bf05f296f323ffd22c94edfdbe9494a094d96e8099adb80cdcc4e6b564e04ee38515d35b3d6fb9b91be",
|
"de1277934939d6969519f44b7b3757a905d7f635be41e1e88022c346bc52ad26c0a3e9578e73e9b89066873266f285a5891d27d28cb27fccfe26d92bbd7ee364",
|
||||||
"80808080808080808080808080808080",
|
"80808080808080808080808080808080",
|
||||||
"letter advice cage absurd amount doctor acoustic avoid letter advice cage above",
|
"letter advice cage absurd amount doctor acoustic avoid letter advice cage above",
|
||||||
"14949034b83876cc10b4624c2f7489499c68df72aeea503195ef2cb1686c1767fe41b854fbb0ac2596e4ba8235c27395297039578d5e7b4921e5bf7eafe28a27",
|
"8863bccef9cfffeacef1e4c6fc97bba8227ab0fc7e8e162be7467282689a13521ea364d7c4bc8cd241b59f53c5147a89c18a47248a96592ab9a2c1f1870b026c",
|
||||||
"ffffffffffffffffffffffffffffffff",
|
"ffffffffffffffffffffffffffffffff",
|
||||||
"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong",
|
"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong",
|
||||||
"d430f6f2fd8573c2aac937cb5eb88486cce4fd06a4c632bc58b8b24f60697e2a158e3e51290360175b38c71ca90971cbcfa26049c1cb14f3d44e031d8d18e634",
|
"7a29e57c7a1532af1bddb7e02b892cfccc6a57b74fe9784324ea89fab8a66dc64fde79c31166b159685116f4e93c1795496f20ffdc2d3a69d3439931dabde86e",
|
||||||
"000000000000000000000000000000000000000000000000",
|
"000000000000000000000000000000000000000000000000",
|
||||||
"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon agent",
|
"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon agent",
|
||||||
"6836b4fb07e82f99f157d5abec7a6bc3fae25e6aaed44b547b6e64d9bfae955cde245db6b06decb2429b5c5f849563108d7f799734b6cfb86f797c1c74d20cca",
|
"c3e382025b6a22a901505cf393faea450eb6c4a5f2a8c8f0596285b2bd84688877a6cc7231420e2bbdd2428e62ed549a78fa215b3adafd8dea075dabfc704d5e",
|
||||||
"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f",
|
"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f",
|
||||||
"legal winner thank year wave sausage worth useful legal winner thank year wave sausage worth useful legal will",
|
"legal winner thank year wave sausage worth useful legal winner thank year wave sausage worth useful legal will",
|
||||||
"6b5d7995263e58421531e0c9c4084c0d5738bc2eef5306cc267e496f263256aa93f0adb51ab92b26bfaf00d448e896f8564fca91e66b7cfb2ac2c7cb1e59cb0f",
|
"c82666e40eb097bf6eb05fecd7dc2ddfb6bbdc6071900f4b3fd3c3e635db69aa2094f1f450c98e8dc6103aa72df635abdfcc3b6d6ec5261a9208a07a35a3f1c8",
|
||||||
"808080808080808080808080808080808080808080808080",
|
"808080808080808080808080808080808080808080808080",
|
||||||
"letter advice cage absurd amount doctor acoustic avoid letter advice cage absurd amount doctor acoustic avoid letter always",
|
"letter advice cage absurd amount doctor acoustic avoid letter advice cage absurd amount doctor acoustic avoid letter always",
|
||||||
"f3e672575342c0c0544593f76706214ab6e78098e9632b979807b1d3e0632fee8661146f740289036a831311b4e28c11601d29aec0e52ca4ee19476a0e03231e",
|
"e90681c67c55504afadca009ce4042819341fa0e90300b6d32b4f2e8e8a6678ff7e7fc1da663ae194dc7a2ef7ec7b50112d1a5efce47bfd00c66eec82f2265b5",
|
||||||
"ffffffffffffffffffffffffffffffffffffffffffffffff",
|
"ffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||||
"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo when",
|
"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo when",
|
||||||
"1a4e1e5532e8d34da0c4e225745840af7f80b6e22adf9443b424965deeab3e287a45f4ccfbc6b0a4ae9945bfd0eccef65ddb05115ff6829f051cb58e2ce02227",
|
"2a372547df962742942674170a7cef495ea0b97f4864de16d0f3ee82eb577ca1eca345e601cc2df7c626c5bc51c52c28a3b4294224b685c958c7450bee6769e6",
|
||||||
"0000000000000000000000000000000000000000000000000000000000000000",
|
"0000000000000000000000000000000000000000000000000000000000000000",
|
||||||
"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art",
|
"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art",
|
||||||
"aae9cdd3667c7ab3169bc755c868f65980ae5cc02ab57fcea08e43b3d1652c4da748dfcaacc707f146e785e0c75fdd2935c99db986703a24ffc5961158f67c23",
|
"58cb9c5555d67ecc7b32305a78d1a2fcf0c9b22f1af761cfafc65eb1d3909f63ee2cab84996a7478cfd3e864cda5efb0caf580d56cf49739c6b3638d94e758c1",
|
||||||
"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f",
|
"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f",
|
||||||
"legal winner thank year wave sausage worth useful legal winner thank year wave sausage worth useful legal winner thank year wave sausage worth title",
|
"legal winner thank year wave sausage worth useful legal winner thank year wave sausage worth useful legal winner thank year wave sausage worth title",
|
||||||
"217b6d8b54552deb05701e1f7478431f528e82e590bf68cd8c6236fb9c2fa16bbb9d759fa68cb8e3f17a0525596de2c645aee8a2b0b071d78411d2147fdef443",
|
"0093cb3ed6d1302d3cf498017f8cb1c7dc2fdbd62ec57fc49e4b2a4dd47a23e44e0b309517d5a3e7b0f4f0ef0ed132818cf120a098a92e572ad086f1a90ccb7f",
|
||||||
"8080808080808080808080808080808080808080808080808080808080808080",
|
"8080808080808080808080808080808080808080808080808080808080808080",
|
||||||
"letter advice cage absurd amount doctor acoustic avoid letter advice cage absurd amount doctor acoustic avoid letter advice cage absurd amount doctor acoustic bless",
|
"letter advice cage absurd amount doctor acoustic avoid letter advice cage absurd amount doctor acoustic avoid letter advice cage absurd amount doctor acoustic bless",
|
||||||
"d5432ff9f0a0dc85373635a658056b04b8ad96069c79c953151de03496c81f772301acbd1b4bc87f0ef07fdcf070ea7384c1c86ec324fab11ac8851d7bc7122f",
|
"8a21e46b9d264328c63e707e3d38ed4eb21508deda309fa2ef57cc8eca8b351ca3018758844ba9fb5851bab15d026a61cabace53a9a39bc91dc2c51407542cf5",
|
||||||
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||||
"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo vote",
|
"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo vote",
|
||||||
"faed83f0823ee9958d35e9514b497729776f675ce5ce7a14d1ab47efc70d71bc7bad208c3df16ab0cce19ec2ad115fe78c93d4245028f82215c0d278616c07e7",
|
"5c8a1a284ab2844daf02cab322df3996574c9d53cbd36159c493441990f0d2a6bc9bc1502e3a067943d8ec67324663cbfb9667b57fed220e3f28335e26a90f93",
|
||||||
"b4950b98f22cdff09bd809960771012b",
|
"1083fa24dbb0afa4e7b327d23f666567",
|
||||||
"region portion tower tone social weapon hunt abuse noodle describe doctor fit",
|
"awesome cabin matrix resist april sponsor paddle gossip split will off soon",
|
||||||
"8917cbe312d2122616df35a4f92cc81c67063200acd2ac530502e28d01e9247b6e6c87495ead957733001096b6679ff9a63f762f07a07f9834cac326f7249926",
|
"467406b36a0176e40e013393e5ecef1f5b4019980b502eda9db1db06f7786e088b206f045f2bfcf93bd3b17a598335b078fcc5890115857ff741bd154b54f049",
|
||||||
"e4dcab3716ef913118a8d51675c7ce8b460b5d33587c4bad",
|
"d8cbcd1ac2153ecd74048480c2732f637d642b21f0dd40df",
|
||||||
"tooth torch soccer column weekend obtain glance boy biology purchase victory bird gaze purse sniff auto entry hundred",
|
"sugar fury effort loud fault grit source mountain liar bean slim shoulder stone better march brick dolphin zero",
|
||||||
"dc645f9c8d11ee5b372993b710540c59bdc4693b253dd207998811df4fbcbce711247361582a9042482a445a2123be514a2602913b5984336271879d1c36bc55",
|
"f60180ea5047659cbb17ed6ef79c974de86c0170c7a1962b205329eb8fe9dcdd148615d35c515c4ec8da25f4cf54d5b7cd8cd5bf8dc4059df3a7900ca25f8306",
|
||||||
"7874365a015417bf86b2e6e68c4fb332afcaf344ac1c5b514869bdc4503f07f5",
|
"2952f95cefe041616f6f379ab649cf8b702ecf8e4acceaebdda4cc50e2bf1d7b",
|
||||||
"journey payment notable actor door thank bracket fresh track give under grab witness keen bargain logic forget medal bounce knee eagle buzz cabin salute",
|
"citizen oak fire thank advice radar sad tragic one rather initial black actual guitar decrease flower turtle galaxy hard obvious athlete garbage invest have",
|
||||||
"fe49079843bb0461496faeafd6c6e18e058c6b54403d085616863bca32a8a3ec59bca20c4f68e5f300098faf7cf592e52493ee358add5161befeef601a0984b9",
|
"eff4b6a15bb55fcf4bbfa2b3b9e24e7dc4bed8319ef7703f1786d472c73666922925778eaa5a06f8a26d2c7e7240be746fd69edfaf197e0dae12d7e0b550cfc8",
|
||||||
"dd36b9581bef791e27dea2349d99f111",
|
"f5e82717078a6ddc538a03e825f91bed",
|
||||||
"tag remind figure daughter wasp monitor panda stairs cruel under labor carry",
|
"vote donkey shift audit plug until evolve document trial cool eight swarm",
|
||||||
"db8870c20d22f8fd43baf8675a30567745b908c56404b65da6b940b89dee1623a207385073da5931e202006971eb0460f0c86da7be233917fde24137a5d0b4c7",
|
"83dad22293225780a914083fc1a69bfe1d910f5b5962b0364820132a42ae1bd567a1fb4d5a19ad3d64539e38a7ee3d6429fac2b74e72b020913131c5eadb7db4",
|
||||||
"f268b3d9a0504f7a93602f58aca5e3b296a386d1b867a271",
|
"16b59b6a426f2f302f73049a32ab8572394278982212357a",
|
||||||
"venue easily wait doll agent run eternal album flavor gown jump gown health sell eight artefact pen melody",
|
"birth proud surround luggage very object saddle gauge olive next throw tongue neither detail gauge drastic cube strategy",
|
||||||
"f4afc4679667969b2a051e530c10bda028fc66fecdf6db416f6e5b834bfd26314591f3303a6f0a607fbeb0b7072a42fde064d76d362c796284107656981ad1d2",
|
"38ceb07e0dad221f612631843be6ae44a650aaf789c8ebea9313e07498d7864385227d25c7a8268a5b850367eef31639632e9218acadead20980b864b1cd477e",
|
||||||
"575fab7f9a24cb9edd664541d491349ba1ee64ca3982ffaf0d951ffb3c03b104",
|
"95b6cb48c7bc9c2a54496ae3eea790824b57e52b9637058f084555bc1b809b2f",
|
||||||
"firm wool that crowd erosion sorry intact silly dove pig essay dance bus crash cigar core zero journey grab divide record achieve series outdoor",
|
"noble rent split month six benefit eye coil token inside tomorrow afraid rely verb purity shoulder airport joke bacon problem script scare hole trumpet",
|
||||||
"000607026976a77b840eb314461bb8799ece12ce4844c452c39b6d94aa8c9f8f55f668786099add17a32e63338576316c93161e350ec9726d2384aa2d5ea884e",
|
"e33e3d32e467877596a18ac60050488a0ec1557fda6bf95bad3d33d964c5e99dcd97d378403cc2723ed1c85c12b42bc59f15458d970d7a9d015f556109c146b0",
|
||||||
"7499a884c8dc8d854996a42046764af7",
|
"7f93397f750f70a26513de2732ed95ee",
|
||||||
"innocent snap cancel museum silver section chaos stand cake crisp naive until",
|
"legend oil garlic tube warfare eye nephew knock cheese number grace tackle",
|
||||||
"0a256d3cd41423b084717335a43b58ff522a41f254448304e6b80f572b09e5709dfd88ba190c43aef3b4366016212e67d85e7f48d91c2b37306ba6792f779652",
|
"7f92ad63e4cdf4f15c23740556ad81e7f8cbd67cc672c93894c9c0d4fb171539eed5ab29f366570ed9940b816f45a539c3816f7ac19511794b752c5c1ec0e732",
|
||||||
"4b87f573b3710d6551115c148698974849caeaef46baf41a",
|
"14c29fe840dd1c9f05d392ba13e4e1466b32ed0726a15f89",
|
||||||
"entire distance friend group awkward razor dust clog behind crumble chair mountain original install rug struggle village spice",
|
"below belt wheel like spike exhibit blanket inch ring palace debate mimic rebel isolate broken stage garbage enhance",
|
||||||
"cbe978501edc014868011032069d730947a1a37f305ad401847796c157f9039d322a0b8ba5c4e34b6ea6ea90b408249e960df501685ae720ed1d78dc8495b682",
|
"7bae6e54f8bad645f18f574b310bd3e6fde126dabcaf63a889940380e4798810e48c8151fc56bb2389c07498deacef025f03cbf8fc57ea3ec68f6421b0fcb649",
|
||||||
"1eb272608649d7ca5118174f6c71bb5a9684af1dd9159a9707803c5df8c6a229",
|
"cb30610d175ffeab8357d5190d31923997752a7f9815087bfcad5eb0b43f6468",
|
||||||
"burger near oblige arrive output topple dutch actual exhaust glory human release hair fiscal jazz cargo once return theme judge test globe master clerk",
|
"sleep loan drive concert zoo fiction ask wide boil hat goose industry jar news wrist actor anchor that clip runway area cabbage museum abuse",
|
||||||
"7dcdf57089ca467e023bcb6d97872317b9c3b120b6363d7986a95d42555e1036f914f4f19c2f381e346d24cfa5204f8cbe6b96146f39012b0740ce5ae21e625b",
|
"b922030609e7626696b9cf5ca4c06cd99290be30b1052770f6a60c5f26532d178f287a4285d7a2add2845dc89a816b26fdba1c830067d130740f64c0ab5cfbe1",
|
||||||
"b45c6ab5b78e98d0ec2b8cb77cf2eecb",
|
"a30b50a5439dcd1774f412ea5ec33403",
|
||||||
"reform today pulp humor trumpet half radar immense resist travel roof nurse",
|
"perfect fold citizen mango system merry stable liquid tumble voyage snack alter",
|
||||||
"5118a62d70721d83e5525e7fdef5f049843900a60bc6bdc408feb0104f9fd5237000f166b811de432c27011a739578d8f9266d2882b290345ee04dae908d77d4",
|
"aae175f26848370c4d5d3d0640597e2bf1b28e95908dd877259b3eac5d71ffe3140739a3ed80180f88159571df84441985620e6b2fb0696e5cba1aa7b8d10b98",
|
||||||
"3b80180f9abebbbf9a45c5620dc711426c1a3b0ede191608",
|
"70044da2175ad681d0ebbf2da83cf407eb9c8fd91fc0a8c9",
|
||||||
"describe absorb advance cube two thank harbor reward ginger hotel session luggage script budget derive segment bid early",
|
"hybrid carbon hammer concert pulp domain dry jewel color draft dial average right elevator good way potato energy",
|
||||||
"80c58137ee8a3f0fae6d4bc2ea366f95929efe2fba063a676ea7559a383c38d1cdd5a04dd09bc29c21bf7334b3f492d6b7ce0f3ba5e78ef06337f2056aacc11b",
|
"a3dffe3a31a2e949d1b04af7495a5b59db17e41d93b985feeaaae89260a9c86c6dcdf7cb32eaba61c2f4f0340f0f17d1ebb67af11657286b2ffd66ec4e05a8b7",
|
||||||
"1fdc34f4457c1adddb0ff2de01b92817f4ffe7c82bef6719e4742a54d0463efc",
|
"0e0bab4df9669b97ba3f75a50b2e92423bbe6e91a1b01dbbf3ba200a917c9106",
|
||||||
"cabin ticket dial memory script humble history wrestle task assist energy copper exit view camera law grow song brown feed escape cart winner maple",
|
"asthma front square version have slim trophy upgrade pink floor pig love room dance educate current buffalo test update divorce poverty salad dune scheme",
|
||||||
"eae75edd758d1b65e317d15682ce76d6625251ab618dbbce179caa3aaf29e4f88e0ab97cd070c80b480bad3d50cfc458005a06949ab31d8702f95f6863eae176",
|
"2eb4d85fbd8deaf9b06bf9cdb3e5f36e8da040d110312075eb32e776fc8e505b94be3e63c1525ad41f5e5968a263853001dc7c40ea3af8e8b0cfb7effd5f408c",
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
@ -379,7 +379,7 @@ START_TEST(test_mnemonic)
|
|||||||
while (*a && *b && *c) {
|
while (*a && *b && *c) {
|
||||||
m = mnemonic_from_data(fromhex(*a), strlen(*a) / 2);
|
m = mnemonic_from_data(fromhex(*a), strlen(*a) / 2);
|
||||||
ck_assert_str_eq(m, *b);
|
ck_assert_str_eq(m, *b);
|
||||||
mnemonic_to_seed(m, "", seed);
|
mnemonic_to_seed(m, "TREZOR", seed);
|
||||||
ck_assert_mem_eq(seed, fromhex(*c), strlen(*c) / 2);
|
ck_assert_mem_eq(seed, fromhex(*c), strlen(*c) / 2);
|
||||||
a += 3; b += 3; c += 3;
|
a += 3; b += 3; c += 3;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user