Mailing List Archive

Libgcrypt 1.4.0 (stable) released
Hello!

We are pleased to announce the availability of Libgcrypt 1.4.0. This is
the new stable version of Libgcrypt and upward compatible with the 1.2
series.

The 1.2 series will enter end of life state in 2 years on 2009-12-31.

Libgcrypt is a general purpose library of cryptographic building blocks.
It is originally based on code used by GnuPG. It does not provide any
implementation of OpenPGP or other protocols. Thorough understanding of
applied cryptography is required to use Libgcrypt.


Noteworthy changes between 1.2.x and 1.4.0 are:

* Support for SHA-224 and HMAC using SHA-384 and SHA-512.

* Support for the SEED cipher.

* Support for the Camellia cipher.

* Support for OFB encryption mode.

* Support for DSA2.

* Support for Microsoft Windows.

* The entire library is now under the LGPLv2+. The helper programs
and the manual are under the GPLv2+. Kudos to Peter Gutmann for
giving permissions to relicense the rndw32 and rndunix modules.

* The visibility attribute is now used if supported by the toolchain.

* The ACE engine of VIA processors is now used for AES-128.

* Changed the way the RNG gets initialized. This allows to keep it
uninitialized as long as no random numbers are used.

* Updated the entropy gatherer for W32.

* Made the RNG immune against fork without exec.

* Reading and writing the random seed file is now protected by a
fcntl style file lock on systems that provide this function.

* gcry_mpi_rshift does not anymore truncate the shift count.

* Reserved algorithm ranges for use by applications.

* The new function gcry_md_debug should be used instead of the
gcry_md_start_debug and gcry_md_stop_debug macros.

* Non executable stack support is now used by default on systems
supporting it.

* Assembler support for the AMD64 architecture.

* New configure option --enable-mpi-path for optimized builds.

* Fixed a bug in the detection of symbol prefixes which inhibited the
build of optimized assembler code on certain systems.

* New control code GCRYCTL_PRINT_CONFIG to print the build
configuration.

* Experimental support for ECDSA; should only be used for testing.

* New configure option --enable-random-daemon to support a system
wide random daemon. The daemon code is experimental and not yet
very well working. It will eventually allow to keep a global
random pool for the sake of short living processes.

* 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.

* Interface changes relative to the 1.2.0 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcry_fast_random_pol NEW.
gcry_md_debug NEW.
gcry_sexp_nth_string NEW.
GCRY_MD_SHA224 NEW.
GCRY_PK_USAGE_CERT NEW.
GCRY_PK_USAGE_AUTH NEW.
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.
gcry_mpi_scan CHANGED: Argument BUFFER is now void*.
gcry_pk_algo_name CHANGED: Returns "?" instead of NULL.
gcry_cipher_algo_name CHANGED: Returns "?" instead of "".
gcry_pk_spec_t CHANGED: Element ALIASES is now const ptr.
gcry_md_write_t CHANGED: Argument BUF is now a const void*.
gcry_md_ctl CHANGED: Argument BUFFER is now void*.
gcry_cipher_encrypt CHANGED: Arguments IN and OUT are now void*.
gcry_cipher_decrypt CHANGED: Arguments IN and OUT are now void*.
gcry_sexp_sprint CHANGED: Argument BUFFER is now void*.
gcry_create_nonce CHANGED: Argument BUFFER is now void*.
gcry_randomize CHANGED: Argument BUFFER is now void*.
gcry_cipher_register CHANGED: Argument ALGORITHM_ID is now int*.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Source code is hosted at the GnuPG FTP server and its mirrors as
listed at http://www.gnupg.org/download/mirrors.html . On the primary
server the source file and its digital signatures is:

ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.4.0.tar.bz2 (942k)
ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.4.0.tar.bz2.sig

This file is bzip2 compressed. A gzip compressed version is also
available:

ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.4.0.tar.gz (1176k)
ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.4.0.tar.gz.sig

The SHA-1 checksums are:

cd1b52e8ecfa361737c6f130ed2f1d850e312c16 libgcrypt-1.4.0.tar.bz2
69183b7100b60da8eb1648f49836a611454541bb libgcrypt-1.4.0.tar.gz

For help on developing with Libgcrypt you should read the included
manual and optional ask on the gcrypt-devel mailing list [1].

Improving Libgcrypt is costly, but you can help! We are looking for
organizations that find Libgcrypt useful and wish to contribute back.
You can contribute by reporting bugs, improve the software [2], or by
donating money.

