CSI-ES-2324/TPs/TP03/Readme.md
2024-03-05 12:11:08 +00:00

8 lines
No EOL
609 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Questao 1
Ao utilizar o programa 'chacha20_int_attck.py' sobre um criptograma produzido por 'pbenc_chacha20_poly1305', the decrpyt function will raise the execption :
- 'cryptography.exceptions.InvalidTag' If the authentication tag doesnt validate this exception will be raised. This will occur when the ciphertext has been changed, but will also occur when the key, nonce, or associated data are wrong.
We can try this by encrypting a message and then changing the ciphertext with the attack program:
![Failed Attack](https://github.com/uminho-mei-es/2324-G05/blob/main/TPs/TP03/attack_fail.png)