simfony_as_rust::jet

Module elliptic_curve_functions

source
Expand description

§Elliptic curve functions

This module defines jets that replicate the functional behavior of (a specific version of) libsecp256k1’s elliptic curve operations https://github.com/bitcoin-core/secp256k1/tree/v0.3.0. The functions defined here return precisely the same field and point representatives that the corresponding libsecp256k1’s functions do, with a few exceptions with the way the point at infinity is handled.

Functions§

  • Decompress a point into affine coordinates.
  • Add two field elements.
  • Compute the modular inverse of a field element.
  • Check if the canonical representative of the field element is odd.
  • Check if the field element represents zero.
  • Multiply two field elements.
  • Multiply a field element by the canonical primitive cube root of unity (beta).
  • Negate a field element.
  • Return the canonical representation of a field element.
  • Square a field element.
  • Compute the modular square root of a field element if it exists.
  • Check if the given point satisfies the curve equation y² = x³ + 7.
  • Negate a point.
  • Add two points.
  • Double a point. If the result is the point at infinity, it is returned in canonical form.
  • Check if two points represent the same point.
  • Add two points. If the result is the point at infinity, it is returned in canonical form.
  • Add two points. Also return the ration of the as z-coordinate and the result’s z-coordinate. If the result is the point at infinity, it is returned in canonical form.
  • Check if two points represent the same point.
  • Return the canonical representation of the point at infinity.
  • Check if the point represents infinity.
  • Check if the given point satisfies the curve equation y² = x³ + 7.
  • Negate a point.
  • Convert the point into affine coordinates with canonical field representatives. If the result is the point at infinity, it is returned in canonical form.
  • Change the representatives of a point by multiplying the z-coefficient by the given value.
  • Check if the point represents an affine point with the given x-coordinate.
  • Check if the point represents an affine point with odd y-coordinate.
  • Multiply the generator point with the given scalar.
  • A cryptographic hash function that results in a point on the secp256k1 curve.
  • Compute the linear combination b * a + c * g for point b and scalars a and c, where g is the generator point.
  • Assert that a point b is equal to the linear combination a.0 * a.1 + a.2 * g, where g is the generator point.
  • Assert that a point b is equal to the linear combination a.0 * a.1 + a.2 * g, where g is the generator point.
  • Add two scalars.
  • Compute the modular inverse of a scalar.
  • Check if the scalar represents zero.
  • Multiply two scalars.
  • Multiply a scalar with the canonical primitive cube of unity (lambda)
  • Negate a scalar.
  • Return the canonical representation of the scalar.
  • Square a scalar.
  • Multiply a point by a scalar.
  • Algebraically distribute a field element over the secp256k1 curve as defined in “Indifferentiable Hashing to Barreto-Naehrig Curves” by Pierre-Alain Fouque, Mehdi Tibouchi.