Bitcoin Core 28.99.0
P2P Digital Currency
|
#include <key.h>
Public Member Functions | |
KeyPair () noexcept=default | |
KeyPair (KeyPair &&) noexcept=default | |
KeyPair & | operator= (KeyPair &&) noexcept=default |
KeyPair & | operator= (const KeyPair &other) |
KeyPair (const KeyPair &other) | |
bool | SignSchnorr (const uint256 &hash, Span< unsigned char > sig, const uint256 &aux) const |
bool | IsValid () const |
Check whether this keypair is valid. More... | |
Private Types | |
using | KeyType = std::array< unsigned char, 96 > |
Private Member Functions | |
KeyPair (const CKey &key, const uint256 *merkle_root) | |
void | MakeKeyPairData () |
void | ClearKeyPairData () |
Private Attributes | |
secure_unique_ptr< KeyType > | m_keypair |
Friends | |
KeyPair | CKey::ComputeKeyPair (const uint256 *merkle_root) const |
Wraps a secp256k1_keypair
type, an opaque data structure for holding a secret and public key. This is intended for BIP340 keys and allows us to easily determine if the secret key needs to be negated by checking the parity of the public key. This class primarily intended for passing secret keys to libsecp256k1 functions expecting a secp256k1_keypair
. For all other cases, CKey should be preferred.
A KeyPair can be created from a CKey with an optional merkle_root tweak (per BIP342). See CKey::ComputeKeyPair for more details.
|
private |
|
defaultnoexcept |
|
defaultnoexcept |
|
inlineprivate |
|
inline |
|
inlineprivate |
|
friend |
|
private |