utils/advmodes, utils/gcm-ref: Make conversions from `int' to `GF' explicit.
[catacomb] / utils / gcm-ref
index ccbf432..4a53737 100755 (executable)
@@ -54,7 +54,7 @@ def poly(nbits):
   base = C.GF(0).setbit(nbits).setbit(0)
   for k in xrange(1, nbits, 2):
     for cc in combs(range(1, nbits), k):
-      p = base + sum(C.GF(0).setbit(c) for c in cc)
+      p = base + sum((C.GF(0).setbit(c) for c in cc), C.GF(0))
       if p.irreduciblep(): POLYMAP[nbits] = p; return p
   raise ValueError, nbits