def main

bend-osdev-gf@0.1.1.0 · check.bend:61

import bend-osdev-gf@0.1.1.0/check.bend as Check
import Base
import bend-osdev-gf@0.1.1.0/gf.bend as G
import bend-osdev-gf@0.1.1.0/gf128.bend as H
import bend-osdev-gf@0.1.1.0/gfm.bend as M

61def main() -> IO(Unit):
62  do IO<Unit>:
63    IO.print(show(G.Gf8.mul(G.Gf8.aes(), 87, 131)))
64    IO.print(show(G.Gf8.mul(G.Gf8.aes(), 87, 19)))
65    IO.print(show(G.Gf8.xtime(G.Gf8.aes(), 87)))
66    IO.print(show(G.Gf8.inv(G.Gf8.aes(), 83)))
67    IO.print(Nat.show(G.Gf8.log(G.Gf8.aes(), 83)))
68    IO.print(show(G.Gf8.exp(G.Gf8.aes(), G.Gf8.log(G.Gf8.aes(), 83))))
69    IO.print(show(G.Gf8.exp(G.Gf8.rs(), 8n)))
70    IO.print(show(G.Gf8.div(G.Gf8.rs(), 1, 2)))
71    IO.print(Nat.show(tab.check(G.Gf8.aes())))
72    IO.print(Nat.show(tab.check(G.Gf8.rs())))
73    IO.print(H.Gf128.hex(H.Gf128.mul_gcm(gcm_c(), gcm_h())))
74    IO.print(H.Gf128.hex(H.Gf128.ghash(gcm_h(), [gcm_c(), H.Gf128.of_words(0, 0, 0, 128)])))
75    IO.print(H.Gf128.hex(H.Gf128.double_be(H.Gf128.of_words(2113366796, 448305587, 1044574279, 3105576047))))
76    IO.print(H.Gf128.hex(H.Gf128.double_le(H.Gf128.of_words(0, 0, 0, 255))))
77    IO.print(show(M.Gfm.mul(M.Gfm.bch13(), 1234, 5678)))
78    IO.print(show(M.Gfm.inv(M.Gfm.bch13(), 1234)))
79    IO.print(show(M.Gfm.log(M.Gfm.bch13(), 1234)))
80    IO.print(show(M.Gfm.exp(M.Gfm.bch14(), 16383)))

Uses (30)

Used by (0)

No other definition uses this definition.