pub trait Elligator2Config: TECurveConfig + MontCurveConfig {
const Z: <Self as CurveConfig>::BaseField;
const ONE_OVER_COEFF_B_SQUARE: <Self as CurveConfig>::BaseField;
const COEFF_A_OVER_COEFF_B: <Self as CurveConfig>::BaseField;
}
Expand description
Trait defining the necessary parameters for the Elligator2 hash-to-curve method
for twisted edwards curves form of:
b * y² = x³ + a * x² + x
from [[BHKL13]], according to [[HSSWW23]]
- [[BHKL13]] http://dx.doi.org/10.1145/2508859.2516734
- [[HSSWW23]] https://datatracker.ietf.org/doc/html/rfc9380
Required Associated Constants§
Sourceconst Z: <Self as CurveConfig>::BaseField
const Z: <Self as CurveConfig>::BaseField
An element of the base field that is not a square root see [BHKL13, Section 5].
When BaseField
is a prime field, [[HSSWW23]] mandates that Z
is the
non-square with lowest absolute value in the BaseField
when its elements
are represented as [-(q-1)/2, (q-1)/2]
Sourceconst ONE_OVER_COEFF_B_SQUARE: <Self as CurveConfig>::BaseField
const ONE_OVER_COEFF_B_SQUARE: <Self as CurveConfig>::BaseField
This must be equal to 1/(MontCurveConfig::COEFF_B)^2;
Sourceconst COEFF_A_OVER_COEFF_B: <Self as CurveConfig>::BaseField
const COEFF_A_OVER_COEFF_B: <Self as CurveConfig>::BaseField
This must be equal to MontCurveConfig::COEFF_A/MontCurveConfig::COEFF_B;
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.