mirror of
https://github.com/aljazceru/nutshell.git
synced 2026-02-04 08:14:21 +01:00
try both
This commit is contained in:
@@ -123,13 +123,13 @@ class Ledger:
|
||||
not context.get("client-version")
|
||||
or not self.keysets.keysets[proof.id].version
|
||||
):
|
||||
logger.debug(
|
||||
f"Using legacy hash_to_curve for proof from keyset {proof.id} or client with version {context.get('client-version')}"
|
||||
)
|
||||
return legacy.verify_pre_0_3_3(secret_key, C, proof.secret)
|
||||
logger.debug(
|
||||
f"Using new hash_to_curve for proof from keyset {proof.id} or client with version {context.get('client-version')}"
|
||||
)
|
||||
try:
|
||||
ret = legacy.verify_pre_0_3_3(secret_key, C, proof.secret)
|
||||
if ret:
|
||||
return ret
|
||||
except:
|
||||
pass
|
||||
return b_dhke.verify(secret_key, C, proof.secret)
|
||||
|
||||
def _verify_script(self, idx: int, proof: Proof):
|
||||
|
||||
Reference in New Issue
Block a user