![]() |
Bitcoin Core 30.99.0
P2P Digital Currency
|
MuSig2SecNonce encapsulates a secret nonce in use in a MuSig2 signing session. More...
#include <musig.h>
Public Member Functions | |
MuSig2SecNonce () | |
MuSig2SecNonce (MuSig2SecNonce &&) noexcept | |
MuSig2SecNonce & | operator= (MuSig2SecNonce &&) noexcept |
~MuSig2SecNonce () | |
MuSig2SecNonce (const MuSig2SecNonce &)=delete | |
MuSig2SecNonce & | operator= (const MuSig2SecNonce &)=delete |
secp256k1_musig_secnonce * | Get () const |
void | Invalidate () |
bool | IsValid () |
Private Attributes | |
std::unique_ptr< MuSig2SecNonceImpl > | m_impl |
MuSig2SecNonce encapsulates a secret nonce in use in a MuSig2 signing session.
Since this nonce persists outside of libsecp256k1 signing code, we must handle its construction and destruction ourselves. The secret nonce must be kept a secret, otherwise the private key may be leaked. As such, it needs to be treated in the same way that CKeys are treated. So this class handles the secure allocation of the secp256k1_musig_secnonce object that libsecp256k1 uses, and only gives out references to this object to avoid any possibility of copies being made. Furthermore, objects of this class are not copyable to avoid nonce reuse.
|
defaultnoexcept |
|
default |
|
delete |
secp256k1_musig_secnonce * MuSig2SecNonce::Get | ( | ) | const |
void MuSig2SecNonce::Invalidate | ( | ) |
|
delete |
|
defaultnoexcept |
|
private |