Documentation
¶
Index ¶
- func G1Isogeny(pX, pY *fp.Element)
- func G1IsogenyMap() [4][]fp.Element
- func G1MulByZ(z *fp.Element, x *fp.Element)
- func G1NotZero(x *fp.Element) uint64
- func G1SSWUIsogenyCurveCoefficients() (A fp.Element, B fp.Element)
- func G1SSWUIsogenyZ() fp.Element
- func G1Sgn0(z *fp.Element) uint64
- func G1SqrtRatio(z *fp.Element, u *fp.Element, v *fp.Element) uint64
- func G2Isogeny(pX, pY *fptower.E2)
- func G2IsogenyMap() [4][]fptower.E2
- func G2MulByZ(z *fptower.E2, x *fptower.E2)
- func G2NotZero(x *fptower.E2) uint64
- func G2SSWUIsogenyCurveCoefficients() (A fptower.E2, B fptower.E2)
- func G2SSWUIsogenyZ() fptower.E2
- func G2Sgn0(z *fptower.E2) uint64
- func G2SqrtRatio(z *fptower.E2, u *fptower.E2, v *fptower.E2) uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func G1Isogeny ¶
G1 computes the isogeny map of the curve element, given by its coordinates pX and pY. It mutates the coordinates pX and pY to the new coordinates of the isogeny map.
func G1IsogenyMap ¶
G1IsogenyMap returns the isogeny map for the curve. The isogeny map is a list of polynomial coefficients for the x and y coordinate computation. The order of the coefficients is as follows: - x numerator, x denominator, y numerator, y denominator.
func G1SSWUIsogenyCurveCoefficients ¶
G1SSWUCurveCoefficients returns the coefficients of the SSWU curve.
func G1SSWUIsogenyZ ¶
G1SSWUIsogenyZ returns the recommended Z value of the SSWU curve.
func G1Sgn0 ¶
G1Sgn0 is an algebraic substitute for the notion of sign in ordered fields. Namely, every non-zero quadratic residue in a finite field of characteristic =/= 2 has exactly two square roots, one of each sign.
See: https://www.rfc-editor.org/rfc/rfc9380.html#name-the-sgn0-function
The sign of an element is not obviously related to that of its Montgomery form
func G1SqrtRatio ¶
G1SqrtRatio computes the square root of u/v and returns 0 iff u/v was indeed a quadratic residue. If not, we get sqrt(Z * u / v). Recall that Z is non-residue. If v = 0, u/v is meaningless and the output is unspecified, without raising an error. The main idea is that since the computation of the square root involves taking large powers of u/v, the inversion of v can be avoided
func G2Isogeny ¶
G2 computes the isogeny map of the curve element, given by its coordinates pX and pY. It mutates the coordinates pX and pY to the new coordinates of the isogeny map.
func G2IsogenyMap ¶
G2IsogenyMap returns the isogeny map for the curve. The isogeny map is a list of polynomial coefficients for the x and y coordinate computation. The order of the coefficients is as follows: - x numerator, x denominator, y numerator, y denominator.
func G2SSWUIsogenyCurveCoefficients ¶
G2SSWUCurveCoefficients returns the coefficients of the SSWU curve.
func G2SSWUIsogenyZ ¶
G2SSWUIsogenyZ returns the recommended Z value of the SSWU curve.
func G2Sgn0 ¶
G2Sgn0 is an algebraic substitute for the notion of sign in ordered fields. Namely, every non-zero quadratic residue in a finite field of characteristic =/= 2 has exactly two square roots, one of each sign.
See: https://www.rfc-editor.org/rfc/rfc9380.html#name-the-sgn0-function
The sign of an element is not obviously related to that of its Montgomery form
func G2SqrtRatio ¶
G2SqrtRatio computes the square root of u/v and returns 0 iff u/v was indeed a quadratic residue. If not, we get sqrt(Z * u / v). Recall that Z is non-residue. If v = 0, u/v is meaningless and the output is unspecified, without raising an error. The main idea is that since the computation of the square root involves taking large powers of u/v, the inversion of v can be avoided
Types ¶
This section is empty.