You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let tom_key = common::tom_keypair();
for _ in 1..100 {
let range = BigInt::from(6000);
let nonce = BigInt::sample_below(&tom_key.0.n);
let hide_value = BigInt::sample_below(&range.div_floor(&BigInt::from(3)));
let hide_data = Paillier::encrypt_with_chosen_randomness(
&tom_key.0,
RawPlaintext::from(&hide_value),
&Randomness(nonce.clone()),
);
let range_proof = RangeProofNi::prove(&tom_key.0, &range, &hide_data.0, &hide_value, &nonce);
let result = range_proof.verify(&tom_key.0, &hide_data.0);
println!("result:{}", result.is_ok());
}
The proof generated by
RangeProofNi
sometimes fails, try to loop many times, and some of the proof results are falseThe text was updated successfully, but these errors were encountered: