barretenberg
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | List of all members
crypto::pedersen_commitment_base< Curve > Class Template Reference

Performs pedersen commitments! More...

#include <pedersen.hpp>

Public Types

using AffineElement = typename Curve::AffineElement
 
using Element = typename Curve::Element
 
using Fr = typename Curve::ScalarField
 
using Fq = typename Curve::BaseField
 
using Group = typename Curve::Group
 
using GeneratorContext = typename crypto::GeneratorContext< Curve >
 

Static Public Member Functions

static AffineElement commit_native (const std::vector< Fq > &inputs, GeneratorContext context={})
 Given a vector of fields, generate a pedersen commitment using the indexed generators.
 

Detailed Description

template<typename Curve>
class crypto::pedersen_commitment_base< Curve >

Performs pedersen commitments!

To commit to a size-n list of field elements x, a commitment is defined as:

 Commit(x) = x[0].g[0] + x[1].g[1] + ... + x[n-1].g[n-1]

Where g is a list of generator points defined by generator_data

Member Function Documentation

◆ commit_native()

template<typename Curve >
Curve::AffineElement crypto::pedersen_commitment_base< Curve >::commit_native ( const std::vector< Fq > &  inputs,
GeneratorContext  context = {} 
)
static

Given a vector of fields, generate a pedersen commitment using the indexed generators.

This method uses Curve::BaseField members as inputs. This aligns with what we expect when creating grumpkin commitments to field elements inside a BN254 SNARK circuit.

Parameters
inputs
context
Returns
Curve::AffineElement

The documentation for this class was generated from the following files: