Skip to content

Commit d65c43b

Browse files
Fix Chaum Pedersen Bench (#453)
1 parent 58daf24 commit d65c43b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/bench/bench_chaum_pedersen.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,13 @@ def chaum_pedersen_bench(bi: BenchInput) -> Tuple[float, float]:
3131
Given an input (instance of the BenchInput tuple), constructs and validates
3232
a disjunctive Chaum-Pedersen proof, returning the time (in seconds) to do each operation.
3333
"""
34-
(keypair, r, s) = bi
35-
ciphertext = get_optional(elgamal_encrypt(0, r, keypair.public_key))
34+
ciphertext = get_optional(elgamal_encrypt(0, bi.r, bi.keypair.public_key))
3635
start1 = timer()
3736
proof = make_disjunctive_chaum_pedersen_zero(
38-
ciphertext, r, keypair.public_key, ONE_MOD_Q, s
37+
ciphertext, bi.r, bi.keypair.public_key, ONE_MOD_Q, bi.s
3938
)
4039
end1 = timer()
41-
valid = proof.is_valid(ciphertext, keypair.public_key, ONE_MOD_Q)
40+
valid = proof.is_valid(ciphertext, bi.keypair.public_key, ONE_MOD_Q)
4241
end2 = timer()
4342
if not valid:
4443
raise Exception("Wasn't expecting an invalid proof during a benchmark!")

0 commit comments

Comments
 (0)