Files
sonobe/src/transcript/mod.rs
arnaucube 16e261bbed Feature/traits (#3)
* feat: draft traits `FoldingScheme` and `Decider`

Co-authored-by: arnaucube <root@arnaucube.com>

* Add Transcript trait, with PoseidonTranscript impl (#1)

Add also the PoseidonTranscriptVar (gadget).

* Update FoldingScheme trait to take C1 & C2 as params (#2)

* Update FoldingScheme trait to take C1 & C2 as params

Update FoldingScheme trait to take C1 & C2 as params which are used by
the diverse folding schemes as a cycle of curves.

* Add constraint to FoldingScheme C1,C2 fields swap.

Co-authored-by: Han <tinghan0110@gmail.com>

---------

Co-authored-by: Han <tinghan0110@gmail.com>

* move transcript to it's own mod

---------

Co-authored-by: han0110 <tinghan0110@gmail.com>
2023-08-17 10:32:26 +02:00

15 lines
361 B
Rust

use ark_ff::PrimeField;
use ark_std::fmt::Debug;
pub mod poseidon;
pub trait Transcript<F: PrimeField> {
type TranscriptConfig: Debug;
fn new(config: &Self::TranscriptConfig) -> Self;
fn absorb(&mut self, v: &F);
fn absorb_vec(&mut self, v: &[F]);
fn get_challenge(&mut self) -> F;
fn get_challenges(&mut self, n: usize) -> Vec<F>;
}