Skip to content

Commit 975e5dc

Browse files
committed
fix decrypt_unlisted_candidate_ballot only foreach 0 to (max_vote_limit-1)
1 parent 4642e6e commit 975e5dc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

rust-toolchain

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2021-06-17
1+
nightly-2022-07-28

solution/anonymous_ciphertext_voting/src/coordinator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ pub fn decrypt_unlisted_candidate_ballot(
452452
)?;
453453
let target_total = c1 - blinding_c2_sum;
454454
// decrypt the ballot value
455-
for i in 0..max_vote_limit {
455+
for i in 0..=max_vote_limit {
456456
let try_num = Scalar::from(i as u64);
457457
if !target_total.eq(&(*BASEPOINT_G1 * try_num)) {
458458
continue;

0 commit comments

Comments
 (0)