mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Wallet, RPC, bitcoin-tx, etc updates for confidential transactions
This commit is contained in:
parent
74987d30b1
commit
292f923d03
29 changed files with 968 additions and 175 deletions
11
src/key.cpp
11
src/key.cpp
|
|
@ -58,6 +58,17 @@ CPubKey CKey::GetPubKey() const {
|
|||
return result;
|
||||
}
|
||||
|
||||
CPubKey CKey::ECDH(const CPubKey& pubkey) const {
|
||||
assert(fValid);
|
||||
CPubKey result = pubkey;
|
||||
int clen = result.size();
|
||||
int ret = secp256k1_point_multiply((unsigned char*)result.begin(), &clen, begin());
|
||||
assert((int)result.size() == clen);
|
||||
assert(ret);
|
||||
assert(result.IsValid());
|
||||
return result;
|
||||
}
|
||||
|
||||
bool CKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig, uint32_t test_case) const {
|
||||
if (!fValid)
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue