def dec_fin

bend-collections@1.0.0.0 · src/crypto/ed25519/point.bend:136

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

136def dec_fin(+x: List<&2, U32>, +y: List<&2, U32>, +x0: U32, fail: Bool) -> Maybe<&2, Pt>:
137  match fail:
138    case True{}:
139      None{}
140    case False{}:
141      +x2 = F.select(U32.xor(F.parity(x), x0), x, F.neg(x))
142      Some{Pt{x2, y, F.one(), F.mul(x2, y)}}

Uses (11)

Used by (1)