Message-Digest Algorithm 2 (MD2 ) is a published by Ronald L. Rivest in 1988 hash function. The algorithm was optimized for 8-bit computer. The hash value for an arbitrary message is formed, by first bringing the message to a multiple of the block length (128 bits or 16 bytes) and a checksum is appended 16-byte length. For the actual calculation, an auxiliary block of 48 bytes, and a 256 -byte substitution table, which has been permuted π depending on the number used. The substitution table results within the algorithm a " random " and nonlinear substitution operation.
After all the blocks of the ( extended) message have been processed, the first sub-block of the auxiliary block calculates the hash value of the message.
The 128 -bit-long MD2 hashes (English and "message - digests " ) will normally be listed as a 32- digit hexadecimal number. The following example shows a 59 -byte ASCII input and the corresponding MD2 hash:
Md2 ( " quick brown fox completely dilapidated taxi across Bavaria ") = 8415570a6653a06314f09b023612a92d A small change in the message generated ( very likely ) a completely different hash. With Frank instead Franz gives:
Md2 ( " Frank chases in the completely dilapidated taxi across Bavaria ") = b0e27e91b84246bc4c38bc3008f00374 The hash of a zero-length string is:
MD2 ("") = 8350e5a3e24c153df2275c9f80692773 References