@@ -638,68 +638,6 @@ static void _test_secp256k1_schnorr_sign(void** state)
638
638
}
639
639
}
640
640
641
- static void _test_keystore_secp256k1_schnorr_bip86_pubkey (void * * state )
642
- {
643
- // Test vectors from:
644
- // https://github.com/bitcoin/bips/blob/edffe529056f6dfd33d8f716fb871467c3c09263/bip-0086.mediawiki#test-vectors
645
- // Here we only test the creation of the tweaked pubkkey.
646
- _mock_with_mnemonic (
647
- "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon "
648
- "about" ,
649
- "" );
650
- {
651
- const uint32_t keypath [] = {
652
- 86 + BIP32_INITIAL_HARDENED_CHILD ,
653
- 0 + BIP32_INITIAL_HARDENED_CHILD ,
654
- 0 + BIP32_INITIAL_HARDENED_CHILD ,
655
- 0 ,
656
- 0 ,
657
- };
658
- struct ext_key xpub = {0 };
659
- assert_true (keystore_get_xpub (keypath , 5 , & xpub ));
660
- uint8_t pubkey [32 ] = {0 };
661
- assert_true (keystore_secp256k1_schnorr_bip86_pubkey (xpub .pub_key , pubkey ));
662
- const uint8_t expected_pubkey [32 ] =
663
- "\xa6\x08\x69\xf0\xdb\xcf\x1d\xc6\x59\xc9\xce\xcb\xaf\x80\x50\x13\x5e\xa9\xe8\xcd\xc4"
664
- "\x87\x05\x3f\x1d\xc6\x88\x09\x49\xdc\x68\x4c" ;
665
- assert_memory_equal (pubkey , expected_pubkey , sizeof (pubkey ));
666
- }
667
- {
668
- const uint32_t keypath [] = {
669
- 86 + BIP32_INITIAL_HARDENED_CHILD ,
670
- 0 + BIP32_INITIAL_HARDENED_CHILD ,
671
- 0 + BIP32_INITIAL_HARDENED_CHILD ,
672
- 0 ,
673
- 1 ,
674
- };
675
- struct ext_key xpub = {0 };
676
- assert_true (keystore_get_xpub (keypath , 5 , & xpub ));
677
- uint8_t pubkey [32 ] = {0 };
678
- assert_true (keystore_secp256k1_schnorr_bip86_pubkey (xpub .pub_key , pubkey ));
679
- const uint8_t expected_pubkey [32 ] =
680
- "\xa8\x2f\x29\x94\x4d\x65\xb8\x6a\xe6\xb5\xe5\xcc\x75\xe2\x94\xea\xd6\xc5\x93\x91\xa1"
681
- "\xed\xc5\xe0\x16\xe3\x49\x8c\x67\xfc\x7b\xbb" ;
682
- assert_memory_equal (pubkey , expected_pubkey , sizeof (pubkey ));
683
- }
684
- {
685
- const uint32_t keypath [] = {
686
- 86 + BIP32_INITIAL_HARDENED_CHILD ,
687
- 0 + BIP32_INITIAL_HARDENED_CHILD ,
688
- 0 + BIP32_INITIAL_HARDENED_CHILD ,
689
- 1 ,
690
- 0 ,
691
- };
692
- struct ext_key xpub = {0 };
693
- assert_true (keystore_get_xpub (keypath , 5 , & xpub ));
694
- uint8_t pubkey [32 ] = {0 };
695
- assert_true (keystore_secp256k1_schnorr_bip86_pubkey (xpub .pub_key , pubkey ));
696
- const uint8_t expected_pubkey [32 ] =
697
- "\x88\x2d\x74\xe5\xd0\x57\x2d\x5a\x81\x6c\xef\x00\x41\xa9\x6b\x6c\x1d\xe8\x32\xf6\xf9"
698
- "\x67\x6d\x96\x05\xc4\x4d\x5e\x9a\x97\xd3\xdc" ;
699
- assert_memory_equal (pubkey , expected_pubkey , sizeof (pubkey ));
700
- }
701
- }
702
-
703
641
static void _test_keystore_secp256k1_schnorr_sign (void * * state )
704
642
{
705
643
_mock_with_mnemonic (
@@ -762,7 +700,6 @@ int main(void)
762
700
cmocka_unit_test (_test_keystore_create_and_store_seed ),
763
701
cmocka_unit_test (_test_keystore_get_ed25519_seed ),
764
702
cmocka_unit_test (_test_secp256k1_schnorr_sign ),
765
- cmocka_unit_test (_test_keystore_secp256k1_schnorr_bip86_pubkey ),
766
703
cmocka_unit_test (_test_keystore_secp256k1_schnorr_sign ),
767
704
};
768
705
return cmocka_run_group_tests (tests , NULL , NULL );
0 commit comments