def sqm1

bend-collections-laws-crypto@1.0.0.0 · spec/crypto/ed25519.bend:47

import bend-collections-laws-crypto@1.0.0.0/spec/crypto/ed25519.bend as Ed25519
import Base
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/curve25519/field.bend as FS

47# 2^((p - 1) / 4), a square root of -1
48def sqm1(+p: Nat) -> Nat:
49  FS.fpow(p, 2n, Nat.div(Nat.sub(p, 1n), 4n))

Uses (4)

Used by (8)