Home GnuPG

md: Fix Whirlpool flaw.
0a28b2d2c918Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

md: Fix Whirlpool flaw.

* cipher/whirlpool.c (whirlpool_add): Remove shortcut return so that
byte counter is always properly updated.

Using the forthcoming gcry_md_hash_buffers() and its test suite, I
found that a message of size 62 won't yield the correct hash if it is
fed into Whirlpool into in chunks. The fix is obvious. The wrong
code was likely due to using similar structure as SHA-1 but neglecting
that bytes and not blocks are counted.

Details

Provenance
wernerAuthored on Sep 7 2013, 10:06 AM
Parents
rC0fb7c2cd345f: md: Update URL of the Whirlpool specs.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rC0a28b2d2c918: md: Fix Whirlpool flaw. (authored by Werner Koch <wk@gnupg.org>).Sep 10 2013, 9:20 PM