All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <gmazyland@gmail.com>
To: gcrypt-devel@gnupg.org
Cc: dm-crypt <dm-crypt@saout.de>
Subject: [dm-crypt] Whirlpool in gcrypt <= 1.5.3 broken (if writes in chunks)?
Date: Fri, 17 Jan 2014 19:25:39 +0100	[thread overview]
Message-ID: <52D975A3.6080609@gmail.com> (raw)

Hi,

since this commit (present in 1.6.0)

"md: Fix Whirlpool flaw."
http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=0a28b2d2c9181a536fc894e24626714832619923

seems that Whirlpool hash produces different output
if data are written in parts.
(If entered as one buffer, it seems to be compatible though.)

Unfortunately, cryptsetup in its anti-forensic filter uses something like this:
  gcry_md_write(iv, iv_size)
  gcry_md_write(buf, buf_size)
  gcry_md_read ...

Change above seems to breaks all LUKS devices which used Whirlpool as hash
before and upgraded to gcrypt 1.6.0 (cryptsetup cannot open them anymore).

See for example https://bbs.archlinux.org/viewtopic.php?id=175737

Is my assumption that all whirlpool implementations before
libgcrypt 1.6.0 are broken if used this way?

(Using different crypto backend seems to support this assumption...)

Thanks,
Milan

             reply	other threads:[~2014-01-17 18:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-17 18:25 Milan Broz [this message]
2014-01-17 20:26 ` [dm-crypt] Whirlpool in gcrypt <= 1.5.3 broken (if writes in chunks)? Werner Koch
2014-01-17 20:58   ` Milan Broz
2014-01-19 14:13     ` Werner Koch
2014-01-19 19:49       ` Milan Broz
2014-01-20  7:56         ` Werner Koch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52D975A3.6080609@gmail.com \
    --to=gmazyland@gmail.com \
    --cc=dm-crypt@saout.de \
    --cc=gcrypt-devel@gnupg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.