Commercial support contracts for Libgcrypt are available [3], and they
help finance continued maintenance. g10 Code GmbH, a Duesseldorf
based company, is currently funding Libgcrypt development. We are
always looking for interesting development projects.

Many thanks to all who contributed to Libgcrypt development, be it bug
fixes, code, documentation, testing or helping users.

Happy hacking,

Werner


[1] See http://www.gnupg.org/documentation/mailing-lists.html .
[2] Note that copyright assignments to the FSF are required.
[3] See the service directory at http://www.gnupg.org/service.html .

--
Die Gedanken sind frei. Auschnahme regelt ein Bundeschgesetz.
Re: [Announce] Libgcrypt 1.4.0 (stable) released [ In reply to ]
Werner Koch wrote:
> Hello!
>
> We are pleased to announce the availability of Libgcrypt 1.4.0. This is
> the new stable version of Libgcrypt and upward compatible with the 1.2
> series.

The Solaris compiler doesn't like it when a void function uses return:

cc -DHAVE_CONFIG_H -I. -I.. -I/local/include -I/local/gnu/include
-I/local/gnu/include -Xa -xO2 -xstrconst -KPIC -xtarget=native -m64
-xarch=native -I/local/include -I/local/gnu/include -c misc.c -KPIC
-DPIC -o .libs/libgcrypt_la-misc.o
"visibility.c", line 702: void function cannot return value
"visibility.c", line 851: void function cannot return value
cc: acomp failed for visibility.c
gmake[2]: *** [libgcrypt_la-visibility.lo] Error 1


Removing the "return" in both places allows visibility.c to compile,
though I'm not certain that's the correct fix.


Also, the test suite fails to build if the version of libgpg-error
doesn't have gpg_err_code_from_syserror:

cc -I/local/gnu/include -Xa -xO2 -xstrconst -KPIC -xtarget=native -m64
-xarch=native -I/local/include -I/local/gnu/include -o .libs/version
version.o -L/local/lib/64 -L/local/gnu/lib/64 ../src/.libs/libgcrypt.so
/local/gnu/lib/64/libgpg-error.so /local/gnu/lib/64/libintl.so -lc
-lsocket -R/local/gnu/lib/64
Undefined first referenced
symbol in file
gpg_err_code_from_syserror ../src/.libs/libgcrypt.so
ld: fatal: Symbol referencing errors. No output written to .libs/version
gmake[2]: *** [version] Error 1

I have version 1.3 of libgpg-error installed and libgcrypt's configure
was OK with that, but it appears that's not OK. It looks like this
line in configure.ac needs to be updated to some newer version that's
greater than at least 1.3 (looks like it appeared in 1.4?):

NEED_GPG_ERROR_VERSION=1.0

I'm attaching patches for these two issues -- I don't recall if the
mailing list allows attachments, but I can resend if they don't make it.

Tim
--
Tim Mooney Tim.Mooney@ndsu.edu
Information Technology Services (701) 231-1076 (Voice)
Room 242-J6, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
Re: [Announce] Libgcrypt 1.4.0 (stable) released [ In reply to ]
On 12/10/07, Werner Koch <wk@gnupg.org> wrote:
> Hello!
>
> We are pleased to announce the availability of Libgcrypt 1.4.0. This is
> the new stable version of Libgcrypt and upward compatible with the 1.2
> series.

Already have one report:
http://bugs.gentoo.org/show_bug.cgi?id=201917

Alon.

_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Re: [Announce] Libgcrypt 1.4.0 (stable) released [ In reply to ]
On Mon, 10 Dec 2007 23:07, Tim.Mooney@ndsu.edu said:

> Removing the "return" in both places allows visibility.c to compile,
> though I'm not certain that's the correct fix.

That's definotely correct. I wonder why gcc did not complain about
this.

> line in configure.ac needs to be updated to some newer version that's
> greater than at least 1.3 (looks like it appeared in 1.4?):

Right. I fixed this in the SVN.

Thanks,

Werner

--
Die Gedanken sind frei. Auschnahme regelt ein Bundeschgesetz.


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Re: [Announce] Libgcrypt 1.4.0 (stable) released [ In reply to ]
On Tue, 11 Dec 2007 08:40, alon.barlev@gmail.com said:

> Already have one report:
> http://bugs.gentoo.org/show_bug.cgi?id=201917

You need to run one of the scripts (best: version) under a debugger. I
don't follow gentoo bug, so please either enter it into our BTS or lets
track it here.


