One-way compression function: Difference between revisions

Content deleted Content added
Length padding example: Oops, wrong number of bits and zeros. Fixed.
Length padding example: "implementation" -> "algorithm"
Line 42:
Wikipedi a0000000 00000009
 
Now that is a bit wasteful since it means hashing one extra block. So there is a slight speed optimisation that most hash implementationsalgorithms use. If there is space enough among the zeros padded to the last block the length value can instead be padded there. Like this:
 
Wikipedi a0000009
 
Note that to avoid confusion the implementationhash algorithm must use a fixed bit-size for the length value, say 40-bit. So the length value padded in the end really is "00009" not just "9".
 
== Davies-Meyer ==