summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2008-08-19 16:59:15 +0000
committerWerner Koch <wk@gnupg.org>2008-08-19 16:59:15 +0000
commit555c37b39c9026da55fb0d3984f222732d59d44e (patch)
tree0a8dda31052e28404e36d59f5987c5f88f655c18
parente8358aa40bec30b5c069b69b1ac74e7855e60734 (diff)
downloadlibgcrypt-555c37b39c9026da55fb0d3984f222732d59d44e.tar.gz
Adding gcry_mpi_lshift.
Preparing a release candidate.
-rw-r--r--ChangeLog6
-rw-r--r--NEWS12
-rw-r--r--README4
-rw-r--r--TODO5
-rw-r--r--configure.ac10
-rw-r--r--doc/gcrypt.texi14
-rw-r--r--mpi/ChangeLog4
-rw-r--r--mpi/mpi-bit.c10
-rw-r--r--src/ChangeLog7
-rw-r--r--src/gcrypt.h.in4
-rw-r--r--src/libgcrypt.def4
-rw-r--r--src/libgcrypt.vers1
-rw-r--r--src/mpi.h1
-rw-r--r--src/visibility.c6
-rw-r--r--src/visibility.h3
15 files changed, 70 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index 384b3393..24ae36c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-08-19 Werner Koch <wk@g10code.com>
+
+ Release 1.4.2rc1.
+
+ * configure.ac: Bump LT version to C16/A5/R0.
+
2008-08-18 Werner Koch <wk@g10code.com>
* Makefile.am (EXTRA_DIST): Remove the unused BUGS file.
diff --git a/NEWS b/NEWS
index 60118e7b..518b5b1f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,14 +1,19 @@
-Noteworthy changes in version 1.4.2
+Noteworthy changes in version 1.4.2 (unreleased)
------------------------------------------------
- * The library may now be switched into a FIPS mode.
+ * The library may now be switched into a FIPS mode. Note that this
+ mode is not yet fully working in 1.4.2rc1.
* More runtime selftests.
* A few macros have been replaced by functions for better type
checking.
- * The thread initialiation structure now carries version information.
+ * The thread initialization structure now carries version
+ information.
+
+ * The long missing gcry_mpi_lshift function has been added. Note
+ that it is not yet working in 1.4.2rc1.
* Interface changes relative to the 1.3.0 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -18,6 +23,7 @@ Noteworthy changes in version 1.4.2
gcry_cipher_setkey NEW: Replaces macro.
gcry_cipher_setiv NEW: Replaces macro.
gcry_cipher_setctr NEW: Replaces macro.
+ gcry_mpi_lshift NEW.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/README b/README
index 107053a3..714bc42d 100644
--- a/README
+++ b/README
@@ -1,6 +1,8 @@
libgcrypt - The GNU crypto library
------------------------------------
- Version 1.4.1
+ Version 1.4.2rc1
+
+ *** Warning: RELEASE CANDIDATE ***
Copyright 2000, 2002, 2003, 2004, 2007,
2008 Free Software Foundation, Inc.
diff --git a/TODO b/TODO
index da1ef22a..80fb62b7 100644
--- a/TODO
+++ b/TODO
@@ -84,8 +84,6 @@ What's left to do -*- outline -*-
* mpi_print does not use secure memory
for internal variables.
-* gcry_mpi_lshift is missing
-
* Add OAEP
* gcryptrnd.c
@@ -110,4 +108,5 @@ What's left to do -*- outline -*-
We have some code to allow using libgcrypt from C++, so we also
should have a test case.
-* Use aliases for symbol instead of the wrappers in visibility.c.
+* gcry_mpi_lshift needs actual code.
+
diff --git a/configure.ac b/configure.ac
index 04d91842..561894ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,8 +26,8 @@ min_automake_version="1.10"
# Remember to change the version number immediately *after* a release.
# Set my_issvn to "yes" for non-released code. Remember to run an
# "svn up" and "autogen.sh" right before creating a distribution.
-m4_define([my_version], [1.4.2])
-m4_define([my_issvn], [yes])
+m4_define([my_version], [1.4.2rc1])
+m4_define([my_issvn], [no])
m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \
|| echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')]))
@@ -38,9 +38,9 @@ AC_INIT([libgcrypt],
# (Interfaces removed: CURRENT++, AGE=0, REVISION=0)
# (Interfaces added: CURRENT++, AGE++, REVISION=0)
# (No interfaces changed: REVISION++)
-LIBGCRYPT_LT_CURRENT=15
-LIBGCRYPT_LT_AGE=4
-LIBGCRYPT_LT_REVISION=4
+LIBGCRYPT_LT_CURRENT=16
+LIBGCRYPT_LT_AGE=5
+LIBGCRYPT_LT_REVISION=0
# If the API is changed in an incompatible way: increment the next counter.
diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi
index d281ae84..2cf4c932 100644
--- a/doc/gcrypt.texi
+++ b/doc/gcrypt.texi
@@ -67,7 +67,7 @@ section entitled ``Copying''.
* Handler Functions:: Working with handler functions.
* Symmetric cryptography:: How to use symmetric cryptography.
* Public Key cryptography:: How to use public key cryptography.
-* Hashing:: How to use hashing.
+* Hashing:: How to use hash and MAC algorithms.
* Random Numbers:: How to work with random numbers.
* S-expressions:: How to manage S-expressions.
* MPI library:: How to work with multi-precision-integers.
@@ -102,6 +102,7 @@ Indices
@c **********************************************************
@node Introduction
@chapter Introduction
+
Libgcrypt is a library providing cryptographic building blocks.
@menu
@@ -3200,12 +3201,11 @@ contained in @var{name} in @var{algorithm}. Deprecated; use
@node Hashing
@chapter Hashing
-Libgcrypt provides an easy and consistent to use interface
-for hashing. Hashing is buffered and several hash algorithms can be
-updated at once. It is possible to calculate a MAC using the same
-routines. The programming model follows an open/process/close
-paradigm and is in that similar to other building blocks provided by
-Libgcrypt.
+Libgcrypt provides an easy and consistent to use interface for hashing.
+Hashing is buffered and several hash algorithms can be updated at once.
+It is possible to compute a MAC using the same routines. The
+programming model follows an open/process/close paradigm and is in that
+similar to other building blocks provided by Libgcrypt.
For convenience reasons, a few cyclic redundancy check value operations
are also supported.
diff --git a/mpi/ChangeLog b/mpi/ChangeLog
index 32da0e34..eb37add1 100644
--- a/mpi/ChangeLog
+++ b/mpi/ChangeLog
@@ -1,3 +1,7 @@
+2008-08-19 Werner Koch <wk@g10code.com>
+
+ * mpi-bit.c (gcry_mpi_lshift): New.
+
2007-10-31 Werner Koch <wk@g10code.com>
* mpi-mod.c (gcry_mpi_mod): Remove
diff --git a/mpi/mpi-bit.c b/mpi/mpi-bit.c
index b60e2bfb..6899fcd0 100644
--- a/mpi/mpi-bit.c
+++ b/mpi/mpi-bit.c
@@ -297,6 +297,16 @@ _gcry_mpi_lshift_limbs( gcry_mpi_t a, unsigned int count )
}
+/*
+ * Shift A by N bits to the left.
+ */
+void
+gcry_mpi_lshift ( gcry_mpi_t x, gcry_mpi_t a, unsigned int n )
+{
+ BUG (); /* Not yet implemented in 1.4.2rc1 but will be soon. */
+}
+
+
/****************
* Shift A by COUNT limbs to the right
* This is used only within the MPI library
diff --git a/src/ChangeLog b/src/ChangeLog
index 6e63dd60..f7cdcca1 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-19 Werner Koch <wk@g10code.com>
+
+ * visibility.c, visibility.h (gcry_mpi_lshift): New.
+ * libgcrypt.vers, libgcrypt.def, gcrypt.h.in: Ditto.
+
2008-08-15 Werner Koch <wk@g10code.com>
* gcrypt.h.in (gcry_cipher_setkey): Replace macro by function.
@@ -1899,7 +1904,7 @@ Tue Dec 8 13:15:16 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
Copyright (C) 1998,1999,2000,2001,2002,2003
- 2004, 2005 Free Software Foundation, Inc.
+ 2004, 2005, 2008 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/src/gcrypt.h.in b/src/gcrypt.h.in
index d2bf589b..5239a76e 100644
--- a/src/gcrypt.h.in
+++ b/src/gcrypt.h.in
@@ -708,6 +708,9 @@ void gcry_mpi_clear_highbit (gcry_mpi_t a, unsigned int n);
/* Shift the value of A by N bits to the right and store the result in X. */
void gcry_mpi_rshift (gcry_mpi_t x, gcry_mpi_t a, unsigned int n);
+/* Shift the value of A by N bits to the left and store the result in X. */
+void gcry_mpi_lshift (gcry_mpi_t x, gcry_mpi_t a, unsigned int n);
+
/* Store NBITS of the value P points to in A and mark A as an opaque
value. WARNING: Never use an opaque MPI for anything thing else then
gcry_mpi_release, gcry_mpi_get_opaque. */
@@ -773,6 +776,7 @@ int gcry_mpi_get_flag (gcry_mpi_t a, enum gcry_mpi_flag flag);
#define mpi_clear_bit(a,b) gcry_mpi_clear_bit ((a),(b))
#define mpi_clear_highbit(a,b) gcry_mpi_clear_highbit ((a),(b))
#define mpi_rshift(a,b,c) gcry_mpi_rshift ((a),(b),(c))
+#define mpi_lshift(a,b,c) gcry_mpi_lshift ((a),(b),(c))
#define mpi_set_opaque(a,b,c) gcry_mpi_set_opaque( (a), (b), (c) )
#define mpi_get_opaque(a,b) gcry_mpi_get_opaque( (a), (b) )
diff --git a/src/libgcrypt.def b/src/libgcrypt.def
index 4cf2da9d..8fc4d329 100644
--- a/src/libgcrypt.def
+++ b/src/libgcrypt.def
@@ -230,6 +230,8 @@ EXPORTS
gcry_cipher_setkey @188
gcry_cipher_setiv @189
gcry_cipher_setctr @190
-
+
+ gcry_mpi_lshift @191
+
diff --git a/src/libgcrypt.vers b/src/libgcrypt.vers
index a8ef6f77..ef9fcee1 100644
--- a/src/libgcrypt.vers
+++ b/src/libgcrypt.vers
@@ -100,6 +100,7 @@ GCRYPT_1.2 {
gcry_mpi_set_flag; gcry_mpi_set_highbit; gcry_mpi_set_opaque;
gcry_mpi_set_ui; gcry_mpi_snew; gcry_mpi_sub; gcry_mpi_sub_ui;
gcry_mpi_subm; gcry_mpi_swap; gcry_mpi_test_bit;
+ gcry_mpi_lshift;
local:
*;
diff --git a/src/mpi.h b/src/mpi.h
index 81a5a0c7..f630c3f6 100644
--- a/src/mpi.h
+++ b/src/mpi.h
@@ -219,6 +219,7 @@ unsigned _gcry_mpi_trailing_zeros( gcry_mpi_t a );
#define mpi_clear_bit(a,b) gcry_mpi_clear_bit ((a),(b))
#define mpi_clear_highbit(a,b) gcry_mpi_clear_highbit ((a),(b))
#define mpi_rshift(a,b,c) gcry_mpi_rshift ((a),(b),(c))
+#define mpi_lshift(a,b,c) gcry_mpi_lshift ((a),(b),(c))
void _gcry_mpi_normalize( gcry_mpi_t a );
diff --git a/src/visibility.c b/src/visibility.c
index dd245907..f187a65e 100644
--- a/src/visibility.c
+++ b/src/visibility.c
@@ -457,6 +457,12 @@ gcry_mpi_rshift (gcry_mpi_t x, gcry_mpi_t a, unsigned int n)
_gcry_mpi_rshift (x, a, n);
}
+void
+gcry_mpi_lshift (gcry_mpi_t x, gcry_mpi_t a, unsigned int n)
+{
+ _gcry_mpi_lshift (x, a, n);
+}
+
gcry_mpi_t
gcry_mpi_set_opaque (gcry_mpi_t a, void *p, unsigned int nbits)
{
diff --git a/src/visibility.h b/src/visibility.h
index 516c93a7..a11e5474 100644
--- a/src/visibility.h
+++ b/src/visibility.h
@@ -214,6 +214,7 @@
#define gcry_mpi_randomize _gcry_mpi_randomize
#define gcry_mpi_release _gcry_mpi_release
#define gcry_mpi_rshift _gcry_mpi_rshift
+#define gcry_mpi_lshift _gcry_mpi_lshift
#define gcry_mpi_scan _gcry_mpi_scan
#define gcry_mpi_set _gcry_mpi_set
#define gcry_mpi_set_bit _gcry_mpi_set_bit
@@ -468,6 +469,7 @@ void gcry_ac_os_to_mpi (gcry_mpi_t mpi, unsigned char *os, size_t os_n);
#undef gcry_mpi_randomize
#undef gcry_mpi_release
#undef gcry_mpi_rshift
+#undef gcry_mpi_lshift
#undef gcry_mpi_scan
#undef gcry_mpi_set
#undef gcry_mpi_set_bit
@@ -679,6 +681,7 @@ MARK_VISIBLE (gcry_mpi_print)
MARK_VISIBLE (gcry_mpi_randomize)
MARK_VISIBLE (gcry_mpi_release)
MARK_VISIBLE (gcry_mpi_rshift)
+MARK_VISIBLE (gcry_mpi_lshift)
MARK_VISIBLE (gcry_mpi_scan)
MARK_VISIBLE (gcry_mpi_set)
MARK_VISIBLE (gcry_mpi_set_bit)