The class Gf implements basic arithmetic in Galois fields, based on any implementation of
polynomial arithmetic. You can use z2-polynomial
for GF(2n).
The class GfAesMult implements an algorithm for multiplication in GF(2n) using the
xtimes function, as described in section 4.3 of the
NIST AES spec. This
algorithm is conceptually simpler than the usual a * b mod m as it reduces the problem to
multiplication with the x polynomial. You can find a detailed explanation of it in
this blog post.