[PATCH] Support for Counter (CTR) mode

Simon Josefsson jas@extundo.com
Mon, 31 Mar 2003 14:12:23 +0200


Moritz Schulte <moritz@duesseldorf.ccc.de> writes:

> Thanks for your patch, I just applied it.

Thanks.  The patch below adds CTR to the benchmark output too, I
forgot it.

For reference, these are the timings I get on a AMD800.

Algo       ECB             CBC             CFB             CTR
---------- --------------- --------------- --------------- ---------------
AES256       110ms   120ms   120ms   140ms   130ms   120ms   130ms   130ms

--- benchmark.c.~1.4.~	Mon Mar 31 14:05:41 2003
+++ benchmark.c	Mon Mar 31 14:07:11 2003
@@ -1,5 +1,5 @@
 /* benchmark.c - for libgcrypt
- *	Copyright (C) 2002 Free Software Foundation, Inc.
+ *	Copyright (C) 2002, 2003 Free Software Foundation, Inc.
  *
  * This file is part of Libgcrypt.
  *
@@ -158,6 +158,7 @@
     { GCRY_CIPHER_MODE_ECB, "ECB", 1 },
     { GCRY_CIPHER_MODE_CBC, "CBC", 1 },
     { GCRY_CIPHER_MODE_CFB, "CFB", 0 },
+    { GCRY_CIPHER_MODE_CFB, "CTR", 0 },
     { GCRY_CIPHER_MODE_STREAM, "STREAM", 0 },
     {0}
   };