mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Fix UnblindConfidentialPair: use IsFullyValid() for ephemeral_key
if nNonce.vchCommitment contains invalid key of correct length, IsValid() check will pass, but then assertion will be hit when secp256k1_ec_pubkey_parse() is called on it inside CKey::ECDH(). Therefore, the check should be done with IsFullyValid()
This commit is contained in:
parent
5467be3b16
commit
f8a9d8bfa5
1 changed files with 1 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ bool UnblindConfidentialPair(const CKey &key, const CConfidentialValue& confValu
|
|||
return false;
|
||||
}
|
||||
CPubKey ephemeral_key(nNonce.vchCommitment);
|
||||
if (nNonce.vchCommitment.size() > 0 && !ephemeral_key.IsValid()) {
|
||||
if (nNonce.vchCommitment.size() > 0 && !ephemeral_key.IsFullyValid()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue