Unformatted text preview: lue than MD5, is faster than the various blockcipher constructions, and was developed by the NSA. I trust the NSA’s abilities at cryptanalysis, even if they don’t make their results public. Table 18.2 gives timing measurements for some hash functions.y They are meant for comparison purposes only. 18.14 Message Authentication Codes
A message authentication code, or MAC, is a keydependent oneway hash function. MACs have the same properties as the oneway hash functions discussed previously, but they also include a key. Only someone with the identical key can verify the hash. They are very useful to provide authenticity without secrecy. MACs can be used to authenticate files between users. They can also be used by a single user to determine if his files have been altered, perhaps by a virus. A user could compute the MAC of his files and store that value in a table. If the user used instead a oneway hash function, then the virus could compute the new hash value after infection and replace the table entry. A virus could not do that with a MAC, because the virus does not know the key. Table 18.2 Speeds of Some Hash Functions on a 33 MHz 486SX Algorithm Abreast DaviesMeyer (with IDEA) DaviesMeyer (with DES) GOST Hash HAVAL (3 passes) HAVAL (4 passes) HAVAL (5 passes) MD2 MD4 MD5 NHASH (12 rounds) NHASH (15 rounds) RIPEMD SHA SNEFRU (4 passes) SNEFRU (8 passes) Hash Length 128 64 256 variable variable variable 128 128 128 128 128 128 160 128 128 Encryption Speed (kilobytes/second) 22 9 11 168 118 95 23 236 174 29 24 182 75 48 23 An easy way to turn a oneway hash function into a MAC is to encrypt the hash value with a symmetric algorithm. Any MAC can be turned into a oneway hash function by making the key public. CBCMAC
The simplest way to make a keydependent oneway hash function is to encrypt a message with a block algorithm in CBC or CFB modes. The hash is the last encrypted block, encrypted once more in CBC or CFB modes. The CBC method is specified in ANSI X9.9 [54], A...
View
Full Document
 Fall '10
 ALIULGER
 Cryptography, Bruce Schneier, Applied Cryptography, EarthWeb, Search Search Tips

Click to edit the document details