You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
arnaucube ead8e36753 Add GHA and readme usage examples 1 year ago
.github/workflows Add GHA and readme usage examples 1 year ago
src Add GHA and readme usage examples 1 year ago
.gitignore Add MerkleTree impl 1 year ago
Cargo.toml Abstract hash function, upgrade to arkworks v0.4.0 1 year ago
LICENSE init repo 1 year ago
README.md Add GHA and readme usage examples 1 year ago

README.md

fri-commitment Test

FRI low degree testing & FRI polynomial commitment using [VP19]'s trick. Implementation using arkworks libraries.

Note: done in my free time to learn about FRI, do not use in production.

Thanks to Vincenzo Iovino for explainations on FRI & [VP19].

Usage

FRI-LDT:

type LDT = FRI_LDT<Fr, DensePolynomial<Fr>, Keccak256Hash<Fr>>;

let deg = 31;
let p = DensePolynomial::<Fr>::rand(deg, &mut ark_std::test_rng());

let proof = LDT::prove(&p);

let v = LDT::verify(proof, deg);
assert!(v);

FRI-PCS:

type PCS = FRI_PCS<Fr, DensePolynomial<Fr>, Keccak256Hash<Fr>>;

let deg = 31;
let mut rng = ark_std::test_rng();
let p = DensePolynomial::<Fr>::rand(deg, &mut rng);

let commitment = PCS::commit(&p);

let r = Fr::rand(&mut rng);

let (proof, claimed_y) = PCS::open(&p, r);

let v = PCS::verify(commitment, proof, r, claimed_y);
assert!(v);