Shalom-Salam,

Werner

--
Die Gedanken sind frei. Auschnahme regelt ein Bundeschgesetz.


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Re: [Announce] Libgcrypt 1.4.0 (stable) released [ In reply to ]
Monday 10 December 2007 21:01:06 tarihinde Werner Koch şunları yazmıştı:
> Hello!
>
> We are pleased to announce the availability of Libgcrypt 1.4.0. This is
> the new stable version of Libgcrypt and upward compatible with the 1.2
> series.

All tests fail here, already reported to bug-libgcrypt but can't find it on
the web so here it goes (this is same as Gentoo bug #201917) :

Hi all,

I got all 16 tests crash with libgcrypt 1.4.0. It looks like
CFLAGS="-O2 -fomit-frame-pointer" causes the crash. First I thought it was a
compiler bug since I use gcc 4.3.0 trunk but valgrind reports the following
invalid read :

==28359== Invalid read of size 1
==28359== at 0x4037356: _gcry_detect_hw_features (hwfeatures.c:95)
==28359== Address 0x4707b263 is not stack'd, malloc'd or (recently) free'd

All tests give the similar gdb backtrace :

(gdb) bt
#0 0xb7f61356 in _gcry_detect_hw_features () at hwfeatures.c:95
#1 0xb7f5ded8 in global_init () at global.c:81
#2 0xb7f5e5b3 in _gcry_check_version (req_version=0x8048e54 "1.4.0") at
global.c:171
#3 0xb7f5d06b in gcry_check_version (req_version=0x8048e54 "1.4.0") at
visibility.c:66
#4 0x08048a45 in main (argc=Cannot access memory at address 0xd) hmac.c:161

Since hwfeatures.c line 95 refers to an inline asm block, I can't debug this
myself. Any help is appreciated.

Regards,
ismail

--
Never learn by your mistakes, if you do you may never dare to try again.

_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Re: [Announce] Libgcrypt 1.4.0 (stable) released [ In reply to ]
On Tue, 11 Dec 2007 13:53, ismail@pardus.org.tr said:

> I got all 16 tests crash with libgcrypt 1.4.0. It looks like
> CFLAGS="-O2 -fomit-frame-pointer" causes the crash. First I thought it was a
> compiler bug since I use gcc 4.3.0 trunk but valgrind reports the following

Possible, I have not tested this. Use

./configure --disable-padlock-support

and send me a patch on how to fix that ;-)


Salam-Shalom,

Werner

--
Die Gedanken sind frei. Auschnahme regelt ein Bundeschgesetz.


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Re: [Announce] Libgcrypt 1.4.0 (stable) released [ In reply to ]
Tuesday 11 December 2007 15:56:40 tarihinde Werner Koch şunları yazmıştı:
> On Tue, 11 Dec 2007 13:53, ismail@pardus.org.tr said:
> > I got all 16 tests crash with libgcrypt 1.4.0. It looks like
> > CFLAGS="-O2 -fomit-frame-pointer" causes the crash. First I thought it
> > was a compiler bug since I use gcc 4.3.0 trunk but valgrind reports the
> > following
>
> Possible, I have not tested this. Use
>
> ./configure --disable-padlock-support
>
> and send me a patch on how to fix that ;-)

Valgrind error doesn't ring any bell? :-) Sadly I can't read inline asm at
all.

Regards,
ismail

--
Never learn by your mistakes, if you do you may never dare to try again.

_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Re: [Announce] Libgcrypt 1.4.0 (stable) released [ In reply to ]
At Tue, 11 Dec 2007 14:53:37 +0200,
Ismail Dönmez <ismail@pardus.org.tr> wrote:
>
> Monday 10 December 2007 21:01:06 tarihinde Werner Koch şunları yazmıştı:
> > Hello!
> >
> > We are pleased to announce the availability of Libgcrypt 1.4.0. This is
> > the new stable version of Libgcrypt and upward compatible with the 1.2
> > series.
>
> All tests fail here, already reported to bug-libgcrypt but can't find it on
> the web so here it goes (this is same as Gentoo bug #201917) :
>
> Hi all,
>
> I got all 16 tests crash with libgcrypt 1.4.0. It looks like
> CFLAGS="-O2 -fomit-frame-pointer" causes the crash. First I thought it was a
> compiler bug since I use gcc 4.3.0 trunk but valgrind reports the following
> invalid read :
>
> ==28359== Invalid read of size 1
> ==28359== at 0x4037356: _gcry_detect_hw_features (hwfeatures.c:95)
> ==28359== Address 0x4707b263 is not stack'd, malloc'd or (recently) free'd
>
> All tests give the similar gdb backtrace :
>
> (gdb) bt
> #0 0xb7f61356 in _gcry_detect_hw_features () at hwfeatures.c:95
> #1 0xb7f5ded8 in global_init () at global.c:81
> #2 0xb7f5e5b3 in _gcry_check_version (req_version=0x8048e54 "1.4.0") at
> global.c:171
> #3 0xb7f5d06b in gcry_check_version (req_version=0x8048e54 "1.4.0") at
> visibility.c:66
> #4 0x08048a45 in main (argc=Cannot access memory at address 0xd) hmac.c:161
>
> Since hwfeatures.c line 95 refers to an inline asm block, I can't debug this
> myself. Any help is appreciated.

Can you check with objdump -d which instruction in the asm it is that
gives the error? (maybe send me the objdump -d output for the binary
matching the above log).

Thanks,
Marcus


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Re: [Announce] Libgcrypt 1.4.0 (stable) released [ In reply to ]
Tuesday 11 December 2007 17:11:46 tarihinde Marcus Brinkmann şunları yazmıştı:
> At Tue, 11 Dec 2007 14:53:37 +0200,
>
> Ismail Dnmez <ismail@pardus.org.tr> wrote:
> > Monday 10 December 2007 21:01:06 tarihinde Werner Koch unlar yazmt:
> > > Hello!
> > >
> > > We are pleased to announce the availability of Libgcrypt 1.4.0. This
> > > is the new stable version of Libgcrypt and upward compatible with the
> > > 1.2 series.
> >
> > All tests fail here, already reported to bug-libgcrypt but can't find it
> > on the web so here it goes (this is same as Gentoo bug #201917) :
> >
> > Hi all,
> >
> > I got all 16 tests crash with libgcrypt 1.4.0. It looks like
> > CFLAGS="-O2 -fomit-frame-pointer" causes the crash. First I thought it
> > was a compiler bug since I use gcc 4.3.0 trunk but valgrind reports the
> > following invalid read :
> >
> > ==28359== Invalid read of size 1
> > ==28359== at 0x4037356: _gcry_detect_hw_features (hwfeatures.c:95)
> > ==28359== Address 0x4707b263 is not stack'd, malloc'd or (recently)
> > free'd
> >
> > All tests give the similar gdb backtrace :
> >
> > (gdb) bt
> > #0 0xb7f61356 in _gcry_detect_hw_features () at hwfeatures.c:95
> > #1 0xb7f5ded8 in global_init () at global.c:81
> > #2 0xb7f5e5b3 in _gcry_check_version (req_version=0x8048e54 "1.4.0") at
> > global.c:171
> > #3 0xb7f5d06b in gcry_check_version (req_version=0x8048e54 "1.4.0") at
> > visibility.c:66
> > #4 0x08048a45 in main (argc=Cannot access memory at address 0xd)
> > hmac.c:161
> >
> > Since hwfeatures.c line 95 refers to an inline asm block, I can't debug
> > this myself. Any help is appreciated.
>
> Can you check with objdump -d which instruction in the asm it is that
> gives the error? (maybe send me the objdump -d output for the binary
> matching the above log).

objdump -d output attached.

Thanks,
ismail

--
Never learn by your mistakes, if you do you may never dare to try again.
Re: [Announce] Libgcrypt 1.4.0 (stable) released [ In reply to ]
On 12/11/07, Werner Koch <wk@gnupg.org> wrote:
> On Tue, 11 Dec 2007 08:40, alon.barlev@gmail.com said:
>
> > Already have one report:
> > http://bugs.gentoo.org/show_bug.cgi?id=201917
>
> You need to run one of the scripts (best: version) under a debugger. I
> don't follow gentoo bug, so please either enter it into our BTS or lets
> track it here.

OK...
--disable-padlock-support

Solved the problems for these users.
For trace, you can refer to the bug.

Best Regards,
Alon Bar-Lev.

_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Re: [Announce] Libgcrypt 1.4.0 (stable) released [ In reply to ]
At Tue, 11 Dec 2007 17:20:32 +0200,
Ismail Dönmez <ismail@pardus.org.tr> wrote:
> objdump -d output attached.

I need the one for the libgcrypt.so shared library you are using :)
with debugging symbols, please (not stripped). It's likely to be very
large, so better send it off-list.

Thanks,
Marcus


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel