MCPcopy Create free account
hub / github.com/ElementsProject/elements / VerifySchnorr

Method VerifySchnorr

src/pubkey.cpp:206–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206bool XOnlyPubKey::VerifySchnorr(const Span<const unsigned char> msg, Span<const unsigned char> sigbytes) const
207{
208 assert(sigbytes.size() == 64);
209 secp256k1_xonly_pubkey pubkey;
210 if (!secp256k1_xonly_pubkey_parse(secp256k1_context_verify, &pubkey, m_keydata.data())) return false;
211 return secp256k1_schnorrsig_verify(secp256k1_context_verify, sigbytes.data(), msg.data(), msg.size(), &pubkey);
212}
213
214// ELEMENTS: this is preserved from an old version of the Taproot code for use in OP_TWEAKVERIFY
215bool XOnlyPubKey::CheckPayToContract(const XOnlyPubKey& base, const uint256& hash, bool parity) const

Callers 3

BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 4

sizeMethod · 0.45
dataMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64