Modification Detection Code 2, an ISO/IEC 10118-2 standard hash function based on DES encryption. Produces 128-bit hashes using Davies-Meyer construction.
| Property | Value |
|---|---|
| Category | Hash Functions |
| Sub-category | Hash Function |
| Security status | ⚠️ Deprecated |
| Complexity | Intermediate |
| Inventor | Brachtl, Coppersmith, Hyden, Matyas, Meyer, Oseas, Pilpel, Schilling |
| Year | 1988 |
| Origin | 🇺🇸 United States |
| Source | algorithms/hash/mdc2.js |
| Parameter | Supported values |
|---|---|
| Output sizes | 16 bytes (128 bits) |
Status: ⚠️ Deprecated
No vulnerabilities are recorded for this implementation.
2 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 — OpenSSL Test Vector - ‘Now is the time for all ‘ (pad_type=2)
| Field | Value |
|---|---|
padType |
2 |
input |
4e6f77206973207468652074696d6520666f7220616c6c20 |
expected |
2e4679b5add9ca7535d87afeab33bee2 |
Vector 2 — OpenSSL Test Vector - ‘Now is the time for all ‘ (pad_type=1, default)
| Field | Value |
|---|---|
padType |
1 |
input |
4e6f77206973207468652074696d6520666f7220616c6c20 |
expected |
42e50cd224baceba760bdd2bd409281a |