World Library  
Flag as Inappropriate
Email this Article


Article Id: WHEBN0002642062
Reproduction Date:

Title: Mdc-2  
Author: World Heritage Encyclopedia
Language: English
Subject: Cryptographic hash functions, PMAC (cryptography), SANDstorm hash, SIMD (hash function), VMAC
Collection: Cryptographic Hash Functions
Publisher: World Heritage Encyclopedia


In cryptography, MDC-2 (Modification Detection Code 2, sometimes called Meyer-Schilling) is a cryptographic hash function. MDC-2 is a hash function based on a block cipher with a proof of security in the ideal-cipher model.[1] The length of the output hash depends on the underlying block cipher used.


  • Algorithm 1
  • MDC-2DES hashes 2
  • Patent issues 3
  • See also 4
  • Notes 5


For a given message M to hash and a given block cipher encryption function E, the MDC-2 algorithm proceeds as follows. Let n be the block length, A_1, B_1 two different constants of size n. If M = M_1||..||M_m where each M_i has size n, then the hash V_m||W_m of the message is given by:

  • for i = 1 to m:
    • V_i = M_i \oplus E(M_i,A_i)
    • W_i = M_i \oplus E(M_i,B_i)
    • V_i^L || V_i^R = V_i
    • W_i^L || W_i^R = W_i
    • A_{i+1} = V_i^R||W_i^L
    • B_{i+1} = W_i^R||V_i^L
  • return A_{m+1}||B_{m+1}

MDC-2DES hashes

When MDC-2 uses the DES block cipher, the 128-bit (16-byte) MDC-2 hashes are typically represented as 32-digit hexadecimal numbers. The following demonstrates a 43-byte ASCII input and the corresponding MDC-2 hash:

 MDC2("The quick brown fox jumps over the lazy dog") 
  = 000ed54e093d61679aefbeae05bfe33a

Even a small change in the message will (with probability) result in a completely different hash, e.g. changing d to c:

 MDC2("The quick brown fox jumps over the lazy cog") 
  = 775f59f8e51aec29c57ac6ab850d58e8

The hash of the zero-length string is:

  = 52525252525252522525252525252525

Patent issues

MDC-2 was covered by U.S. Patent 4,908,861, issued on March 13, 1990 but filed by IBM on August 28, 1987.
For this reason, support for MDC-2 has been disabled in OpenSSL on most Linux distributions and is not implemented by many other cryptographic libraries.

But the maximum lifespan of 20 years from filing date means that the U.S. Patent 4,908,861 could not have lasted beyond August 28, 2007 ; in fact it has expired in 2002,[2] because IBM has not paid the renewal fee. The same goes for the Canadian patent. There is no patent for Europe. This means that MDC-2 can be freely used.

See also


  1. ^ Steinberger, John (June 23, 2007). "The Collision Intractability of MDC-2 in the Ideal-Cipher Model". Advances in Cryptology - EUROCRYPT 2007. Springer-Verlag. pp. 34–51.  
  2. ^ "USPTO - Patent Maintenance Fees". United States Patent Office. March 13, 2002. Retrieved 2008-01-31.  (Click on "Bibliographic data".)

This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.