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
Running nargo prove yields an error message
other error
What is the reason for this?
This is the executed code:
use dep::std;
use dep::std::ec::tecurve::affine::Point as Gaffine;
use dep::std::ec::tecurve::affine::Curve as AffineCurve;
use dep::noir_elgamal;
fn main() {
let message: u40 = 943594123598;
let private_key: Field = 0x04c330a81537c0d29cc09e8b2b9c43fc5fb5a9d244ab741fc88dff3d40dbd75c; // chosen randomly between 0 and bjj_l-1
let randomness: Field = 0x010fe5884a7852054a21e21e549520352f563f03d3f79e66a2d75fbd2a21d5cf; // chosen randomly between 0 and bjj_l-1, and never reused
let public_key: Gaffine = noir_elgamal::priv_to_pub_key(private_key);
let ciphertext: (Gaffine,Gaffine) = noir_elgamal::exp_elgamal_encrypt(public_key, message, randomness);
let decryption = noir_elgamal::exp_elgamal_decrypt(private_key, ciphertext); // in embedded form (before the baby-step giant-step application)
let bjj_affine: AffineCurve = noir_elgamal::get_affine_curve();
let base_pt: Gaffine = noir_elgamal::get_base_point();
let plain_embedded: Gaffine = bjj_affine.mul(message as Field,base_pt);
assert(plain_embedded.x == decryption.x);
assert(plain_embedded.y == decryption.y);
}
#[test]
fn test_main() {
main();
}
The text was updated successfully, but these errors were encountered:
Running
nargo prove
yields an error messageother error
What is the reason for this?
This is the executed code:
The text was updated successfully, but these errors were encountered: