new Galois implementation