const ge_frombytes_negate_vartime_v: FieldElement = fe()
const ge_frombytes_negate_vartime_v3: FieldElement = fe()
const ge_frombytes_negate_vartime_vxx: FieldElement = fe()
-const ge_frombytes_negate_vartime_m_root_check: FieldElement = fe()
-const ge_frombytes_negate_vartime_p_root_check: FieldElement = fe()
+const ge_frombytes_negate_vartime_check: FieldElement = fe()
/**
* Variable-time point negation converted from byte representation.
*
const v = ge_frombytes_negate_vartime_v
const v3 = ge_frombytes_negate_vartime_v3
const vxx = ge_frombytes_negate_vartime_vxx
- const m_root_check = ge_frombytes_negate_vartime_m_root_check
- const p_root_check = ge_frombytes_negate_vartime_p_root_check
+ const check = ge_frombytes_negate_vartime_check
fe_frombytes(h.Y, s)
fe_1(h.Z)
fe_mul(h.X, h.X, v)
fe_mul(h.X, h.X, u)
- // x = (uv⁷)^((q-5)/8)
+ // x = (uv⁷)⁽𐞥⁻⁵⁾⸍⁸
fe_pow22523(h.X, h.X, t_fe_0, t_fe_1, t_fe_2)
- // x = uv³((uv⁷)^((q-5)/8))
+ // x = uv³((uv⁷)⁽𐞥⁻⁵⁾⸍⁸) = u⁽𐞥⁺³⁾⸍⁸v⁽⁷𐞥⁻¹¹⁾⸍⁸
fe_mul(h.X, h.X, v3)
fe_mul(h.X, h.X, u)
fe_mul(vxx, vxx, v)
// m = vx²-u
- fe_sub(m_root_check, vxx, u)
- if (fe_iszero(m_root_check, t_fe_0, t_u8x32) == 0) {
+ fe_sub(check, vxx, u)
+ if (fe_iszero(check, t_fe_0, t_u8x32) == 0) {
// p = vx²+u
- fe_add(p_root_check, vxx, u)
- if (fe_iszero(p_root_check, t_fe_0, t_u8x32) == 0) {
+ fe_add(check, vxx, u)
+ if (fe_iszero(check, t_fe_0, t_u8x32) == 0) {
return -1
}
fe_mul_sqrtm1(h.X, h.X)