And Sch | 13 Oct 16:47 2014

comparison between signed and unsigned integer

I recently added '-Wextra' to my compile flags and I get many of the following
warnings when compiling libgcrypt.

warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

I have looked through them all and most of them are comparing a signed counter
with size_t or unsigned int, which should be benign. However, researching the
warning there are certain nasty bugs that appear if the signed int is ever
negative...

http://www.jwwalker.com/pages/safe-compare.html

https://www.securecoding.cert.org/confluence/display/cplusplus/INT02-CPP.+Understand+integer+conversion+rules

Now, Werner Koch said in the bug tracker that fixing this may introduce bugs, and I would agree. It probably
wouldn't be worthwhile because there are no obvious bugs ATM.

However, here is my second proposal, why not add a call to assert() before the comparison to make sure the
signed int is not negative. This shouldn't introduce any bugs AFAIK, and can be turned off globally.

____________________________________________________________
FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!
Check it out at http://www.inbox.com/marineaquarium
by Werner Koch | 9 Oct 08:31 2014
Picon

[git] GCRYPT - branch, master, updated. libgcrypt-1.6.0-122-g669a83b

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".

The branch, master has been updated
       via  669a83ba86c38b271d85ed4bf1cabc7cc8160583 (commit)
      from  23ecadf309f8056c35cc092e58df801ac0eab862 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 669a83ba86c38b271d85ed4bf1cabc7cc8160583
Author: Werner Koch <wk <at> gnupg.org>
Date:   Thu Oct 9 08:31:35 2014 +0200

    Register DCO for Markus Teich

    --

diff --git a/AUTHORS b/AUTHORS
index f72a421..e186a48 100644
--- a/AUTHORS
+++ b/AUTHORS
 <at>  <at>  -157,6 +157,9  <at>  <at>  Jussi Kivilinna <jussi.kivilinna <at> mbnet.fi>
 Jussi Kivilinna <jussi.kivilinna <at> iki.fi>
 2013-05-06:5186720A.4090101 <at> iki.fi:

+Markus Teich <markus dot teich at stusta dot mhn dot de>
(Continue reading)

Vitezslav Cizek | 8 Oct 14:40 2014
Picon

FIPS 186-4 compliance patches for rsa/dsa/ecdsa

Hi,
The libgcrypt code isn't compliant with the latest FIPS 186-4.
There are some changes necessary, especially in the key generation code.

I've created issue 1736.
(https://bugs.g10code.com/gnupg/issue1736)

Patches are attached there.
Can someone please review them?

--

-- 
Vita Cizek
_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel <at> gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Werner Koch | 8 Oct 15:01 2014
Picon

Re: [PATCH revised] Add gcry_mpi_ec_sub.

On Tue,  7 Oct 2014 18:41, teichm <at> in.tum.de said:

> And now revised with the „signed of“ line. Sorry for the delay, but contributing
> to libgcrypt seems to be very time consuming… :(

As is the maintaining ...

Pushed.  Thanks.

Please send a DCO to this list (see doc/HACKING).

Shalom-Salam,

   Werner

--

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel <at> gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
by Markus Teich | 8 Oct 15:01 2014
Picon

[git] GCRYPT - branch, master, updated. libgcrypt-1.6.0-121-g23ecadf

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".

The branch, master has been updated
       via  23ecadf309f8056c35cc092e58df801ac0eab862 (commit)
      from  a078436be5b656e4a2acfaeb5f054b9991f617e5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 23ecadf309f8056c35cc092e58df801ac0eab862
Author: Markus Teich <markus.teich <at> stusta.mhn.de>
Date:   Tue Oct 7 18:24:27 2014 +0200

    mpi: Add gcry_mpi_ec_sub.

    * NEWS (gcry_mpi_ec_sub): New.
    * doc/gcrypt.texi (gcry_mpi_ec_sub): New.
    * mpi/ec.c (_gcry_mpi_ec_sub, sub_points_edwards): New.
    (sub_points_montgomery, sub_points_weierstrass): New stubs.
    * src/gcrypt-int.h (_gcry_mpi_ec_sub): New.
    * src/gcrypt.h.in (gcry_mpi_ec_sub): New.
    * src/libgcrypt.def (gcry_mpi_ec_sub): New.
    * src/libgcrypt.vers (gcry_mpi_ec_sub): New.
    * src/mpi.h (_gcry_mpi_ec_sub_points): New.
    * src/visibility.c (gcry_mpi_ec_sub): New.
    * src/visibility.h (gcry_mpi_ec_sub): New.
(Continue reading)

by Werner Koch | 8 Oct 14:51 2014
Picon

[git] GCRYPT - branch, master, updated. libgcrypt-1.6.0-120-ga078436

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".

The branch, master has been updated
       via  a078436be5b656e4a2acfaeb5f054b9991f617e5 (commit)
       via  5c906e2cdb14e93fb4915fdc69c7353a5fa35709 (commit)
      from  de0ccd4dce7ec185a678d78878d4538dd609ca0f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a078436be5b656e4a2acfaeb5f054b9991f617e5
Author: Werner Koch <wk <at> gnupg.org>
Date:   Wed Oct 8 14:42:36 2014 +0200

    doc: Fix a configure option name.

    --

diff --git a/AUTHORS b/AUTHORS
index 860dea2..f72a421 100644
--- a/AUTHORS
+++ b/AUTHORS
 <at>  <at>  -137,7 +137,7  <at>  <at>  Authors with a DCO
 ==================

 Andrei Scherer <andsch <at> inbox.com>
(Continue reading)

by Jussi Kivilinna | 4 Oct 14:48 2014
Picon

[git] GCRYPT - branch, master, updated. libgcrypt-1.6.0-118-gde0ccd4

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".

The branch, master has been updated
       via  de0ccd4dce7ec185a678d78878d4538dd609ca0f (commit)
      from  30bd759f398f45b04d0a783b875f59ce9bd1e51d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit de0ccd4dce7ec185a678d78878d4538dd609ca0f
Author: Jussi Kivilinna <jussi.kivilinna <at> iki.fi>
Date:   Sun Aug 31 13:17:24 2014 +0300

    Add Whirlpool AMD64/SSE2 assembly implementation

    * cipher/Makefile.am: Add 'whirlpool-sse2-amd64.S'.
    * cipher/whirlpool-sse2-amd64.S: New.
    * cipher/whirlpool.c (USE_AMD64_ASM): New.
    (whirlpool_tables_s): New.
    (rc, C0, C1, C2, C3, C4, C5, C6, C7): Combine these tables into single
    structure and replace old tables with macros of same name.
    (tab): New structure containing above tables.
    [USE_AMD64_ASM] (_gcry_whirlpool_transform_amd64)
    (whirlpool_transform): New.
    * configure.ac [host=x86_64]: Add 'whirlpool-sse2-amd64.lo'.
    --
(Continue reading)

by Andrei Scherer | 4 Oct 14:37 2014
Picon

[git] GCRYPT - branch, master, updated. libgcrypt-1.6.0-117-g30bd759

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".

The branch, master has been updated
       via  30bd759f398f45b04d0a783b875f59ce9bd1e51d (commit)
      from  0ecd136a6ca02252f63ad229fa5240897bfe6544 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 30bd759f398f45b04d0a783b875f59ce9bd1e51d
Author: Andrei Scherer <andsch <at> inbox.com>
Date:   Thu Aug 28 09:45:35 2014 -0800

    Improved ripemd160 performance

    * cipher/rmd160.c (transform): Interleave the left and right lane
    rounds to introduce more instruction level parallelism.
    --

    The benchmarks on different systems:

    Intel(R) Atom(TM) CPU N570    <at>  1.66GHz
    before:
    Hash:
                    |  nanosecs/byte   mebibytes/sec   cycles/byte
     RIPEMD160      |     13.07 ns/B     72.97 MiB/s         - c/B
(Continue reading)

Jussi Kivilinna | 4 Oct 14:25 2014
Picon
Picon

[PATCH] Add Whirlpool AMD64/SSE2 assembly implementation

* cipher/Makefile.am: Add 'whirlpool-sse2-amd64.S'.
* cipher/whirlpool-sse2-amd64.S: New.
* cipher/whirlpool.c (USE_AMD64_ASM): New.
(whirlpool_tables_s): New.
(rc, C0, C1, C2, C3, C4, C5, C6, C7): Combine these tables into single
structure and replace old tables with macros of same name.
(tab): New structure containing above tables.
[USE_AMD64_ASM] (_gcry_whirlpool_transform_amd64)
(whirlpool_transform): New.
* configure.ac [host=x86_64]: Add 'whirlpool-sse2-amd64.lo'.

---

Benchmark results:

On Intel Core i5-4570 (3.2 Ghz):
After:
 WHIRLPOOL      |      4.82 ns/B     197.8 MiB/s     15.43 c/B
Before:
 WHIRLPOOL      |      9.10 ns/B     104.8 MiB/s     29.13 c/B

On Intel Core i5-2450M (2.5 Ghz):
After:
 WHIRLPOOL      |      8.43 ns/B     113.1 MiB/s     21.09 c/B
Before:
 WHIRLPOOL      |     13.45 ns/B     70.92 MiB/s     33.62 c/B

On Intel Core2 T8100 (2.1 Ghz):
After:
 WHIRLPOOL      |     10.22 ns/B     93.30 MiB/s     21.47 c/B
(Continue reading)

by Werner Koch | 2 Oct 15:03 2014
Picon

[git] GCRYPT - branch, master, updated. libgcrypt-1.6.0-116-g0ecd136

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".

The branch, master has been updated
       via  0ecd136a6ca02252f63ad229fa5240897bfe6544 (commit)
      from  1e8b86494cf8fa045696bd447b16267ffd1797f0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0ecd136a6ca02252f63ad229fa5240897bfe6544
Author: Werner Koch <wk <at> gnupg.org>
Date:   Thu Oct 2 14:49:31 2014 +0200

    build: Document SYSROOT.

    * configure.ac: Mark SYSROOT as arg var.

diff --git a/configure.ac b/configure.ac
index baed3ec..18db662 100644
--- a/configure.ac
+++ b/configure.ac
 <at>  <at>  -83,6 +83,8  <at>  <at>  AC_CANONICAL_HOST
 AM_MAINTAINER_MODE
 AM_SILENT_RULES

+AC_ARG_VAR(SYSROOT,[locate config scripts also below that directory])
(Continue reading)

by Werner Koch | 2 Oct 13:22 2014
Picon

[git] GCRYPT - branch, master, updated. libgcrypt-1.6.0-115-g1e8b864

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".

The branch, master has been updated
       via  1e8b86494cf8fa045696bd447b16267ffd1797f0 (commit)
      from  51dae8c8c4b63bb5e1685cbd8722e35342524737 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1e8b86494cf8fa045696bd447b16267ffd1797f0
Author: Werner Koch <wk <at> gnupg.org>
Date:   Thu Oct 2 12:51:49 2014 +0200

    build: Support SYSROOT based config script finding.

    * src/libgcrypt.m4: Add support for SYSROOT and set
    gpg_config_script_warn.  Use AC_PATH_PROG instead of AC_PATH_TOOL
    because the config script is not expected to be installed with a
    prefix for its name
    * configure.ac: Print a library mismatch warning.
    * m4/gpg-error.m4: Update from git master.
    --

    Also fixed the false copyright notice in libgcrypt.m4.

diff --git a/configure.ac b/configure.ac
(Continue reading)


Gmane