This preview shows page 1. Sign up to view the full content.
Unformatted text preview: lue than MD5, is faster than the various block-cipher 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 key-dependent one-way hash function. MACs have the same properties as the one-way 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 one-way 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 Davies-Meyer (with IDEA) Davies-Meyer (with DES) GOST Hash HAVAL (3 passes) HAVAL (4 passes) HAVAL (5 passes) MD2 MD4 MD5 N-HASH (12 rounds) N-HASH (15 rounds) RIPE-MD 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 one-way hash function into a MAC is to encrypt the hash value with a symmetric algorithm. Any MAC can be turned into a one-way hash function by making the key public. CBC-MAC
The simplest way to make a key-dependent one-way 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 , A...
View Full Document
This note was uploaded on 10/18/2010 for the course MATH CS 301 taught by Professor Aliulger during the Fall '10 term at Koç University.
- Fall '10