CorrectnessProofs use ExtendedKeccak for compatibility with Solidity

pull/219/head
David Núñez 2018-11-09 14:09:22 +01:00
parent 9521c50d12
commit 9cfbf1b50c
2 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ from umbral.curvebn import CurveBN
from umbral.point import Point
from umbral.signing import Signature
from umbral.curve import Curve
from umbral.random_oracles import hash_to_curvebn
from umbral.random_oracles import hash_to_curvebn, ExtendedKeccak
class CorrectnessProof(object):
@ -201,7 +201,7 @@ class CapsuleFrag(object):
if self.proof.metadata is not None:
hash_input.append(self.proof.metadata)
h = hash_to_curvebn(*hash_input, params=params)
h = hash_to_curvebn(*hash_input, params=params, hash_class=ExtendedKeccak)
########
precursor = self.point_precursor

View File

@ -33,7 +33,7 @@ from umbral.point import Point
from umbral.signing import Signer
from umbral.curve import Curve
from umbral.utils import poly_eval, lambda_coeff
from umbral.random_oracles import kdf, hash_to_curvebn
from umbral.random_oracles import kdf, hash_to_curvebn, ExtendedKeccak
from constant_sorrow import constants
@ -362,7 +362,7 @@ def prove_cfrag_correctness(cfrag: CapsuleFrag,
if metadata is not None:
hash_input.append(metadata)
h = hash_to_curvebn(*hash_input, params=params)
h = hash_to_curvebn(*hash_input, params=params, hash_class=ExtendedKeccak)
########
z3 = t + h * rk