|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include <standard_affine_point.hpp>
Public Types | |
| using | BaseField = AffinePoint::Fq |
| using | ScalarField = AffinePoint::Fr |
Public Member Functions | |
| constexpr | StandardAffinePoint () noexcept=default |
| constexpr | StandardAffinePoint (AffinePoint val) noexcept |
| constexpr | StandardAffinePoint (BaseField x, BaseField y) noexcept |
| constexpr StandardAffinePoint | operator+ (const StandardAffinePoint &other) const noexcept |
| constexpr StandardAffinePoint | operator* (const ScalarField &exponent) const noexcept |
| constexpr bool | operator== (const StandardAffinePoint &other) const noexcept |
| constexpr StandardAffinePoint | operator- () const noexcept |
| constexpr bool | is_infinity () const noexcept |
| constexpr bool | on_curve () const noexcept |
| constexpr const BaseField & | x () const noexcept |
| constexpr const BaseField & | y () const noexcept |
Static Public Member Functions | |
| static const StandardAffinePoint & | infinity () |
| static const StandardAffinePoint & | one () |
Private Attributes | |
| AffinePoint | point |
| BaseField | x_coord = zero |
| BaseField | y_coord = zero |
Static Private Attributes | |
| static constexpr const auto | zero = BaseField::zero() |
The AVM's representation of infinity is inherited from noir's and is expected to be 0,0. BB, however, uses only the two coordinates to represent points. Infinity in barretenberg is represented as (P+1)/2,0,true. This class is a wrapper of the BB representation, needed to operate with points, that allows us to extract the standard representation that AVM bytecode expects.
NOTE: When constructing infinity from BB's two element representation, we keep the original AffinePoint so operations can use it in the background, but set extractable coordinates to be our represention of (0,0). NOTE: When constructing infinity via BaseFields (equiv. inputting (0, 0), the underlying AffinePoint is set to BB's representation so operations can use it in the background.
Definition at line 19 of file standard_affine_point.hpp.
| using bb::avm2::StandardAffinePoint< AffinePoint >::BaseField = AffinePoint::Fq |
Definition at line 21 of file standard_affine_point.hpp.
| using bb::avm2::StandardAffinePoint< AffinePoint >::ScalarField = AffinePoint::Fr |
Definition at line 22 of file standard_affine_point.hpp.
|
constexprdefaultnoexcept |
|
inlineconstexprnoexcept |
Definition at line 26 of file standard_affine_point.hpp.
|
inlineconstexprnoexcept |
Definition at line 32 of file standard_affine_point.hpp.
|
inlinestatic |
Definition at line 82 of file standard_affine_point.hpp.
|
inlineconstexprnoexcept |
Definition at line 72 of file standard_affine_point.hpp.
|
inlineconstexprnoexcept |
Definition at line 74 of file standard_affine_point.hpp.
|
inlinestatic |
Definition at line 88 of file standard_affine_point.hpp.
|
inlineconstexprnoexcept |
Definition at line 48 of file standard_affine_point.hpp.
|
inlineconstexprnoexcept |
Definition at line 38 of file standard_affine_point.hpp.
|
inlineconstexprnoexcept |
Definition at line 63 of file standard_affine_point.hpp.
|
inlineconstexprnoexcept |
Definition at line 58 of file standard_affine_point.hpp.
|
inlineconstexprnoexcept |
Definition at line 78 of file standard_affine_point.hpp.
|
inlineconstexprnoexcept |
Definition at line 80 of file standard_affine_point.hpp.
|
private |
Definition at line 97 of file standard_affine_point.hpp.
|
private |
Definition at line 100 of file standard_affine_point.hpp.
|
private |
Definition at line 101 of file standard_affine_point.hpp.
|
staticconstexprprivate |
Definition at line 102 of file standard_affine_point.hpp.