18.12.2012 Views

O'Reilly - Practical UNIX & Internet Sec... 7015KB

O'Reilly - Practical UNIX & Internet Sec... 7015KB

O'Reilly - Practical UNIX & Internet Sec... 7015KB

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

[Chapter 6] 6.5 Message Digests and Digital Signatures<br />

MD2 was designed by Ronald Rivest and published in RFC 1319. There are no known weaknesses in it, but it is very<br />

slow. To create a faster message-digest, Rivest developed MD4, which was published in <strong>Internet</strong> RFCS 1186 and<br />

1320. The MD4 algorithm was designed to be fast, compact, and optimized for machines with "little-endian"<br />

architectures.<br />

Some potential attacks against MD4 were published in the cryptographic literature, so Dr. Rivest developed the MD5<br />

algorithm, published in RFC 1321.[21] It was largely a redesign of MD4, and includes one more round of internal<br />

operations and several significant algorithmic changes. Because of the changes, MD5 is somewhat slower than MD4.<br />

However, it is more widely accepted and used than the MD4 algorithm.<br />

[21] <strong>Internet</strong> RFCs are a form of open standards documents. They can be downloaded or mailed, and they<br />

describe a common set of protocols and data structures for interpretability.<br />

As of early 1996, significant flaws have been discovered in MD4. As a result, the algorithm should not be used.<br />

6.5.4.2 SHA<br />

The <strong>Sec</strong>ure Hash Algorithm was developed by NIST with some assistance by the NSA. The algorithm appears to be<br />

closely related to the MD4 algorithm, except that it produces an output of 160 bits instead of 128. Analysis of the<br />

algorithm reveals that some of the differences from the MD4 algorithm are similar in purpose to the improvements<br />

added to the MD5 algorithm (although different in nature).<br />

6.5.4.3 HAVAL<br />

The HAVAL algorithm is a modification of the MD5 algorithm, developed by Yuliang Zheng, Josef Pieprzyk, and<br />

Jennifer Seberry. It can be modified to produce output hash values of various lengths, from 92 bits to 256. It also has<br />

an adjustable number of "rounds" (application of the internal algorithm). The result is that HAVAL can be made to<br />

run faster than MD5, although there may be some corresponding decrease in the strength of the output. Alternatively,<br />

HAVAL can be tuned to produce larger and potentially more secure hash codes.[22]<br />

[22] You should note that merely having longer hash values does not necessarily make a message digest<br />

algorithm more secure.<br />

6.5.4.4 SNEFRU<br />

SNEFRU was designed by Ralph Merkle to produce either 128-bit or 256-bit hash codes. The algorithm can also be<br />

run with a variable number of "rounds" of the internal algorithm. However, analysis by several cryptographers has<br />

shown that SNEFRU has weaknesses that can be exploited, and that you can find arbitrary messages that hash to a<br />

given 128-bit value if the 4-round version is used. Dr. Merkle currently recommends that only 8-round SNEFRU be<br />

used, but this algorithm is significantly slower than the MD5 or HAVAL algorithms.<br />

6.5.5 Other Codes<br />

For the sake of completeness, we will describe two other types of "signature" functions.<br />

6.5.5.1 Checksums<br />

A checksum is a function that is calculated over an input to determine if that input has been corrupted. Most often,<br />

checksums are used to verify that data communications over a modem or network link have not undergone "bit-rot," or<br />

random changes from noise. They may also be built into storage controllers to perform checks on data moved to and<br />

from media: if a checksum doesn't agree with the data, then there may be a problem on the disk or tape.<br />

Checksums are usually calculated as simple linear or polynomial functions over their input, and result in small values<br />

(16 or 32 bits). CRC polynomials, or cyclic-redundancy checksums, are a particular form of checksum that are<br />

file:///C|/Oreilly Unix etc/<strong>O'Reilly</strong> Reference Library/networking/puis/ch06_05.htm (5 of 6) [2002-04-12 10:44:59]

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

Saved successfully!

Ooh no, something went wrong!