CSI-ES-2324/TPs/TP03
2024-03-12 10:27:44 +00:00
..
py Added readme, added exception throw and copied attack program from tp02 2024-03-05 12:09:58 +00:00
.gitignore Initial commit 2024-02-19 10:37:29 +00:00
attack_fail.png Added readme, added exception throw and copied attack program from tp02 2024-03-05 12:09:58 +00:00
compile_commands.json [TP03] Done 2024-03-05 23:39:41 +00:00
pbenc_aes_ctr_hmac [TP03] Done 2024-03-05 23:39:41 +00:00
pbenc_aes_ctr_hmac.c [TP03] Done 2024-03-05 23:39:41 +00:00
plaintext [TP03] Done 2024-03-05 23:39:41 +00:00
Readme.md fixed readme 2024-03-05 12:11:08 +00:00
tokefile.toml [TP03] Done 2024-03-05 23:39:41 +00:00

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