#commitment

commit-groth09

An implementation of the commitment scheme described in 'Homomorphic Trapdoor Commitments to Group Elements' by Jens Groth, implemented using BLS12-381

1 unstable release

0.1.0 Sep 29, 2024

#541 in Cryptography

Download history 103/week @ 2024-09-23 63/week @ 2024-09-30 9/week @ 2024-10-07 14/week @ 2024-10-14

189 downloads per month

MIT license

8KB
160 lines

commit-groth09

A multiplicatively homomorphic commitment scheme, as described in Homomorphic Trapdoor Commitments to Group Elements, implemented using BLS12-381.

Basic usage

Note: committing to bytes is not yet implemented!

fn commit_to_value() -> (Commitment, Randomness) {
    let commitment_key = CommitmentKey::<1>::generate();
    let value = Values::new([G2Affine::generator()]);
    let (commitment, randomness) = commitment_key.commit(&value);
}

lib.rs:

Homomorphic Trapdoor Commitments to Group Elements as described by Jens Groth.

This implementation uses BLS12-381 for the groups and pairing.

Dependencies

~1MB
~18K SLoC