This PR is part of integrating silent payments into Bitcoin Core. The project is tracked in #28536
Based on https://github.com/bitcoin-core/secp256k1/pull/1519
Pre-work / Refactors
The first three commits are pre-work / refactors needed for this PR. They are broken out into the following PRS:
BIP352
This PR focuses strictly on the BIP logic and attempts to separate it from the wallet and transaction implementation details. This is accomplished by working directly with public and private keys, instead of needing a wallet backend and transactions for testing. Labels for the receiver are optional and thus deferred for a later PR.
Test vectors from the BIP are included as unit tests.
Before reviewing, it is strongly recommended you read https://github.com/bitcoin/bips/pull/1458 and take a look at the reference python implementation on the BIP.