Page MenuHomePhabricator

[SECP256K1] Extract the secret key from a keypair
ClosedPublic

Authored by Fabien on Thu, Apr 8, 11:33.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABC01ee0628117a: [SECP256K1] Extract the secret key from a keypair
Summary
With schnorrsig if you need to tweak the secret key (for BIP32) you must
use the keypair API to get compatible secret/public keys which you do by
calling secp256k1_keypair_xonly_tweak_add(), but after that there's no
currently a way to extract the secret key back for storage.
so I added a secp256k1_keypair_seckey function to extract the key

Backport of secp256k1#845

Test Plan
ninja check-secp256k1

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable