开发者

Does having an unencrypted sha-224 checksum create a vulnerability?

If I have a packet of data that is encrypted yet also includes a sha-224 checksum that is not encrypted, am I creating a security vulnerability?

Or perhaps t开发者_运维问答he checksum should be produced after encryption?


Theoretically, if the checksum is calculated over the plain text, it is giving out more information about the encrypted data and hence reducing the security. If it is calculated over the cipher, it doesn't matter whether it's encrypted or not.

In pratice, a rainbow table attack could be made. If you need an unencrypted checksum over the plain text to check whether the password is correct (i.e. checksum mismatch = wrong password), make sure you include salt. Otherwise, calculate it over the cypher or, if you calculate it over the plain text, append it to the original data and encrypt everything.

EDIT: You don't need a bigger checksum, I was thinking about the block size of the encryption algorithm...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