Suppose that we have a block cipher and want to use it as a hash function.
Let X be a specified constant and let M be a message consisting of a single block, where the block size is the size of the key in the block cipher.
Define the hash of M as Y = E(X, M). Note that M is being used in place of the key in the block cipher.