Add ZIP 32 arbitrary key derivation test vector to ZIP 32 account
This commit is contained in:
parent
4505cb8438
commit
2a08204b62
|
@ -4,5 +4,8 @@
|
|||
["5a63617368207465737420766563746f7273", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", "125a63617368207465737420766563746f727320000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", [], "e9da8806409dc3c3ebd1fc2a71c879c13dd7aa93ede803bf1a83414b9d3b158a", "65a748f2905f7a8aab9f3d02f1b26c3d65c82994ce59a086d4c651d8a81cec51"],
|
||||
["5a63617368207465737420766563746f7273", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", null, [2147483649], "e8409aaa832cc2378f2badeb77150562153742fee876dcf4783a6ccd119da66a", "cc084922a0ead2da5338bd82200a1946bc8585b8d9ee416df6a09a71ab0e5b58"],
|
||||
["5a63617368207465737420766563746f7273", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", null, [2147483649, 2147483650], "464f90a364cff805fee93a85b72f4894ce4e1358dcdc1e61a3d430301c60910e", "f9d2544a5528ae6bd9f036f42f9f05d83dff507aeb2a8141af11d9f167e221ae"],
|
||||
["5a63617368207465737420766563746f7273", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", null, [2147483649, 2147483650, 2147483651], "fc4b6e93b0e42f7a762ca0c6522ccd1045cab506b372452af7306c87389ab62c", "e89bf2ed73f5e0887542e36793fac82c508ab5d99198578227b241fbac198429"]
|
||||
["5a63617368207465737420766563746f7273", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", null, [2147483649, 2147483650, 2147483651], "fc4b6e93b0e42f7a762ca0c6522ccd1045cab506b372452af7306c87389ab62c", "e89bf2ed73f5e0887542e36793fac82c508ab5d99198578227b241fbac198429"],
|
||||
["5a63617368207465737420766563746f7273", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", null, [2147483680], "c430c4defd03d7578b2bb09e58135cdd1d7b7c975f01a890847ee0b5c468bc98", "0f473789fe7d5585b79ad5f7e0a469d9a30146647764485150db78d7209dcb30"],
|
||||
["5a63617368207465737420766563746f7273", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", null, [2147483680, 2147483781], "43e5484679fdfa0f6176ae86795d0d44c40e149ef4ba1b0e2ebd883c71f49187", "db42c3b725f32459b2cf8215418b8e8f8e7b1b3f4aba2f5b5e8129e6f0575784"],
|
||||
["5a63617368207465737420766563746f7273", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", null, [2147483680, 2147483781, 2147483648], "bf60078362a09234fcbc6bf6c8a87bde9fc73776bf93f37adbcc439a85574a9a", "2b657e08f67a570c53b9ed30611e6a2f822662b4887a8cfb469e9d0d9817011a"]
|
||||
]
|
||||
|
|
|
@ -85,4 +85,61 @@
|
|||
0xe8, 0x9b, 0xf2, 0xed, 0x73, 0xf5, 0xe0, 0x88, 0x75, 0x42, 0xe3, 0x67, 0x93, 0xfa, 0xc8, 0x2c, 0x50, 0x8a, 0xb5, 0xd9, 0x91, 0x98, 0x57, 0x82, 0x27, 0xb2, 0x41, 0xfb, 0xac, 0x19, 0x84, 0x29
|
||||
],
|
||||
},
|
||||
TestVector {
|
||||
context_string: vec![
|
||||
0x5a, 0x63, 0x61, 0x73, 0x68, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73
|
||||
],
|
||||
seed: [
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
|
||||
],
|
||||
ikm: None,
|
||||
path: vec![
|
||||
2147483680,
|
||||
],
|
||||
sk: [
|
||||
0xc4, 0x30, 0xc4, 0xde, 0xfd, 0x03, 0xd7, 0x57, 0x8b, 0x2b, 0xb0, 0x9e, 0x58, 0x13, 0x5c, 0xdd, 0x1d, 0x7b, 0x7c, 0x97, 0x5f, 0x01, 0xa8, 0x90, 0x84, 0x7e, 0xe0, 0xb5, 0xc4, 0x68, 0xbc, 0x98
|
||||
],
|
||||
c: [
|
||||
0x0f, 0x47, 0x37, 0x89, 0xfe, 0x7d, 0x55, 0x85, 0xb7, 0x9a, 0xd5, 0xf7, 0xe0, 0xa4, 0x69, 0xd9, 0xa3, 0x01, 0x46, 0x64, 0x77, 0x64, 0x48, 0x51, 0x50, 0xdb, 0x78, 0xd7, 0x20, 0x9d, 0xcb, 0x30
|
||||
],
|
||||
},
|
||||
TestVector {
|
||||
context_string: vec![
|
||||
0x5a, 0x63, 0x61, 0x73, 0x68, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73
|
||||
],
|
||||
seed: [
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
|
||||
],
|
||||
ikm: None,
|
||||
path: vec![
|
||||
2147483680,
|
||||
2147483781,
|
||||
],
|
||||
sk: [
|
||||
0x43, 0xe5, 0x48, 0x46, 0x79, 0xfd, 0xfa, 0x0f, 0x61, 0x76, 0xae, 0x86, 0x79, 0x5d, 0x0d, 0x44, 0xc4, 0x0e, 0x14, 0x9e, 0xf4, 0xba, 0x1b, 0x0e, 0x2e, 0xbd, 0x88, 0x3c, 0x71, 0xf4, 0x91, 0x87
|
||||
],
|
||||
c: [
|
||||
0xdb, 0x42, 0xc3, 0xb7, 0x25, 0xf3, 0x24, 0x59, 0xb2, 0xcf, 0x82, 0x15, 0x41, 0x8b, 0x8e, 0x8f, 0x8e, 0x7b, 0x1b, 0x3f, 0x4a, 0xba, 0x2f, 0x5b, 0x5e, 0x81, 0x29, 0xe6, 0xf0, 0x57, 0x57, 0x84
|
||||
],
|
||||
},
|
||||
TestVector {
|
||||
context_string: vec![
|
||||
0x5a, 0x63, 0x61, 0x73, 0x68, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73
|
||||
],
|
||||
seed: [
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
|
||||
],
|
||||
ikm: None,
|
||||
path: vec![
|
||||
2147483680,
|
||||
2147483781,
|
||||
2147483648,
|
||||
],
|
||||
sk: [
|
||||
0xbf, 0x60, 0x07, 0x83, 0x62, 0xa0, 0x92, 0x34, 0xfc, 0xbc, 0x6b, 0xf6, 0xc8, 0xa8, 0x7b, 0xde, 0x9f, 0xc7, 0x37, 0x76, 0xbf, 0x93, 0xf3, 0x7a, 0xdb, 0xcc, 0x43, 0x9a, 0x85, 0x57, 0x4a, 0x9a
|
||||
],
|
||||
c: [
|
||||
0x2b, 0x65, 0x7e, 0x08, 0xf6, 0x7a, 0x57, 0x0c, 0x53, 0xb9, 0xed, 0x30, 0x61, 0x1e, 0x6a, 0x2f, 0x82, 0x26, 0x62, 0xb4, 0x88, 0x7a, 0x8c, 0xfb, 0x46, 0x9e, 0x9d, 0x0d, 0x98, 0x17, 0x01, 0x1a
|
||||
],
|
||||
},
|
||||
];
|
||||
|
|
|
@ -4,5 +4,8 @@
|
|||
["5a63617368207465737420766563746f7273", "1f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100", "125a63617368207465737420766563746f727320000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", [], "8a153b9d4b41831abf03e8ed93aad73dc179c8712afcd1ebc3c39d400688dae9", "51ec1ca8d851c6d486a059ce9429c8653d6cb2f1023d9fab8a7a5f90f248a765"],
|
||||
["5a63617368207465737420766563746f7273", "1f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100", null, [2147483649], "6aa69d11cd6c3a78f4dc76e8fe42371562051577ebad2b8f37c22c83aa9a40e8", "585b0eab719aa0f66d41eed9b88585bc46190a2082bd3853dad2eaa0224908cc"],
|
||||
["5a63617368207465737420766563746f7273", "1f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100", null, [2147483649, 2147483650], "0e91601c3030d4a3611edcdc58134ece94482fb7853ae9fe05f8cf64a3904f46", "ae21e267f1d911af41812aeb7a50ff3dd8059f2ff436f0d96bae28554a54d2f9"],
|
||||
["5a63617368207465737420766563746f7273", "1f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100", null, [2147483649, 2147483650, 2147483651], "2cb69a38876c30f72a4572b306b5ca4510cd2c52c6a02c767a2fe4b0936e4bfc", "298419acfb41b22782579891d9b58a502cc8fa9367e3427588e0f573edf29be8"]
|
||||
["5a63617368207465737420766563746f7273", "1f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100", null, [2147483649, 2147483650, 2147483651], "2cb69a38876c30f72a4572b306b5ca4510cd2c52c6a02c767a2fe4b0936e4bfc", "298419acfb41b22782579891d9b58a502cc8fa9367e3427588e0f573edf29be8"],
|
||||
["5a63617368207465737420766563746f7273", "1f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100", null, [2147483680], "98bc68c4b5e07e8490a8015f977c7b1ddd5c13589eb02b8b57d703fddec430c4", "30cb9d20d778db5051486477644601a3d969a4e0f7d59ab785557dfe8937470f"],
|
||||
["5a63617368207465737420766563746f7273", "1f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100", null, [2147483680, 2147483781], "8791f4713c88bd2e0e1bbaf49e140ec4440d5d7986ae76610ffafd794648e543", "845757f0e629815e5b2fba4a3f1b7b8e8f8e8b411582cfb25924f325b7c342db"],
|
||||
["5a63617368207465737420766563746f7273", "1f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100", null, [2147483680, 2147483781, 2147483648], "9a4a57859a43ccdb7af393bf7637c79fde7ba8c8f66bbcfc3492a062830760bf", "1a0117980d9d9e46fb8c7a88b46226822f6a1e6130edb9530c577af6087e652b"]
|
||||
]
|
||||
|
|
|
@ -71,7 +71,12 @@ def arbitrary_key_derivation_tvs():
|
|||
m_1h_2h = m_1h.child(hardened(2))
|
||||
m_1h_2h_3h = m_1h_2h.child(hardened(3))
|
||||
|
||||
keys = [m, m_1h, m_1h_2h, m_1h_2h_3h]
|
||||
# Derive a path matching Zcash mainnet account index 0.
|
||||
m_32h = m.child(hardened(32))
|
||||
m_32h_133h = m_32h.child(hardened(133))
|
||||
m_32h_133h_0h = m_32h_133h.child(hardened(0))
|
||||
|
||||
keys = [m, m_1h, m_1h_2h, m_1h_2h_3h, m_32h, m_32h_133h, m_32h_133h_0h]
|
||||
|
||||
test_vectors = [
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue