def dconst

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

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

43# d = -121665 / 121666
44def dconst(+one: Nat, +p: Nat) -> Nat:
45  FS.fmul(p, FS.fsub(p, 0n, FS.digits(one, [65n, 219n, 1n])), FS.finv(p, FS.digits(one, [66n, 219n, 1n])))

Uses (6)

Used by (12)