Skip to main content

Module pedersen

Module pedersen 

Source
Expand description

Implementation of the Pedersen commitment scheme, including out-of-circuit widgets and in-circuit gadgets.

The Pedersen commitment to a vector v is computed as <g, v> + h · r, where g and h are generators, r is a random scalar, and <g, v> is the multi-scalar multiplication of g and v.

Structs§

Pedersen
Pedersen defines the out-of-circuit Pedersen widget, where H controls whether the scheme is hiding or not.
PedersenEmulatedGadget
PedersenEmulatedGadget defines the in-circuit Pedersen gadget that operates over the scalar field of the curve and supports emulated elliptic curve point variables as commitments, where H controls whether the scheme is hiding or not.
PedersenEmulatedKeyVar
PedersenEmulatedKeyVar is the in-circuit variable for PedersenKey, whose generators are encoded in the emulated form.
PedersenGadget
PedersenGadget defines the in-circuit Pedersen gadget that operates over the base field of the curve and supports canonical elliptic curve point variables as commitments, where H controls whether the scheme is hiding or not.
PedersenKey
PedersenKey stores the public parameters for the Pedersen commitment scheme, where H controls whether the scheme is hiding or not.
PedersenKeyVar
PedersenKeyVar is the in-circuit variable for PedersenKey, whose generators are encoded in the canonical form.