def Gf8.pow

bend-osdev-gf@0.1.1.0 · gf.bend:138

import bend-osdev-gf@0.1.1.0/gf.bend as Gf
import Base

138# a^n, with a^0 = 1 (also for a = 0)
139def Gf8.pow(+f: Gf8Field, +a: U32, n: Nat) -> U32:
140  match n:
141    case 0n:
142      1
143    case 1n+k:
144      Gf8.mul(f, a, Gf8.pow(f, a, k))

Uses (4)

Used by (7)