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

Method ECDH

src/key.cpp:214–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214uint256 CKey::ECDH(const CPubKey& pubkey) const {
215 assert(fValid);
216 uint256 result;
217 secp256k1_pubkey pkey;
218 assert(secp256k1_ec_pubkey_parse(secp256k1_context_sign, &pkey, pubkey.begin(), pubkey.size()));
219 assert(secp256k1_ecdh(secp256k1_context_sign, result.begin(), &pkey, begin(), NULL, NULL));
220 return result;
221}
222
223bool CKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig, bool grind, uint32_t test_case) const {
224 if (!fValid)

Callers 3

UnblindConfidentialPairFunction · 0.80

Calls 5

secp256k1_ecdhFunction · 0.85
beginFunction · 0.85
beginMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected