02.03.2018 Views

Sybex CEH Certified Ethical Hacker Version 8 Study Guide

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

68 Chapter 3 ■ Cryptography<br />

Understanding Hashing<br />

Simply put, hashing is one-way encryption. It is a form of encryption that creates a scrambled<br />

output that cannot be reversed, or at least cannot be reversed easily. The process of<br />

hashing takes plaintext and transforms it into ciphertext, but does so in such a way that it<br />

is not intended to be decrypted. The process outputs what is known as a hash, hash value,<br />

or message digest.<br />

Designed to be a one-way process, hashing is commonly used to validate the integrity of<br />

information. A hash function generates a fixed-length value that is always the same length<br />

no matter how large or small the data entering the process or algorithm is. The resulting<br />

output, as we already discussed, is intended to be nonreversible or very nearly impossible<br />

to reverse. The fixed-length value is unique for every different input that enters the process.<br />

It is due to this unique property and its behavior that hashes are used to detect the changes<br />

that can happen in data of any type.<br />

Hashing lets you easily detect changes in information: anything that is hashed and then<br />

changed, even a small amount, will result in an entirely different hash from the original.<br />

Hashed values are the result of information being compressed into the fixed-length value. A<br />

one-way hash function is also sometimes referred to as a one-time cipher key, or a thumbprint.<br />

The following is a list of hashing algorithms currently in use:<br />

Message Digest 2 (MD2) A one-way hash function used in the privacy-enhanced mail<br />

(PEM) protocols along with MD5.<br />

Message Digest 4 (MD4) A one-way hash function used for PGP and other systems. MD4<br />

has been replaced by MD5 in most cases.<br />

Message Digest 5 (MD5) An improved and redesigned version of MD4 that produces a<br />

128-bit hash. MD5 is still extremely popular in many circles, but it is being phased out due<br />

to weaknesses that have led to the system being vulnerable. In many cases, MD5 has been<br />

replaced with SHA2.<br />

Message Digest (MD6) A hashing algorithm that was designed by Ron Rivest.<br />

HAVAL A variable-length, one-way hash function and modification of MD5.<br />

Whirlpool A hashing algorithm designed by the creators of AES.<br />

Tiger A hash that is optimized for 64-bit processors but works well on other systems.<br />

RIPE-MD A hashing algorithm commonly used in Europe.<br />

Secure Hash Algorithm-0 (SHA-0) Used prior to SHA-1 and has since been replaced by<br />

SHA-1.<br />

Secure Hash Algorithm-1 (SHA-1) One of the other more commonly used hashing<br />

algorithms. It has been broken.<br />

Secure Hash Algorithm-2 (SHA-2) Designed to be an upgrade to SHA-1.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!