Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Vuln-Dev
[Top] [All Lists]

Re: Combining Hashes

Subject: Re: Combining Hashes
Date: Sun, 20 Feb 2005 22:10:03 +0100
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

<Prev in Thread] Current Thread [Next in Thread>