3 ms·
> Poly1305 also saves network bandwidth, since its output is only 16 bytes compared to HMAC-SHA1, which is 20 bytes I'm puzzled why a shorter MAC would be cons
by userbinator 13y ago
> Poly1305 also saves network bandwidth, since its output is only 16 bytes compared to HMAC-SHA1, which is 20 bytes
I'm puzzled why a shorter MAC would be considered a good thing in a security application - because theoretically, a 20-byte MAC gives roughly 4 billion times the space of a 16-byte one. It's like shortening an encryption key - hasn't the trend been toward making them longer and thus more resistant to attack?
- tptacek 13y agoSimpler security proof, higher guaranteed security with a shorter MAC.
- riffraff 13y agocould explain this in a longer way? Considering the HMAC subset of MAC, the final value of the function should be of the same length of the base hash function. So i.e. hmac-sha256 would be longer than hmac-sha1, but I don't understand why the latter would be simpler to check and of higher security. Or do you mean that Poly1305 is all three (simpler, more secure, shorter mac) compared to the HMAC family?
- tveita 13y agoA difference between encryption keys and MACs is that MACs do not become weaker as the attacker gains more computing power, except by making bruteforcing the authentication key easier, which does not depend on the length of the tag. The attacker is limited by the amount of messages your system can process. Another difference is that old communication is not at risk. As soon as the client and server is upgraded, they are secure, as opposed to encryption where attackers may still recover sensitive information from things that were encrypted years ago. So it doesn't need the same degree of future proofing. So while a 80-bit encryption key is on the weak end of the spectrum, even 80 bits of security is pretty conservative for a MAC.