Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
pedersen.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: not started, auditors: [], date: YYYY-MM-DD }
3// external_1: { status: not started, auditors: [], date: YYYY-MM-DD }
4// external_2: { status: not started, auditors: [], date: YYYY-MM-DD }
5// =====================
6
7#pragma once
8#include "../../primitives/field/field.hpp"
11
12namespace bb::stdlib {
13
19template <typename Builder> class pedersen_commitment {
20 private:
21 using field_t = stdlib::field_t<Builder>; // BN254 scalar field element
22 using cycle_group = stdlib::cycle_group<Builder>; // Grumpkin curve point
23 using EmbeddedCurve = typename cycle_group::Curve; // Grumpkin curve type
24 using cycle_scalar = typename cycle_group::cycle_scalar; // Grumpkin scalar field element
26
27 public:
29};
30
31} // namespace bb::stdlib
cycle_group represents a group Element of the proving system's embedded curve, i.e....
bb::curve::Grumpkin Curve
::bb::stdlib::cycle_scalar< Builder > cycle_scalar
In-circuit Pedersen commitment implementation.
Definition pedersen.hpp:19
typename cycle_group::cycle_scalar cycle_scalar
Definition pedersen.hpp:24
static cycle_group commit(const std::vector< field_t > &inputs, GeneratorContext context={})
Compute a Pedersen commitment to the provided inputs.
Definition pedersen.cpp:26
typename cycle_group::Curve EmbeddedCurve
Definition pedersen.hpp:23
StrictMock< MockContext > context
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13