Skip to content

Commit

Permalink
updates for blueprint compatibility #157
Browse files Browse the repository at this point in the history
  • Loading branch information
vo-nil committed May 21, 2024
1 parent 1b452ed commit c39ad3a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,11 @@ namespace nil {
* @return true if element from group G1 is the point at infinity
*/
constexpr bool is_zero() const {
/* Special case for blueprint compatibility: (0,0) is also infinity */
/* Special case for blueprint compatibility:
* (0,1) is infinity
* (0,0) is infinity too */
return (X == params_type::zero_fill[0] && Y == params_type::zero_fill[1])
|| (X.is_zero() && Y.is_zero() );
|| (X.is_zero() && Y.is_one() );
}

/** @brief
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ namespace nil {
*
*/
constexpr curve_element() :
curve_element(params_type::zero_fill[0],
params_type::zero_fill[1],
curve_element(field_value_type::zero(),
field_value_type::one(),
field_value_type::zero(),
field_value_type::one()) {}

Expand Down

0 comments on commit c39ad3a

Please sign in to comment.