Fix xor
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Andre Henriques 2023-11-03 13:00:42 +00:00
parent 1b2ee7fc14
commit f132feca53

View File

@ -53,8 +53,8 @@
if the message is only one block long:
$$H=E$$
$$m\ne m'$$
$$H(m)=E(K, IV \xor m) = C_1$$
$$H(m')=E(K, IV \xor m') = C_2$$
$$H(m)=E(K, IV \oplus m) = C_1$$
$$H(m')=E(K, IV \oplus m') = C_2$$
And if there the hashing function was not collision resistant that would imply
$$C_1=C_2\implies D(C_1)=D(C_2) \impies m=m'$$
and since $m !=m'$ the hash function is collision resistant, for messages with 1 block.