Class Elligator2MapToCurve

java.lang.Object
org.bouncycastle.crypto.hash2curve.impl.Elligator2MapToCurve
All Implemented Interfaces:
MapToCurve

public class Elligator2MapToCurve extends Object implements MapToCurve
Implements the Elligator 2 Map to curve according to section 6.7.1 of RFC 9380 This is the straight-line implementation optimized for Montgomery curves as defined in section F.3.
  • Constructor Details

    • Elligator2MapToCurve

      public Elligator2MapToCurve(ECCurve curve, BigInteger z, BigInteger J, BigInteger K)
      Constructs an Elligator2MapToCurve instance using the provided elliptic curve parameters and constants.
      Parameters:
      curve - the elliptic curve (ECCurve) to which the input values will be mapped
      z - a non-square element of the elliptic curve field
      J - the Montgomery curve equation A value (Named J in RFC 9380)
      K - the Montgomery curve equation B value (Named K in RFC 9380)
  • Method Details

    • process

      public ECPoint process(BigInteger u)
      Processes the given input value to map it to an elliptic curve point using the Elligator 2 algorithm, optimized for Montgomery curves. This implementation adheres to the specifications outlined in RFC 9380, section 6.7.1, and section F.3 for efficient computation.
      Specified by:
      process in interface MapToCurve
      Parameters:
      u - the input value to be mapped to a point on the elliptic curve
      Returns:
      the computed point on the elliptic curve represented as an ECPoint