Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>ciphertext = Encrypt(plaintext || Hash(plaintext))

As already mentioned, this allows the attacker to generate a valid hash in some circumstances. You don't have to allow this and it has been argued that such an approach is secure[1].

As a practical example, which is guaranteed to annoy someone just by the suggestion, the OpenPGP authenticated encryption mode that has been around forever has never been subverted in this way but is at its heart "hash then encrypt". It depends on a random value that is kept from attackers[2].

[1] https://cseweb.ucsd.edu/~mihir/papers/enc-red.pdf

[2] https://articles.59.ca/doku.php?id=pgpfan:mdc (my article)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: