MDC-2

# MDC-2

X

Description:
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. The length of the output hash depends on the underlying block cipher used.

## Algorithm

For a given message [itex]M[/itex] to hash and a given block cipher encryption function [itex]E[/itex], the MDC-2 algorithm proceed as followed. Let [itex]n[/itex] be the block length, [itex]A_1, B_1[/itex] two different constants of size [itex]n[/itex]. If [itex]M = M_1||..|M_m[/itex] where each [itex]M_i[/itex] has size [itex]n[/itex], then the hash [itex]V_m||W_m[/itex] of the message is given by:
• for [itex]i = 1[/itex] to [itex]m[/itex]:
• [itex]V_i = M_i oplus E(M_i,A_i)[/itex]
• [itex]W_i = M_i oplus E(M_i,B_i)[/itex]
• [itex]V_i^L || V_i^R = V_i[/itex]
• [itex]W_i^L || W_i^R = W_i[/itex]
• [itex]A_ = V_i^R||W_i^L[/itex]
• [itex]B_ = W_i^R||V_i^L[/itex]
• return [itex]V_m||W_m[/itex]

## 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......`

No feeds found

All