[svn] gcry - r1242 - in trunk: . cipher src tests
svn author dshaw
cvs at cvs.gnupg.org
Wed May 2 08:27:41 CEST 2007
Author: dshaw
Date: 2007-05-02 08:27:11 +0200 (Wed, 02 May 2007)
New Revision: 1242
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/cipher/ChangeLog
trunk/cipher/Makefile.am
trunk/cipher/cipher.c
trunk/configure.ac
trunk/src/ChangeLog
trunk/src/cipher.h
trunk/src/gcrypt.h.in
trunk/tests/ChangeLog
trunk/tests/basic.c
Log:
Add Camellia support.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-05-01 12:01:47 UTC (rev 1241)
+++ trunk/ChangeLog 2007-05-02 06:27:11 UTC (rev 1242)
@@ -1,3 +1,7 @@
+2007-05-02 David Shaw <dshaw at jabberwocky.com>
+
+ * NEWS, configure.ac: Add Camellia.
+
2007-04-30 Werner Koch <wk at g10code.com>
* README.apichanges: Move to doc/.
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2007-05-01 12:01:47 UTC (rev 1241)
+++ trunk/NEWS 2007-05-02 06:27:11 UTC (rev 1242)
@@ -16,6 +16,10 @@
* Support for the SEED cipher.
+ * Support for the Camellia cipher. Note that Camellia is disabled by
+ default, and that enabling it changes the license of libgcrypt from
+ LGPL to GPL.
+
* Support for OFB encryption mode.
* gcry_mpi_rshift does not anymore truncate the shift count.
@@ -56,6 +60,9 @@
GCRY_PK_USAGE_UNKN NEW
GCRY_PK_ECDSA NEW
GCRY_CIPHER_SEED NEW
+ GCRY_CIPHER_CAMELLIA128 NEW
+ GCRY_CIPHER_CAMELLIA192 NEW
+ GCRY_CIPHER_CAMELLIA256 NEW
GCRYCTL_FAKED_RANDOM_P NEW
GCRYCTL_PRINT_CONFIG NEW
GCRYCTL_SET_RNDEGD_SOCKET NEW.
Modified: trunk/cipher/ChangeLog
===================================================================
--- trunk/cipher/ChangeLog 2007-05-01 12:01:47 UTC (rev 1241)
+++ trunk/cipher/ChangeLog 2007-05-02 06:27:11 UTC (rev 1242)
@@ -1,3 +1,13 @@
+2007-05-02 David Shaw <dshaw at jabberwocky.com>
+
+ * Makefile.am, cipher.c: Add Camellia.
+
+ * camellia-glue.c: New. The necessary glue to interface libgcrypt
+ to the stock NTT Camellia distribution.
+
+ * camellia.h, camellia.c: The stock NTT Camellia distribution
+ (GPL).
+
2007-04-30 David Shaw <dshaw at jabberwocky.com>
* cipher.c: Use #if instead of #ifdef as configure defines the
Modified: trunk/cipher/Makefile.am
===================================================================
--- trunk/cipher/Makefile.am 2007-05-01 12:01:47 UTC (rev 1241)
+++ trunk/cipher/Makefile.am 2007-05-02 06:27:11 UTC (rev 1242)
@@ -75,7 +75,8 @@
tiger.c \
whirlpool.c \
twofish.c \
-rfc2268.c
+rfc2268.c \
+camellia.c camellia.h camellia-glue.c
# We need to lower the optimization for this module.
tiger.o: $(srcdir)/tiger.c
Modified: trunk/cipher/cipher.c
===================================================================
--- trunk/cipher/cipher.c 2007-05-01 12:01:47 UTC (rev 1241)
+++ trunk/cipher/cipher.c 2007-05-02 06:27:11 UTC (rev 1242)
@@ -75,6 +75,11 @@
#if USE_SEED
{ &_gcry_cipher_spec_seed, GCRY_CIPHER_SEED },
#endif
+#if USE_CAMELLIA
+ { &_gcry_cipher_spec_camellia128, GCRY_CIPHER_CAMELLIA128 },
+ { &_gcry_cipher_spec_camellia192, GCRY_CIPHER_CAMELLIA192 },
+ { &_gcry_cipher_spec_camellia256, GCRY_CIPHER_CAMELLIA256 },
+#endif
{ NULL }
};
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2007-05-01 12:01:47 UTC (rev 1241)
+++ trunk/configure.ac 2007-05-02 06:27:11 UTC (rev 1242)
@@ -502,7 +502,7 @@
if test "$PTH_CONFIG" = "no"; then
AC_MSG_WARN([[
***
-*** To build the Libgcrypt's random humber daemon
+*** To build the Libgcrypt's random number daemon
*** we need the support of the GNU Portable Threads Library.
*** Download it from ftp://ftp.gnu.org/gnu/pth/
*** On a Debian GNU/Linux system you might want to try
@@ -813,6 +813,11 @@
AC_DEFINE_UNQUOTED(USE_SEED, $found,
[Defined if this module should be included])
+LIST_MEMBER(camellia, $enabled_ciphers)
+test "$found" = "1" && GCRYPT_CIPHERS="$GCRYPT_CIPHERS camellia.lo camellia-glue.lo" && gpl="$gpl camellia"
+AC_DEFINE_UNQUOTED(USE_CAMELLIA, $found,
+ [Defined if this module should be included])
+
LIST_MEMBER(dsa, $enabled_pubkey_ciphers)
test "$found" = "1" && GCRYPT_PUBKEY_CIPHERS="$GCRYPT_PUBKEY_CIPHERS dsa.lo"
AC_DEFINE_UNQUOTED(USE_DSA, $found,
@@ -963,13 +968,12 @@
G10EOF
fi
-warn=""
for file in "random_modules"; do
- case "$file" in rndunix | rndw32) warn="$warn $file";; esac
+ case "$file" in rndunix | rndw32) gpl="$gpl $file";; esac
done
-if test -n "$warn"; then
+if test -n "$gpl"; then
echo "Please note that you are building a version of Libgcrypt with"
- echo " $warn"
+ echo " $gpl"
echo "included. These parts are licensed under the GPL and thus the"
echo "use of this library has to comply with the conditions of the GPL."
fi
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2007-05-01 12:01:47 UTC (rev 1241)
+++ trunk/src/ChangeLog 2007-05-02 06:27:11 UTC (rev 1242)
@@ -1,3 +1,7 @@
+2007-05-02 David Shaw <dshaw at jabberwocky.com>
+
+ * cipher.h, gcrypt.h.in: Add Camellia.
+
2007-04-30 Werner Koch <wk at g10code.com>
* gcrypt.h.in (GCRYCTL_PRINT_CONFIG): New.
Modified: trunk/src/cipher.h
===================================================================
--- trunk/src/cipher.h 2007-05-01 12:01:47 UTC (rev 1241)
+++ trunk/src/cipher.h 2007-05-02 06:27:11 UTC (rev 1242)
@@ -83,6 +83,9 @@
extern gcry_cipher_spec_t _gcry_cipher_spec_serpent256;
extern gcry_cipher_spec_t _gcry_cipher_spec_rfc2268_40;
extern gcry_cipher_spec_t _gcry_cipher_spec_seed;
+extern gcry_cipher_spec_t _gcry_cipher_spec_camellia128;
+extern gcry_cipher_spec_t _gcry_cipher_spec_camellia192;
+extern gcry_cipher_spec_t _gcry_cipher_spec_camellia256;
/* Declarations for the digest specifications. */
extern gcry_md_spec_t _gcry_digest_spec_crc32;
Modified: trunk/src/gcrypt.h.in
===================================================================
--- trunk/src/gcrypt.h.in 2007-05-01 12:01:47 UTC (rev 1241)
+++ trunk/src/gcrypt.h.in 2007-05-02 06:27:11 UTC (rev 1242)
@@ -765,7 +765,10 @@
GCRY_CIPHER_SERPENT256 = 306,
GCRY_CIPHER_RFC2268_40 = 307, /* Ron's Cipher 2 (40 bit). */
GCRY_CIPHER_RFC2268_128 = 308, /* Ron's Cipher 2 (128 bit). */
- GCRY_CIPHER_SEED = 309 /* 128 bit cipher described in RFC4269. */
+ GCRY_CIPHER_SEED = 309, /* 128 bit cipher described in RFC4269. */
+ GCRY_CIPHER_CAMELLIA128 = 310,
+ GCRY_CIPHER_CAMELLIA192 = 311,
+ GCRY_CIPHER_CAMELLIA256 = 312
};
/* The Rijndael algorithm is basically AES, so provide some macros. */
Modified: trunk/tests/ChangeLog
===================================================================
--- trunk/tests/ChangeLog 2007-05-01 12:01:47 UTC (rev 1241)
+++ trunk/tests/ChangeLog 2007-05-02 06:27:11 UTC (rev 1242)
@@ -1,3 +1,7 @@
+2007-05-02 David Shaw <dshaw at jabberwocky.com>
+
+ * basic.c (check_ciphers): Add Camellia.
+
2007-04-30 David Shaw <dshaw at jabberwocky.com>
* basic.c (check_ciphers): #if out ciphers we don't have. Add
Modified: trunk/tests/basic.c
===================================================================
--- trunk/tests/basic.c 2007-05-01 12:01:47 UTC (rev 1241)
+++ trunk/tests/basic.c 2007-05-02 06:27:11 UTC (rev 1242)
@@ -986,6 +986,11 @@
#if USE_SEED
GCRY_CIPHER_SEED,
#endif
+#if USE_CAMELLIA
+ GCRY_CIPHER_CAMELLIA128,
+ GCRY_CIPHER_CAMELLIA192,
+ GCRY_CIPHER_CAMELLIA256,
+#endif
0
};
static int algos2[] = {
More information about the Gnupg-commits
mailing list