ZK-Garage / plonk

A pure Rust PLONK implementation using arkworks as a backend.
https://discord.gg/XWJdhVf37F
Mozilla Public License 2.0
289 stars 75 forks source link

Commitment Gadget Design #54

Open stechu opened 2 years ago

stechu commented 2 years ago

Commitment Gadget Design

Goal

Make a commitment gadget library based on ark-plonk.

Initial Design

We still need those features:

trait LeafHash{
    type Input; 
    type Output;

    fn setup(...);
    fn evaluate(input: &Input) -> Output;
}

Questions:

bhgomes commented 2 years ago

We don't need partial commitments yet, so we should restrict ourselves to commit only, and remove the Rng requirement, replacing it with an associated type.

trait CommitmentScheme {
    type Parameters;
    type Input: ?Sized;
    type Randomness: ?Sized;
    type Output;

    fn commit(
        parameters: &Self::Parameters,
        input: &Self::Input,
        randomness: &Self::Randomness
    ) -> Self::Output;
}
mathcrypto commented 2 years ago

I would say candidate 2 Reinforcement-Concrete is a good choice since it was designed to support Plookup based on KZG commitments but it's also a fairly new design and there isn't cryptanalysis research done to verify if it's secure.

LukePearson1 commented 2 years ago

@stechu I would have liked for this issue and others concerning gadgets, in be a new repo; a gadgets repo. I would like this issue to be discussed in its own thread.

EDGDrummond commented 2 years ago

The authors of reinforced concrete claim that its design uses more analysed and battle-tested design principles than was previously possible in zk hash functions. So there is that in favour of it, but as @mathcrypto said, its overall design has still had very limited cryptanalysis.