def dec_root
bend-collections@1.0.0.0 · src/crypto/ed25519/point.bend:144
import bend-collections@1.0.0.0/src/crypto/ed25519/point.bend as Point
import Base
import bend-collections@1.0.0.0/src/crypto/curve25519/field.bend as F
144def dec_root(+c: Cs, +x: List<&2, U32>, +y: List<&2, U32>, +x0: U32, +u: List<&2, U32>, +vxx: List<&2, U32>, is_u: Bool, is_nu: Bool) -> Maybe<&2, Pt>:
145 match is_u:
146 case True{}:
147 dec_fin(x, y, x0, Bool.and(F.is_zero(x), U32.is_eq(x0, 1)))
148 case False{}:
149 match is_nu:
150 case True{}:
151 +x1 = F.mul(x, cs_s(c))
152 dec_fin(x1, y, x0, Bool.and(F.is_zero(x1), U32.is_eq(x0, 1)))
153 case False{}:
154 None{}