Skip to content

Instantly share code, notes, and snippets.

@callebtc
callebtc / proofs.rs
Created February 29, 2024 19:43 — forked from joschisan/proofs.rs
Sigma Protocol Proofs
use bitcoin_hashes::{sha256, Hash, HashEngine};
use bls12_381::{G1Affine, G1Projective, Scalar};
use core::array;
use ff::Field;
use group::Curve;
use rand::{thread_rng, SeedableRng};
use rand_chacha::ChaChaRng;
use std::io::Write;
fn prove<const N: usize, const M: usize, const S: usize>(