Class Elligator2MapToCurve
- java.lang.Object
-
- org.bouncycastle.crypto.hash2curve.impl.Elligator2MapToCurve
-
- All Implemented Interfaces:
MapToCurve
public class Elligator2MapToCurve extends java.lang.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 Summary
Constructors Constructor Description Elligator2MapToCurve(ECCurve curve, java.math.BigInteger z, java.math.BigInteger J, java.math.BigInteger K)Constructs an Elligator2MapToCurve instance using the provided elliptic curve parameters and constants.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ECPointprocess(java.math.BigInteger u)Processes the given input value to map it to an elliptic curve point using the Elligator 2 algorithm, optimized for Montgomery curves.
-
-
-
Constructor Detail
-
Elligator2MapToCurve
public Elligator2MapToCurve(ECCurve curve, java.math.BigInteger z, java.math.BigInteger J, java.math.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 mappedz- a non-square element of the elliptic curve fieldJ- the Montgomery curve equation A value (Named J in RFC 9380)K- the Montgomery curve equation B value (Named K in RFC 9380)
-
-
Method Detail
-
process
public ECPoint process(java.math.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:
processin interfaceMapToCurve- 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
-
-