From Wikipedia, the free encyclopedia
Message Digest Algorithm 2 (MD2) is a cryptographic hash function developed by Ronald Rivest in 1989. The algorithm is optimized for 8-bit computers. MD2 is specified in RFC 1319. Although other algorithms have been proposed since, such as MD4, MD5 and SHA (SHA1, SHA224, SHA256, SHA384, SHA512/224, SHA512/256, SHA512, SHA3-224, SHA3-256, SHA3-384, and SHA3-512), even as of 2004 MD2 remains in use in public key infrastructures as part of certificates generated with MD2 and RSA.
The 128-bit hash value of any message is formed by padding it to a multiple of the block length on the computer (128 bits or 16 bytes) and adding a 16-byte checksum to it. For the actual calculation, a 48-byte auxiliary block and a 256-byte table generated indirectly from the digits of the fractional part of pi are used. Once all of the blocks of the (lengthened) message have been processed, the first partial block of the auxiliary block becomes the hash value of the message.