Content deleted Content added
→Davies-Meyer: Grammar fix. |
Added more text. |
||
Line 23:
<br style="clear:both"/>
== Matyas-Meyer-Oseas ==
[[Image:Matyas-Meyer-Oseas hash.png|thumb|230px|right|The Matyas-Meyer-Oseas hash construction]]
The Matyas-Meyer-Oseas hash construction can be considered the dual (the opposite) of Davies-Meyer.
It feeds each block of the message (m<sub>i</sub>) as the cleartext to be encrypted. The output ciphertext is then also [[exclusive-or|XORed]] (<math>\oplus</math>) with the same message block (m<sub>i</sub>) to produce the next hash value (H<sub>i</sub>). The previous hash value (H<sub>i-1</sub>) is fed as the key to the block cipher. In the first round when there is no previous hash value it uses a constant pre-specified initial value (H<sub>0</sub>).
If the block cipher have different block and key size the hash value (H<sub>i-1</sub>) will have the wrong size for use as the key. The cipher might also have other special requirements on the key. Then the hash value is first fed through the function g( ) to be converted/padded to fit as key for the cipher.
<math>H_i = E_{g(H_{i-1})}(m_i)\oplus m_i</math>
<br style="clear:both"/>
|