|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
An object storing two EC points that represent the inputs to a pairing check. More...
#include <pairing_points.hpp>
Public Types | |
| using | Curve = Curve_ |
| using | Point = typename Curve::AffineElement |
| using | Fr = typename Curve::ScalarField |
| using | Fq = typename Curve::BaseField |
| using | VerifierCK = VerifierCommitmentKey< curve::BN254 > |
| using | value_type = Point |
Public Member Functions | |
| Point & | P0 () |
| Point & | P1 () |
| const Point & | P0 () const |
| const Point & | P1 () const |
| PairingPoints ()=default | |
| PairingPoints (const Point &p0, const Point &p1) | |
| auto | begin () |
| auto | end () |
| auto | begin () const |
| auto | end () const |
| void | aggregate (const PairingPoints< Curve > &other) |
| Aggregate the current pairing points with another set of pairing points using a random scalar. | |
| bool | check () const |
| Verify the pairing equation e(P0, [1]₂) · e(P1, [x]₂) = 1. | |
Static Public Member Functions | |
| static constexpr size_t | size () |
Static Public Attributes | |
| static constexpr size_t | PUBLIC_INPUTS_SIZE = PAIRING_POINTS_SIZE |
| static constexpr size_t | SIZE = 2 |
Private Attributes | |
| std::array< Point, 2 > | _points = { Point::infinity(), Point::infinity() } |
An object storing two EC points that represent the inputs to a pairing check.
The points may represent the output of a single partial verification or the linear combination of multiple sets of pairing points, i.e. a pairing point "accumulator".
| Curve_ | The curve type (defaults to curve::BN254 for native, or use stdlib::bn254<Builder> for recursive) |
Definition at line 22 of file pairing_points.hpp.
| using bb::PairingPoints< Curve_ >::Curve = Curve_ |
Definition at line 24 of file pairing_points.hpp.
| using bb::PairingPoints< Curve_ >::Fq = typename Curve::BaseField |
Definition at line 27 of file pairing_points.hpp.
| using bb::PairingPoints< Curve_ >::Fr = typename Curve::ScalarField |
Definition at line 26 of file pairing_points.hpp.
| using bb::PairingPoints< Curve_ >::Point = typename Curve::AffineElement |
Definition at line 25 of file pairing_points.hpp.
| using bb::PairingPoints< Curve_ >::value_type = Point |
Definition at line 33 of file pairing_points.hpp.
| using bb::PairingPoints< Curve_ >::VerifierCK = VerifierCommitmentKey<curve::BN254> |
Definition at line 28 of file pairing_points.hpp.
|
default |
|
inline |
Definition at line 43 of file pairing_points.hpp.
|
inline |
Aggregate the current pairing points with another set of pairing points using a random scalar.
A pairing accumulator is valid only when it is either fully default (both points at infinity, i.e. uninitialized) or fully populated (neither point at infinity). A mixed-infinity state (exactly one point at infinity) is corrupt and must never be silently treated as uninitialized, otherwise a real accumulator point would be discarded. The incoming points must always be the output of an actual PCS verification, so they must be fully populated.
Definition at line 62 of file pairing_points.hpp.
|
inline |
Definition at line 48 of file pairing_points.hpp.
|
inline |
Definition at line 50 of file pairing_points.hpp.
|
inline |
Verify the pairing equation e(P0, [1]₂) · e(P1, [x]₂) = 1.
Definition at line 93 of file pairing_points.hpp.
|
inline |
Definition at line 49 of file pairing_points.hpp.
|
inline |
Definition at line 51 of file pairing_points.hpp.
|
inline |
Definition at line 37 of file pairing_points.hpp.
|
inline |
Definition at line 39 of file pairing_points.hpp.
|
inline |
Definition at line 38 of file pairing_points.hpp.
|
inline |
Definition at line 40 of file pairing_points.hpp.
|
inlinestaticconstexpr |
Definition at line 52 of file pairing_points.hpp.
|
private |
Definition at line 103 of file pairing_points.hpp.
|
staticconstexpr |
Definition at line 30 of file pairing_points.hpp.
|
staticconstexpr |
Definition at line 34 of file pairing_points.hpp.