This issue refers to
|
let r = BigInt::sample_below(&ek.n); |
Ideally, the r chosen here should be coprime to N in general Paillier scheme. The sampling here does not check if this is true.
There are other places using sample_below without this check.
There are two ways to address this issue. One is to check if r is coprime to N every time. Or we need to ensure that when decrypting the ballots we reject 0 and restart the protocol.
cc @dingxiangfei2009
This issue refers to
rust-paillier/src/core.rs
Line 325 in 57fc04d
Ideally, the
rchosen here should be coprime toNin general Paillier scheme. The sampling here does not check if this is true.There are other places using
sample_belowwithout this check.There are two ways to address this issue. One is to check if
ris coprime toNevery time. Or we need to ensure that when decrypting the ballots we reject0and restart the protocol.cc @dingxiangfei2009