Content deleted Content added
Added more text. |
More text |
||
Line 27:
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
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.
Line 36:
== Miyaguchi-Preneel ==
[[Image:Miyaguchi-Preneel hash.png|thumb|230px|right|The Miyaguchi-Preneel hash construction]]
The Miyaguchi-Preneel hash construction is an extended variant of Matyas-Meyer-Oseas.
It feeds each block of the message (m<sub>i</sub>) as the cleartext to be encrypted. The output ciphertext is then XORed (<math>\oplus</math>) with the same message block (m<sub>i</sub>) and then also XORed with the previous hash value (H<sub>i-1</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 H_{i-1}\oplus m_i</math>
|