diff --git a/cbits/aes.c b/cbits/aes.c
--- a/cbits/aes.c
+++ b/cbits/aes.c
@@ -319,7 +319,7 @@
 static void gcm_ghash_add(const aes_gcm *gcm, aes_ctx *ctx, const block128 *b)
 {
         block128_xor(&ctx->tag, b);
-        gf_mul(&ctx->tag, &gcm->h);
+        tmd_gf_mul(&ctx->tag, &gcm->h);
 }
 
 void tmd_aes_gcm_init(aes_gcm *gcm, const aes_key *key)
@@ -345,15 +345,15 @@
                 int i;
                 for (; len >= 16; len -= 16, iv += 16) {
                         block128_xor(&ctx->iv, (block128 *) iv);
-                        gf_mul(&ctx->iv, &gcm->h);
+                        tmd_gf_mul(&ctx->iv, &gcm->h);
                 }
                 if (len > 0) {
                         block128_xor_bytes(&ctx->iv, iv, len);
-                        gf_mul(&ctx->iv, &gcm->h);
+                        tmd_gf_mul(&ctx->iv, &gcm->h);
                 }
                 for (i = 15; origlen; --i, origlen >>= 8)
                         ctx->iv.b[i] ^= (uint8_t) origlen;
-                gf_mul(&ctx->iv, &gcm->h);
+                tmd_gf_mul(&ctx->iv, &gcm->h);
         }
 
         block128_copy(&ctx->civ, &ctx->iv);
@@ -496,9 +496,9 @@
 
         /* TO OPTIMISE: this is really inefficient way to do that */
         while (spoint-- > 0)
-                gf_mulx(&tweak);
+                tmd_gf_mulx(&tweak);
 
-        for ( ; nb_blocks-- > 0; input++, output++, gf_mulx(&tweak)) {
+        for ( ; nb_blocks-- > 0; input++, output++, tmd_gf_mulx(&tweak)) {
                 block128_vxor(&block, input, &tweak);
                 aes_encrypt_block(&block, k1, &block);
                 block128_vxor(output, &block, &tweak);
@@ -516,9 +516,9 @@
 
         /* TO OPTIMISE: this is really inefficient way to do that */
         while (spoint-- > 0)
-                gf_mulx(&tweak);
+                tmd_gf_mulx(&tweak);
 
-        for ( ; nb_blocks-- > 0; input++, output++, gf_mulx(&tweak)) {
+        for ( ; nb_blocks-- > 0; input++, output++, tmd_gf_mulx(&tweak)) {
                 block128_vxor(&block, input, &tweak);
                 aes_decrypt_block(&block, k1, &block);
                 block128_vxor(output, &block, &tweak);
diff --git a/cbits/aes_x86ni.c b/cbits/aes_x86ni.c
--- a/cbits/aes_x86ni.c
+++ b/cbits/aes_x86ni.c
@@ -143,7 +143,7 @@
 
 /* TO OPTIMISE: use pcmulqdq... or some faster code.
  * this is the lamest way of doing it, but i'm out of time.
- * this is basically a copy of gf_mulx in gf.c */
+ * this is basically a copy of tmd_gf_mulx in gf.c */
 static __m128i gfmulx(__m128i v)
 {
 	uint64_t v_[2] ALIGNMENT(16);
diff --git a/cbits/gf.c b/cbits/gf.c
--- a/cbits/gf.c
+++ b/cbits/gf.c
@@ -39,7 +39,7 @@
  * to speed up the multiplication.
  * TODO: optimise with tables
  */
-void gf_mul(block128 *a, const block128 *b)
+void tmd_gf_mul(block128 *a, const block128 *b)
 {
 	uint64_t a0, a1, v0, v1;
 	int i, j;
@@ -62,7 +62,7 @@
 }
 
 /* inplace GFMUL for xts mode */
-void gf_mulx(block128 *a)
+void tmd_gf_mulx(block128 *a)
 {
 	const uint64_t gf_mask = cpu_to_le64(0x8000000000000000ULL);
 	uint64_t r = ((a->q[1] & gf_mask) ? cpu_to_le64(0x87) : 0);
diff --git a/cbits/gf.h b/cbits/gf.h
--- a/cbits/gf.h
+++ b/cbits/gf.h
@@ -32,7 +32,7 @@
 
 #include "block128.h"
 
-void gf_mul(block128 *a, const block128 *b);
-void gf_mulx(block128 *a);
+void tmd_gf_mul(block128 *a, const block128 *b);
+void tmd_gf_mulx(block128 *a);
 
 #endif
diff --git a/cipher-aes128.cabal b/cipher-aes128.cabal
--- a/cipher-aes128.cabal
+++ b/cipher-aes128.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                cipher-aes128
-version:             0.6.3
+version:             0.6.4
 synopsis:            AES and common modes using AES-NI when available.
 description:         Cipher-aes128 is an implementation of AES and common modes of operation.  It borrows Hanquez's C AES code (see 'cipher-aes') but
                      is unique due to including compile-time detection of
