Whirlpool in gcrypt <= 1.5.3 broken (if writes in chunks)?

Werner Koch wk at gnupg.org
Sun Jan 19 15:13:43 CET 2014


On Fri, 17 Jan 2014 21:58, gmazyland at gmail.com said:

> So if there is a "bug emulation flag" it could help to implement it.

Done in master.  The code is not very sophisticated: I added the flag and
then re-added most of the old code.  If this works out for you I
will backport it to 1.6 and release a 1.6.1 soon.

    The suggested way of using the flag is:
    
      if (whirlpool_bug_assumed)
        {
    #if GCRYPT_VERSION_NUMBER >= 0x010601
          err = gcry_md_open (&hd, GCRY_MD_WHIRLPOOL, GCRY_MD_FLAG_BUGEMU1)
          if (gpg_err_code (err) == GPG_ERR_INV_ARG)
             error ("Need at least Libggcrypt 1.6.1 for the fix");
          else
             {
                do_hash (hd);
                gcry_md_close (hd);
              }
    #endif
        }



Salam-Shalom,

   Werner


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




More information about the Gcrypt-devel mailing list