Skip to content

fabrizio-m/TyPLONK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A tiny PLONK implementation.

Todo:

  • Maybe add opening batching optimization.
  • Improve kzg implementation.
  • More examples.
  • Benchmarks.
  • Improve code and documentation.
    extern crate plonk;

    use plonk::description::{CircuitDescription, Var};

struct Circuit;
impl CircuitDescription<3> for Circuit {
    fn run<V: Var>(inputs: [V; 3]) {
        let [a, b, c] = inputs;
        let a = a.clone() * a;
        let b = b.clone() * b;
        let c = c.clone() * c;
        let d = a + b;

        d.assert_eq(&c);
    }
}

fn main() {
    let circuit = Circuit::build();
    let proof = circuit.prove([3, 4, 5], vec![0]);
    assert!(circuit.verify(proof));
}

About

Rust PLONK implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages