Mailing List Archive

Release candidate for Libgcrypt 1.4.2
Hi!

I just did a release candidate for Libgcrypt:

ftp://ftp.gnupg.org/gcrypt/alpha/libgcrypt/libgcrypt-1.4.2rc2.tar.bz2
ftp://ftp.gnupg.org/gcrypt/alpha/libgcrypt/libgcrypt-1.4.2rc2.tar.bz2.sig

There are only a few changes:

* The long missing gcry_mpi_lshift function has been added.

* RSA key generation now supports a "transient-key" flag.

This is only meaningful for RSA keys. This is a flag with no value.
If given the RSA key is created using a faster and a somewhat less
secure random number generator. This flag may be used for keys which
are only used for a short time and do not require full cryptographic
strength. Example:

(genkey (rsa (nbits 4:1024)(transient-key)))

* The keygrip computation for ECDSA has been implemented thus ECDSA is
now fully supported.

* A few macros have been replaced by functions for better type
checking.

* The thread initialization structure now carries version
information.

This will make it in future easier to add new thread related
functions. This is implemented in a backward compatible way.

* The manual describes more clearly how to initialize Libgcrypt.

* The library may now be switched into a FIPS mode.

* Interface changes relative to the 1.3.0 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GCRYCTL_OPERATIONAL_P NEW.
GCRYCTL_FIPS_MODE_P NEW.
GCRYCTL_FORCE_FIPS_MODE NEW.
gcry_cipher_setkey NEW: Replaces macro.
gcry_cipher_setiv NEW: Replaces macro.
gcry_cipher_setctr NEW: Replaces macro.
gcry_mpi_lshift NEW.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Salam-Shalom,

Werner

--
Linux-Kongress 2008 + Hamburg + October 7-10 + www.linux-kongress.org

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: Release candidate for Libgcrypt 1.4.2 [ In reply to ]
Werner Koch <wk@gnupg.org> writes:

> ftp://ftp.gnupg.org/gcrypt/alpha/libgcrypt/libgcrypt-1.4.2rc2.tar.bz2

Works fine here, on debian x86 and mingw32.

There is one old buglet wrt to Wine. The self tests prints times such
as this:

MD5 27574050817572864ms 5084966400557066ms 5084966400557116ms
SHA1 27574050817572864ms 5103280141107220ms 5103280141107260ms
RIPEMD160 27574050817572884ms 5103280141107220ms 5103280141107260ms
TIGER192 27574050817572884ms 5103280141107230ms 5103280141107270ms
...

However, it is not important and I'll see if I can debug it and provide
a patch to make it look nicer.

Thanks,
Simon

_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Re: Release candidate for Libgcrypt 1.4.2 [ In reply to ]
Simon Josefsson <simon@josefsson.org> writes:

> There is one old buglet wrt to Wine. The self tests prints times such
> as this:
>
> MD5 27574050817572864ms 5084966400557066ms 5084966400557116ms
> SHA1 27574050817572864ms 5103280141107220ms 5103280141107260ms
> RIPEMD160 27574050817572884ms 5103280141107220ms 5103280141107260ms
> TIGER192 27574050817572884ms 5103280141107230ms 5103280141107270ms
> ...
>
> However, it is not important and I'll see if I can debug it and provide
> a patch to make it look nicer.

This patch fixes the problem.

Thanks,
/Simon

Index: benchmark.c
===================================================================
--- benchmark.c (revision 1312)
+++ benchmark.c (working copy)
@@ -321,7 +321,7 @@
t2 += (((unsigned long long)stopped_at.user_time.dwHighDateTime << 32)
+ stopped_at.user_time.dwLowDateTime);
t = (t2 - t1)/10000;
- snprintf (buf, sizeof buf, "%5lums", (unsigned long)t );
+ snprintf (buf, sizeof buf, "%5.0fms", (double)t );
#else
snprintf (buf, sizeof buf, "%5.0fms",
(((double) (stopped_at - started_at))/CLOCKS_PER_SEC)*10000000);

_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Re: Release candidate for Libgcrypt 1.4.2 [ In reply to ]
On Mon, 1 Sep 2008 18:36, simon@josefsson.org said:

> - snprintf (buf, sizeof buf, "%5lums", (unsigned long)t );
> + snprintf (buf, sizeof buf, "%5.0fms", (double)t );

Do you understand why this occurs only with Wine? I have not tested it
on Wine but it works fine on a standard XP box. Is there a problem with
my code or is Wine's snprintf broken?


Shalom-Salam,

Werner

--
Linux-Kongress 2008 + Hamburg + October 7-10 + www.linux-kongress.org

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: Release candidate for Libgcrypt 1.4.2 [ In reply to ]
Werner Koch <wk@gnupg.org> writes:

> On Mon, 1 Sep 2008 18:36, simon@josefsson.org said:
>
>> - snprintf (buf, sizeof buf, "%5lums", (unsigned long)t );
>> + snprintf (buf, sizeof buf, "%5.0fms", (double)t );
>
> Do you understand why this occurs only with Wine? I have not tested it
> on Wine but it works fine on a standard XP box. Is there a problem with
> my code or is Wine's snprintf broken?

I actually don't know where the problem is. I can't reproduce it in a
small snippet. FWIW, this also works fine under mingw+wine:

snprintf (buf, sizeof buf, "%5llums", t );

That is arguably more correct, but requires that all Windows supports
%ll.

Something seems to go wrong when the 64-bit value is cast to a 32-bit
value and then passed as an argument. The values are interesting, see:

MD5 27574050817572874ms 5083798169452554ms 5083798169452604ms

That isn't even close to 64-bit or 32-bit boundaries.

/Simon

_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Re: Release candidate for Libgcrypt 1.4.2 [ In reply to ]
Hi!

I just tried it on wine 0.9.8 on an ia32 Debian Sid and I don't have
this problem.


Shalom-Salam,

Werner


--
Linux-Kongress 2008 + Hamburg + October 7-10 + www.linux-kongress.org

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: Release candidate for Libgcrypt 1.4.2 [ In reply to ]
At Mon, 01 Sep 2008 21:56:43 +0200,
Simon Josefsson <simon@josefsson.org> wrote:
>
> Werner Koch <wk@gnupg.org> writes:
>
> > On Mon, 1 Sep 2008 18:36, simon@josefsson.org said:
> >
> >> - snprintf (buf, sizeof buf, "%5lums", (unsigned long)t );
> >> + snprintf (buf, sizeof buf, "%5.0fms", (double)t );
> >
> > Do you understand why this occurs only with Wine? I have not tested it
> > on Wine but it works fine on a standard XP box. Is there a problem with
> > my code or is Wine's snprintf broken?
>
> I actually don't know where the problem is. I can't reproduce it in a
> small snippet. FWIW, this also works fine under mingw+wine:
>
> snprintf (buf, sizeof buf, "%5llums", t );
>
> That is arguably more correct, but requires that all Windows supports
> %ll.
>
> Something seems to go wrong when the 64-bit value is cast to a 32-bit
> value and then passed as an argument. The values are interesting, see:
>
> MD5 27574050817572874ms 5083798169452554ms 5083798169452604ms
>
> That isn't even close to 64-bit or 32-bit boundaries.

Hi,

I posted this a couple of months ago on the gpg4win devel mailing
list. Maybe it is relevant here:

if you use Ubuntu 8.04 or Debian unstable, you will encounter the
following bug in mingw32-runtime 3.13-1:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=452977

Gpg4win packages built with this version of mingw32-runtime are badly
broken. The INPUT FD=NR assuan commands will have bizarre NRs, due to
the misinterpretation of a %ld format string as %lld.

The attached patch fixes this particular problem. This is how it can
be installed and used:

$ apt-get source mingw32-runtime
$ sudo apt-get build-dep mingw32-runtime
$ mkdir mingw32-runtime-3.13/debian/patches
$ cp 01-snprintf.patch mingw32-runtime-3.13/debian/patches/
$ cd mingw32-runtime-3.13
$ dpkg-buildpackage -rfakeroot -uc -us -b
$ sudo dpkg -i ../mingw32-runtime_3.13-1_all.deb

Note 1: If you do not recompile version 3.13-1, you might have to
change the paths in the patch file.

Note 2: You might want to add a new changelog entry to the package
(use version number 3.13-1.1).

Have fun,
Marcus

diff -rup mingw-runtime-3.13-20070825-1-orig/mingwex/gdtoa/mingw_snprintf.c mingw-runtime-3.13-20070825-1/mingwex/gdtoa/mingw_snprintf.c
--- mingw-runtime-3.13-20070825-1-orig/mingwex/gdtoa/mingw_snprintf.c 2007-08-24 12:57:04.000000000 +0200
+++ mingw-runtime-3.13-20070825-1/mingwex/gdtoa/mingw_snprintf.c 2008-05-14 17:22:06.000000000 +0200
@@ -465,7 +465,7 @@ x_sprintf
len = LEN_LL;
}
else
- len = LEN_LL;
+ len = LEN_L;
goto fmtloop;
case 'L':
flag_ld++;
@@ -617,6 +617,7 @@ x_sprintf
break;
case LEN_S:
*(short*)ip = c;
+ break;
case LEN_LL:
*(long long*) ip = c;
break;


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Re: Release candidate for Libgcrypt 1.4.2 [ In reply to ]
Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de> writes:

> if you use Ubuntu 8.04 or Debian unstable, you will encounter the
> following bug in mingw32-runtime 3.13-1:
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=452977

Ah, thanks. I've asked that a newer version is uploaded to
experimental:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=498529

I guess other problems have been fixed between 3.13 and 3.15 that we can
benefit from too.

/Simon

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