Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
acir_format::EcAdd Struct Reference

Constraints for addition of two points on the Grumpkin curve. More...

#include <ec_operations.hpp>

Public Attributes

WitnessOrConstant< bb::frinput1_x
 
WitnessOrConstant< bb::frinput1_y
 
WitnessOrConstant< bb::frinput2_x
 
WitnessOrConstant< bb::frinput2_y
 
WitnessOrConstant< bb::frpredicate
 
uint32_t result_x
 
uint32_t result_y
 

Friends

bool operator== (EcAdd const &lhs, EcAdd const &rhs)=default
 

Detailed Description

Constraints for addition of two points on the Grumpkin curve.

EcAdd constraints have 7 components:

  • input1_x: x-coordinate of the first input point
  • input1_y: y-coordinate of the first input point
  • input2_x: x-coordinate of the second input point
  • input2_y: y-coordinate of the second input point
  • predicate: flag indicating whether the constraint is active
  • result_x: witness index for the x-coordinate of the resulting point
  • result_y: witness index for the y-coordinate of the resulting point

The point at infinity is represented by the coordinates (0, 0). The data related to input1 and input2 can either be given by witnesses or constants. However, x and y coordinates pertaining to the same input must be either all witnesses or all constants.

Definition at line 29 of file ec_operations.hpp.

Friends And Related Symbol Documentation

◆ operator==

bool operator== ( EcAdd const &  lhs,
EcAdd const &  rhs 
)
friend

Member Data Documentation

◆ input1_x

WitnessOrConstant<bb::fr> acir_format::EcAdd::input1_x

Definition at line 30 of file ec_operations.hpp.

◆ input1_y

WitnessOrConstant<bb::fr> acir_format::EcAdd::input1_y

Definition at line 31 of file ec_operations.hpp.

◆ input2_x

WitnessOrConstant<bb::fr> acir_format::EcAdd::input2_x

Definition at line 32 of file ec_operations.hpp.

◆ input2_y

WitnessOrConstant<bb::fr> acir_format::EcAdd::input2_y

Definition at line 33 of file ec_operations.hpp.

◆ predicate

WitnessOrConstant<bb::fr> acir_format::EcAdd::predicate

Definition at line 37 of file ec_operations.hpp.

◆ result_x

uint32_t acir_format::EcAdd::result_x

Definition at line 38 of file ec_operations.hpp.

◆ result_y

uint32_t acir_format::EcAdd::result_y

Definition at line 39 of file ec_operations.hpp.


The documentation for this struct was generated from the following file: