@@ -524,59 +524,6 @@ static void _mock_with_mnemonic(const char* mnemonic, const char* passphrase)
524
524
assert_true (keystore_unlock_bip39 (passphrase ));
525
525
}
526
526
527
- static void _test_keystore_get_ed25519_seed (void * * state )
528
- {
529
- // Test vectors taken from:
530
- // https://github.com/cardano-foundation/CIPs/blob/6c249ef48f8f5b32efc0ec768fadf4321f3173f2/CIP-0003/Ledger.md#test-vectors
531
- // See also: https://github.com/cardano-foundation/CIPs/pull/132
532
-
533
- _mock_with_mnemonic (
534
- "recall grace sport punch exhibit mad harbor stand obey short width stem awkward used "
535
- "stairs wool ugly trap season stove worth toward congress jaguar" ,
536
- "" );
537
-
538
- uint8_t seed [96 ];
539
- assert_true (keystore_get_ed25519_seed (seed ));
540
- assert_memory_equal (
541
- seed ,
542
- "\xa0\x8c\xf8\x5b\x56\x4e\xcf\x3b\x94\x7d\x8d\x43\x21\xfb\x96\xd7\x0e\xe7\xbb\x76\x08\x77"
543
- "\xe3\x71\x89\x9b\x14\xe2\xcc\xf8\x86\x58\x10\x4b\x88\x46\x82\xb5\x7e\xfd\x97\xde\xcb\xb3"
544
- "\x18\xa4\x5c\x05\xa5\x27\xb9\xcc\x5c\x2f\x64\xf7\x35\x29\x35\xa0\x49\xce\xea\x60\x68\x0d"
545
- "\x52\x30\x81\x94\xcc\xef\x2a\x18\xe6\x81\x2b\x45\x2a\x58\x15\xfb\xd7\xf5\xba\xbc\x08\x38"
546
- "\x56\x91\x9a\xaf\x66\x8f\xe7\xe4" ,
547
- sizeof (seed ));
548
-
549
- // Multiple loop iterations.
550
- _mock_with_mnemonic (
551
- "correct cherry mammal bubble want mandate polar hazard crater better craft exotic choice "
552
- "fun tourist census gap lottery neglect address glow carry old business" ,
553
- "" );
554
- assert_true (keystore_get_ed25519_seed (seed ));
555
- assert_memory_equal (
556
- seed ,
557
- "\x58\x7c\x67\x74\x35\x7e\xcb\xf8\x40\xd4\xdb\x64\x04\xff\x7a\xf0\x16\xda\xce\x04\x00\x76"
558
- "\x97\x51\xad\x2a\xbf\xc7\x7b\x9a\x38\x44\xcc\x71\x70\x25\x20\xef\x1a\x4d\x1b\x68\xb9\x11"
559
- "\x87\x78\x7a\x9b\x8f\xaa\xb0\xa9\xbb\x6b\x16\x0d\xe5\x41\xb6\xee\x62\x46\x99\x01\xfc\x0b"
560
- "\xed\xa0\x97\x5f\xe4\x76\x3b\xea\xbd\x83\xb7\x05\x1a\x5f\xd5\xcb\xce\x5b\x88\xe8\x2c\x4b"
561
- "\xba\xca\x26\x50\x14\xe5\x24\xbd" ,
562
- sizeof (seed ));
563
-
564
- _mock_with_mnemonic (
565
- "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon "
566
- "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon "
567
- "abandon art" ,
568
- "foo" );
569
- assert_true (keystore_get_ed25519_seed (seed ));
570
- assert_memory_equal (
571
- seed ,
572
- "\xf0\x53\xa1\xe7\x52\xde\x5c\x26\x19\x7b\x60\xf0\x32\xa4\x80\x9f\x08\xbb\x3e\x5d\x90\x48"
573
- "\x4f\xe4\x20\x24\xbe\x31\xef\xcb\xa7\x57\x8d\x91\x4d\x3f\xf9\x92\xe2\x16\x52\xfe\xe6\xa4"
574
- "\xd9\x9f\x60\x91\x00\x69\x38\xfa\xc2\xc0\xc0\xf9\xd2\xde\x0b\xa6\x4b\x75\x4e\x92\xa4\xf3"
575
- "\x72\x3f\x23\x47\x20\x77\xaa\x4c\xd4\xdd\x8a\x8a\x17\x5d\xba\x07\xea\x18\x52\xda\xd1\xcf"
576
- "\x26\x8c\x61\xa2\x67\x9c\x38\x90" ,
577
- sizeof (seed ));
578
- }
579
-
580
527
// This tests that `secp256k1_schnorrsig_sign()` is the correct function to be used for schnorr sigs
581
528
// in taproot. It is a separate test because there are test vectors available for this which cannot
582
529
// be made to work with `keystore_secp256k1_schnorr_bip86_sign()`.
@@ -695,7 +642,6 @@ int main(void)
695
642
cmocka_unit_test (_test_keystore_lock ),
696
643
cmocka_unit_test (_test_keystore_bip39_mnemonic_from_seed ),
697
644
cmocka_unit_test (_test_keystore_create_and_store_seed ),
698
- cmocka_unit_test (_test_keystore_get_ed25519_seed ),
699
645
cmocka_unit_test (_test_secp256k1_schnorr_sign ),
700
646
cmocka_unit_test (_test_keystore_secp256k1_schnorr_sign ),
701
647
};
0 commit comments