Re: Combining Hashes

From: Ivan Krstic (krstic_at_hcs.harvard.edu)
Date: 02/20/05

  • Next message: Michael Silk: "Re: SHA-1 broken"
    Date: Sun, 20 Feb 2005 22:10:03 +0100
    To: "Aaron Mizrachi (unmanarc)" <aaron@synacksecurity.com>
    
    

    Aaron Mizrachi (unmanarc) wrote:
    > I dont recomend something as: HASH(HASH(data)+data) until a research of
    > propietries of that where investigated and mathematical proved. The better
    > method (i think) is: HASH(HASH(data)), because adds two layer... and have the
    > same or more security than HASH(data).

    The two options differ in speed and security. Doing h(h(m) + m) where h
    is your hash function and m your message, is slow and requires m to be
    buffered. It also defeats length extension and partial message attacks,
    so is considered a relatively complete solution to many inherent hash
    function weaknesses.

    Doing h(h(m)) is faster, but you can only claim n/2 bits of security for
    an otherwise n-bit hash function h. Speed for security is usually a bad
    tradeoff, so I recommend h(h(m) + m) as a better approach. Schneier and
    Ferguson also take this approach in "Practical Cryptography" (Wiley
    Publishing, 2003).

    -IK


  • Next message: Michael Silk: "Re: SHA-1 broken"

    Relevant Pages

    • Re: Curve25519-based EC-KCDSA
      ... the security abstraction and that no one has noticed the issue before. ... DSA and failed. ... insecure _with_ a hash function, it not be more secure in this model. ...
      (sci.crypt)
    • Re: Two questions on Stream Ciphers like ARC4 and L14
      ... problems may reveal themselves as a result of timing attacks. ... Security against chosen-ciphertext attack means this sort of thing can't ... > able to use an IV without a cryptographic hash function, ... provably secure if all the keys are generated in a way which is `hard' ...
      (sci.crypt)
    • Re: Unique code for every user
      ... If there is a security issue (and apparently there is, ... For a Luby-Rackoff ... hash function, which is somewhat more difficult than a hash function ... the half-space is beyond exhaustive search. ...
      (comp.lang.java.programmer)
    • Re: Password scrambler program
      ... password) is sent to a hash function and hashed multiple times - 1000 is ... Salt is normally considered public. ... and so not helping at all against some types of attack. ... Moreover, from the point of view of a security engineer, this indeed ...
      (sci.crypt)
    • Re: hasfunctions need not encrypt their data?
      ... the level of security you're trying to achieve). ... > information of the original data from only looking at the hash value." ... > I KNOW this is not a requirement for collision free, ... > construct a collision free hash function that does not respect the ...
      (comp.security.misc)