def Gf8.pow
import bend-osdev-gf@0.1.1.0/gf.bend as Gfimport 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))