[svn] gcry - r1244 - in trunk: . cipher src
svn author wk
cvs at cvs.gnupg.org
Wed May 2 11:47:22 CEST 2007
Author: wk
Date: 2007-05-02 11:46:53 +0200 (Wed, 02 May 2007)
New Revision: 1244
Modified:
trunk/AUTHORS
trunk/ChangeLog
trunk/NEWS
trunk/README
trunk/cipher/ChangeLog
trunk/cipher/camellia-glue.c
trunk/cipher/camellia.h
trunk/configure.ac
trunk/src/ChangeLog
trunk/src/global.c
Log:
More info from GCRYCTL_PRINT_CONFIG.
Put Camellia symbols into our namespace.
Modified: trunk/AUTHORS
===================================================================
--- trunk/AUTHORS 2007-05-02 06:28:23 UTC (rev 1243)
+++ trunk/AUTHORS 2007-05-02 09:46:53 UTC (rev 1244)
@@ -73,18 +73,22 @@
(Added OFB mode. Changed cipher/cipher.c, test/basic.c doc/gcrypt.tex.
added SHA-224, changed cipher/sha256.c, added HMAC tests.)
-
LIBGCRYPT Hye-Shik Chang 2006-09-07
Assigns Past and Future Changes
perky at freebsd.org
(SEED cipher)
-
LIBGCRYPT Werner Dittmann ** pending **
werner.dittmann at t-online.de
(mpi/amd64, tests/mpitests.c)
+GNUPG David Shaw
+Assigns past and future changes.
+dshaw at jabberwocky.com>
+(cipher/camellia-glue.c and related stuff)
+
+
More credits
============
The ATH implementation (src/ath*) has been taken from GPGME and
@@ -101,9 +105,12 @@
The ECC code cipher/ecc.c was based on code by Sergi Blanch i Torne,
sergi at calcurco dot org.
+The implementation of the Camellia cipher has been been taken from the
+original NTT provided GPL source.
+
Copyright 1998, 1999, 2000, 2001, 2002, 2003,
- 2006 Free Software Foundation, Inc.
+ 2006, 2007 Free Software Foundation, Inc.
This file is free software; as a special exception the author gives
unlimited permission to copy and/or distribute it, with or without
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-05-02 06:28:23 UTC (rev 1243)
+++ trunk/ChangeLog 2007-05-02 09:46:53 UTC (rev 1244)
@@ -1,3 +1,8 @@
+2007-05-02 Werner Koch <wk at g10code.com>
+
+ * configure.ac (LIBGCRYPT_DIGESTS, LIBGCRYPT_CIPHERS)
+ (LIBGCRYPT_PUBKEY_CIPHERS): Ac_define lists of algorithms.
+
2007-05-02 David Shaw <dshaw at jabberwocky.com>
* NEWS, configure.ac: Add Camellia.
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2007-05-02 06:28:23 UTC (rev 1243)
+++ trunk/NEWS 2007-05-02 09:46:53 UTC (rev 1244)
@@ -43,8 +43,13 @@
* Assembler support for the AMD64 architecture.
+ * New configure option --enable-mpi-path for optimized builds.
+
* Experimental support for ECDSA; should only be used for testing.
+ * New control code GCRYCTL_PRINT_CONFIG to print the build
+ configuration.
+
* Minor changes to some function declarations. Buffer arguments are
now typed as void pointer. This should not affect any compilation.
Fixed two bugs in return values and clarified documentation.
Modified: trunk/README
===================================================================
--- trunk/README 2007-05-02 06:28:23 UTC (rev 1243)
+++ trunk/README 2007-05-02 09:46:53 UTC (rev 1244)
@@ -23,7 +23,7 @@
Libgcrypt is a general purpose crypto library based on the code
used in GnuPG. We can't start with a new version number because
- libgcrypt was part of gnupg 1.1 and some applications already used
+ libgcrypt was part of GnuPG 1.1 and some applications already used
it and tested for the version number. We believe that the API can
stay as it is, except that new functions may be added in the
future.
@@ -56,6 +56,7 @@
rndw32 - Entropy gatherer for MS Windows
gcryptrnd - The random number daemon.
getrandom - A client for that daemon.
+ camellia - The Camellia cipher.
The documentation is available under the terms of the GPL.
@@ -112,7 +113,10 @@
features not provided by the system, like 64bit
data types. With these switches it is possible
to select exactly those algorithm modules, which
- should be built.
+ should be built. The algorithms are to be
+ separated by spaces, commas or colons. To view
+ the list used with the current build the program
+ tests/version may be used.
--disable-endian-check
Don't let configure test for the endianness but
@@ -121,10 +125,35 @@
--enable-random-daemon
Include support for a global random damon and
- build the daemon. The daemon itself is in an
- experimental state.
+ build the daemon. This is an experimental feature.
+ --enable-mpi-path=EXTRA_PATH
+ Prepend EXTRA_PATH to list of CPU specific
+ optimizations. For example, if you want to add
+ optimizations forn a Intel Pentium 4 compatible
+ CPU, you may use
+ --enable-mpi-path="pentium4/sse2 pentium4/mmx"
+ Take care: The generated library may crash on
+ non-compatible CPUs
+ --enable-random=NAME
+ Force the use of the random gathering module
+ NAME. Default is either to use /dev/random or
+ the auto mode. Possible values for NAME are:
+ egd - Use the module which accesses the
+ Entropy Gathering Daemon. See the webpages
+ for more information about it.
+ unix - Use the standard Unix module which does not
+ have a very good performance.
+ linux - Use the module which accesses /dev/random.
+ This is the first choice and the default one
+ for GNU/Linux or *BSD.
+ auto - Compile linux, egd and unix in and
+ automagically select at runtime.
+
+
+
+
Contact
-------
Modified: trunk/cipher/ChangeLog
===================================================================
--- trunk/cipher/ChangeLog 2007-05-02 06:28:23 UTC (rev 1243)
+++ trunk/cipher/ChangeLog 2007-05-02 09:46:53 UTC (rev 1244)
@@ -1,3 +1,7 @@
+2007-05-02 Werner Koch <wk at g10code.com>
+
+ * camellia.h: Redefine external symbols.
+
2007-05-02 David Shaw <dshaw at jabberwocky.com>
* Makefile.am, cipher.c: Add Camellia.
Modified: trunk/cipher/camellia-glue.c
===================================================================
--- trunk/cipher/camellia-glue.c 2007-05-02 06:28:23 UTC (rev 1243)
+++ trunk/cipher/camellia-glue.c 2007-05-02 09:46:53 UTC (rev 1244)
@@ -22,8 +22,26 @@
/* I put all the libgcrypt-specific stuff in this file to keep the
camellia.c/camellia.h files exactly as provided by NTT. If they
update their code, this should make it easier to bring the changes
- in. - dshaw */
+ in. - dshaw
+ There is one small change which needs to be done: Include the
+ following code at the top of camellia.h: */
+#if 0
+/* Need to redefine the external symbols to keep the libgcrypt name
+ space clean. */
+#define Camellia_Ekeygen _gcry_Camellia_Ekeygen
+#define Camellia_EncryptBlock _gcry_Camellia_EncryptBlock
+#define Camellia_DecryptBlock _gcry_Camellia_DecryptBlock
+#define camellia_decrypt128 _gcry_camellia_decrypt128
+#define camellia_decrypt256 _gcry_camellia_decrypt256
+#define camellia_encrypt128 _gcry_camellia_encrypt128
+#define camellia_encrypt256 _gcry_camellia_encrypt256
+#define camellia_setup128 _gcry_camellia_setup128
+#define camellia_setup192 _gcry_camellia_setup192
+#define camellia_setup256 _gcry_camellia_setup256
+#endif /* Code sample. */
+
+
#include <config.h>
#include "types.h"
#include "g10lib.h"
Modified: trunk/cipher/camellia.h
===================================================================
--- trunk/cipher/camellia.h 2007-05-02 06:28:23 UTC (rev 1243)
+++ trunk/cipher/camellia.h 2007-05-02 09:46:53 UTC (rev 1244)
@@ -21,6 +21,20 @@
#ifndef HEADER_CAMELLIA_H
#define HEADER_CAMELLIA_H
+/* Need to redefine the external symbols to keep the libgcrypt name
+ space clean. */
+#define Camellia_Ekeygen _gcry_Camellia_Ekeygen
+#define Camellia_EncryptBlock _gcry_Camellia_EncryptBlock
+#define Camellia_DecryptBlock _gcry_Camellia_DecryptBlock
+#define camellia_decrypt128 _gcry_camellia_decrypt128
+#define camellia_decrypt256 _gcry_camellia_decrypt256
+#define camellia_encrypt128 _gcry_camellia_encrypt128
+#define camellia_encrypt256 _gcry_camellia_encrypt256
+#define camellia_setup128 _gcry_camellia_setup128
+#define camellia_setup192 _gcry_camellia_setup192
+#define camellia_setup256 _gcry_camellia_setup256
+
+
#ifdef __cplusplus
extern "C" {
#endif
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2007-05-02 06:28:23 UTC (rev 1243)
+++ trunk/configure.ac 2007-05-02 09:46:53 UTC (rev 1244)
@@ -132,6 +132,7 @@
# Definitions for symmetric ciphers.
available_ciphers="arcfour blowfish cast5 des aes twofish serpent rfc2268 seed"
+available_ciphers="$available_ciphers camellia"
enabled_ciphers=""
# Definitions for public-key ciphers.
@@ -312,7 +313,7 @@
AC_ARG_ENABLE(ciphers,
AC_HELP_STRING([--enable-ciphers=ciphers],
[select the symmetric ciphers to include]),
- [enabled_ciphers=`echo $enableval | tr , ' ' | tr '[A-Z]' '[a-z]'`],
+ [enabled_ciphers=`echo $enableval | tr ',:' ' ' | tr '[A-Z]' '[a-z]'`],
[enabled_ciphers=""])
if test "x$enabled_ciphers" = "x" \
-o "$enabled_ciphers" = "yes" \
@@ -323,7 +324,7 @@
for cipher in $enabled_ciphers; do
LIST_MEMBER($cipher, $available_ciphers)
if test "$found" = "0"; then
- AC_MSG_ERROR([unsupported cipher specified])
+ AC_MSG_ERROR([unsupported cipher "$cipher" specified])
fi
done
AC_MSG_RESULT([$enabled_ciphers])
@@ -332,7 +333,7 @@
AC_ARG_ENABLE(pubkey-ciphers,
AC_HELP_STRING([--enable-pubkey-ciphers=ciphers],
[select the public-key ciphers to include]),
- [enabled_pubkey_ciphers=`echo $enableval | tr , ' ' | tr '[A-Z]' '[a-z]'`],
+ [enabled_pubkey_ciphers=`echo $enableval | tr ',:' ' ' | tr '[A-Z]' '[a-z]'`],
[enabled_pubkey_ciphers=""])
if test "x$enabled_pubkey_ciphers" = "x" \
-o "$enabled_pubkey_ciphers" = "yes" \
@@ -352,7 +353,7 @@
AC_ARG_ENABLE(digests,
AC_HELP_STRING([--enable-digests=digests],
[select the message digests to include]),
- [enabled_digests=`echo $enableval | tr , ' ' | tr '[A-Z]' '[a-z]'`],
+ [enabled_digests=`echo $enableval | tr ',:' ' ' | tr '[A-Z]' '[a-z]'`],
[enabled_digests=""])
if test "x$enabled_digests" = "x" \
-o "$enabled_digests" = "yes" \
@@ -913,7 +914,20 @@
AC_SUBST(LIBGCRYPT_PUBKEY_CIPHERS, $enabled_pubkey_ciphers)
AC_SUBST(LIBGCRYPT_DIGESTS, $enabled_digests)
+# For printing the configuration we need a colon separated list of
+# algorithm names.
+tmp=`echo "$enabled_ciphers" | tr ' ' : `
+AC_DEFINE_UNQUOTED(LIBGCRYPT_CIPHERS, "$tmp",
+ [List of available cipher algorithms])
+tmp=`echo "$enabled_pubkey_ciphers" | tr ' ' : `
+AC_DEFINE_UNQUOTED(LIBGCRYPT_PUBKEY_CIPHERS, "$tmp",
+ [List of available public key cipher algorithms])
+tmp=`echo "$enabled_digests" | tr ' ' : `
+AC_DEFINE_UNQUOTED(LIBGCRYPT_DIGESTS, "$tmp",
+ [List of available digest algorithms])
+
+
# Generate extended version information for W32.
if test "$have_w32_system" = yes; then
BUILD_TIMESTAMP=`date --iso-8601=minutes`
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2007-05-02 06:28:23 UTC (rev 1243)
+++ trunk/src/ChangeLog 2007-05-02 09:46:53 UTC (rev 1244)
@@ -1,3 +1,7 @@
+2007-05-02 Werner Koch <wk at g10code.com>
+
+ * global.c (print_config): Print ciphers, digests and pubkeys.
+
2007-05-02 David Shaw <dshaw at jabberwocky.com>
* cipher.h, gcrypt.h.in: Add Camellia.
Modified: trunk/src/global.c
===================================================================
--- trunk/src/global.c 2007-05-02 06:28:23 UTC (rev 1243)
+++ trunk/src/global.c 2007-05-02 09:46:53 UTC (rev 1244)
@@ -202,7 +202,9 @@
print_config ( int (*fnc)(FILE *fp, const char *format, ...), FILE *fp)
{
fnc (fp, "version:%s:\n", VERSION);
- fnc (fp, "mpi-asm:%s:\n", _gcry_mpi_get_hw_config ());
+ fnc (fp, "ciphers:%s:\n", LIBGCRYPT_CIPHERS);
+ fnc (fp, "pubkeys:%s:\n", LIBGCRYPT_PUBKEY_CIPHERS);
+ fnc (fp, "digests:%s:\n", LIBGCRYPT_DIGESTS);
fnc (fp, "rnd-mod:"
#if USE_RNDEGD
"egd:"
@@ -217,7 +219,7 @@
"w32:"
#endif
"\n");
-
+ fnc (fp, "mpi-asm:%s:\n", _gcry_mpi_get_hw_config ());
}
More information about the Gnupg-commits
mailing list