Skip to content

Commit

Permalink
check if keyset is present for DLEQ
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Oct 7, 2023
1 parent c702bd2 commit edd3d31
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cashu/wallet/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,9 @@ def verify_proofs_dleq(self, proofs: List[Proof]):
return
logger.trace("Verifying DLEQ proof.")
assert proof.id
assert (
proof.id in self.keysets
), f"Keyset {proof.id} not known, can not verify DLEQ."
if not b_dhke.carol_verify_dleq(
secret_msg=proof.secret,
C=PublicKey(bytes.fromhex(proof.C), raw=True),
Expand Down

0 comments on commit edd3d31

Please sign in to comment.