One-way compression function: Difference between revisions

Content deleted Content added
Length padding example: "implementation" -> "algorithm"
Grammar, then -> than (I hope this is right).
Line 3:
Some methods to turn any normal block cipher into the ''compression function'' for a hash function are '''Davies-Meyer''', '''Miyaguchi-Preneel''', '''Matyas-Meyer-Oseas''', '''MDC-2''' and '''MDC-4'''. They are then used inside the '''Merkle-Damgård structure''' to build the actual hash function. These methods are described in detail further down. ([[MDC-2]] is also the name of a hash function patented by IBM.)
 
Using a block cipher as a hash function usually is much slower thenthan using a specially designed hash function. But in some cases it might be easier since it means just implementing a block cipher and then using it both as a block cipher and a hash function. It can also save code space in very tiny [[embedded system]]s like for instance [[smart card]]s or nodes in cars or other machines.
 
If a block cipher has a [[Block size (cryptography)|block size]] of say 128 bits most of the methods create a hash function that has the block size of 128 bits and produces a hash of 128 bits. But there are also methods to make hashes with double the hash size compared to the block size of the block cipher used. So a 128-bit block cipher can be turned into a 256-bit hash function.