def pow_bit

bend-collections@1.0.0.0 · src/crypto/curve25519/field.bend:227

import bend-collections@1.0.0.0/src/crypto/curve25519/field.bend as Field
import Base

227# one bit of a public exponent, most significant first: acc^2 (* x)
228def pow_bit(b: Bool, +x: List<&2, U32>, acc: List<&2, U32>) -> List<&2, U32>:
229  match b:
230    case True{}:
231      mul(sq(acc), x)
232    case False{}:
233      sq(acc)

Uses (5)

Used by (1)