summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2007-05-02 09:46:53 +0000
committerWerner Koch <wk@gnupg.org>2007-05-02 09:46:53 +0000
commit074dd6d81470a16795bc571c066aa32ef2a0a588 (patch)
treefbe651c56ec0f8945cd478542a07389317cde232
parent1a9086a608dd11312d53c1232816561cf187f0c4 (diff)
downloadlibgcrypt-074dd6d81470a16795bc571c066aa32ef2a0a588.tar.gz
More info from GCRYCTL_PRINT_CONFIG.
Put Camellia symbols into our namespace.
-rw-r--r--AUTHORS13
-rw-r--r--ChangeLog5
-rw-r--r--NEWS5
-rw-r--r--README37
-rw-r--r--cipher/ChangeLog4
-rw-r--r--cipher/camellia-glue.c20
-rw-r--r--cipher/camellia.h14
-rw-r--r--configure.ac22
-rw-r--r--src/ChangeLog4
-rw-r--r--src/global.c6
10 files changed, 116 insertions, 14 deletions
diff --git a/AUTHORS b/AUTHORS
index 88398a81..d203026b 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -73,17 +73,21 @@ bradh@frogmouth.net
(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@freebsd.org
(SEED cipher)
-
LIBGCRYPT Werner Dittmann ** pending **
werner.dittmann@t-online.de
(mpi/amd64, tests/mpitests.c)
+GNUPG David Shaw
+Assigns past and future changes.
+dshaw@jabberwocky.com>
+(cipher/camellia-glue.c and related stuff)
+
+
More credits
============
@@ -101,9 +105,12 @@ Wedgwood 1996-1999.
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
diff --git a/ChangeLog b/ChangeLog
index 349219a0..4231bb19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-02 Werner Koch <wk@g10code.com>
+
+ * configure.ac (LIBGCRYPT_DIGESTS, LIBGCRYPT_CIPHERS)
+ (LIBGCRYPT_PUBKEY_CIPHERS): Ac_define lists of algorithms.
+
2007-05-02 David Shaw <dshaw@jabberwocky.com>
* NEWS, configure.ac: Add Camellia.
diff --git a/NEWS b/NEWS
index 81c83be9..86f42ecf 100644
--- a/NEWS
+++ b/NEWS
@@ -43,8 +43,13 @@ Noteworthy changes in version 1.3.0 (unreleased)
* 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.
diff --git a/README b/README
index a3973fd1..69ff99b5 100644
--- a/README
+++ b/README
@@ -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,8 +125,33 @@
--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
diff --git a/cipher/ChangeLog b/cipher/ChangeLog
index f9b10368..2ee25cf5 100644
--- a/cipher/ChangeLog
+++ b/cipher/ChangeLog
@@ -1,3 +1,7 @@
+2007-05-02 Werner Koch <wk@g10code.com>
+
+ * camellia.h: Redefine external symbols.
+
2007-05-02 David Shaw <dshaw@jabberwocky.com>
* Makefile.am, cipher.c: Add Camellia.
diff --git a/cipher/camellia-glue.c b/cipher/camellia-glue.c
index bc0710d6..d50f9ccb 100644
--- a/cipher/camellia-glue.c
+++ b/cipher/camellia-glue.c
@@ -22,7 +22,25 @@
/* 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"
diff --git a/cipher/camellia.h b/cipher/camellia.h
index 740ed8bf..26a88d6c 100644
--- a/cipher/camellia.h
+++ b/cipher/camellia.h
@@ -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
diff --git a/configure.ac b/configure.ac
index 5b66c0f7..c595f344 100644
--- a/configure.ac
+++ b/configure.ac
@@ -132,6 +132,7 @@ LIBGCRYPT_CONFIG_CFLAGS=""
# 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 @@ default_digests="$available_digests"
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 @@ AC_MSG_CHECKING([which symmetric ciphers to include])
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_MSG_RESULT([$enabled_ciphers])
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_MSG_RESULT([$enabled_pubkey_ciphers])
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,6 +914,19 @@ AC_SUBST(LIBGCRYPT_CIPHERS, $enabled_ciphers)
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
diff --git a/src/ChangeLog b/src/ChangeLog
index 66ab99cd..96770971 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2007-05-02 Werner Koch <wk@g10code.com>
+
+ * global.c (print_config): Print ciphers, digests and pubkeys.
+
2007-05-02 David Shaw <dshaw@jabberwocky.com>
* cipher.h, gcrypt.h.in: Add Camellia.
diff --git a/src/global.c b/src/global.c
index 29e60a80..2e65e360 100644
--- a/src/global.c
+++ b/src/global.c
@@ -202,7 +202,9 @@ static void
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 @@ print_config ( int (*fnc)(FILE *fp, const char *format, ...), FILE *fp)
"w32:"
#endif
"\n");
-
+ fnc (fp, "mpi-asm:%s:\n", _gcry_mpi_get_hw_config ());
}