done 2
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Andre Henriques 2023-11-07 16:11:09 +00:00
parent edd6460beb
commit b7a041f7c2

View File

@ -71,6 +71,38 @@
Since the words were encrypted with the same key, that means if we were to generate a possible key, that key would need to decrypt both ciphertexts such that when the tree is navigated we navigate to nodes that exist. If the key results in a path in the tree that does not exist, then we can disregard that answer as a possible key and continue with the possible next key.
Once you find a key that is the same length as the cipher text, we know that we found the right key.
\section*{2}
\section*{2.1}
Ciphertext:
6cea122f3b42975bdbbeb7f2c6efaf9fd5a54fdd62\textbf{3c}27\textbf{6f}55358f4fbcb7a9492d0451b7019c69faef5fd23103ff7ec521fbbc6516ca2cb2ca663d5dbff86bcf
T=2nd block
U=6th byte from the 2nd block
V=0x33
W=0x3c
X=8th byte from the 2nd block
Y=0x6c
Z=0x6f
To change the given cipher text we need to first find the block we want to change and go to the previous block, this only works for blocks after the first one, after that we need to find the value that comes out of the Encryption function and we can do that if we follow this formula:
$$\text{After Encrytion}\oplus\text{Previous Block Original Ciphertext}=\text{PlainText}\iff\text{After Encryption}=\text{Previous Block Original Ciphertext}\oplus\text{PlainText}$$
After we calculate the value that comes out of the encryption function and before we xor with the previous block we can now calculate the value that we need to change the previous block in the cipher text to:
$$\text{After Encrytion}\oplus\text{Previous Block Altered Ciphertext}=\text{Altered PlainText}\iff\text{Previous Block Altered Ciphertext}=\text{After Encrytion}\oplus\text{Altered PlainText}$$
\subsction*{2.2}
The block before the block where the change appens becomes altered as well.
\subsction*{2.3}
The change is similiar to the one described in 2.1 but with the iv value instead of the previous block
$$\text{After Encrytion}\oplus\text{Original IV value}=\text{PlainText}\iff\text{After Encryption}=\text{Original IV value}\oplus\text{PlainText}$$
After we calculate the value that comes out of the encryption function and before we xor with IV value we can now calculate the value that we need to change the IV value to:
$$\text{After Encrytion}\oplus\text{New IV value}=\text{Altered PlainText}\iff\text{New IV value}=\text{After Encrytion}\oplus\text{Altered PlainText}$$
\subsection*{2.4}
You can not change the location word "station'', because the word is spread between 2 blocks which means that to change the second part of the word "ion'', you need to change the previos block but by changing the previous block the rest of the word "stat'' would have become garbled.
\section*{5}
\subsection*{5.1}
The hash function is collision resistante for $n=1$, since if the block size is one the hash function is the encryption. Therefore: