Gadget.Edwards25519module L : sig ... endmodule Curve = Mec.Curve.Curve25519.AffineEdwardsval point_encoding : (Curve.t, point L.repr, point) L.Encodings.encodingval input_point : ?kind:L.input_kind -> (Z.t * Z.t) -> point L.repr L.tReturns a Plompiler representation of a point
is_on_curve p checks whether a point p is on the curve
from_coordinates x y constructs a point p = (x, y) from coordinates x and y. The function also checks whether the point is on the curve (but not necessarily in the subgroup)
unsafe_from_coordinates x y is similar to from_coordinates but does not verify the point is on the curve. It can be used to build a variable of type point without adding any constraint
get_x_coordinate p returns a first coordinate x of a point p
get_y_coordinate p returns a second coordinate y of a point p
cond_add p q b returns p + b * q, i.e., either a point addition p and q or a point p based on the value b
scalar_mul s p computes a point multiplication p by a scalar s. The scalar s is encoded in little-endian order
multi_scalar_mul ls lp computes the multi-scalar multiplication s₁·p₁ + s₂·p₂ + … + sₖ·pₖ
val to_compressed_bytes : point L.repr -> L.Bytes.tl L.repr L.tto_compressed_bytes p returns the compressed representation of a point p = (x, y) in little-endian bytes pow2 255 * (x % 2) + y