Live data from Hacker News

Why you should never use hash functions for message authentication

blog.jcoglan.com

101–103 of 103 posts

Re: Why you should never use hash functions for message authentication

#101
post #48
post #26

what's wrong with hashing (message + secret) instead?

Relying on the way you happen to combine data, instead of using a function that's designed for authentication and has baked-in a safe way to combine the inputs, is a bad idea. "What if $EDGE_CASE_OF_INAPPROPRIATE_CRYPTO_FUNCTION" is never a good question to ask. Just use the right tools in the first place.

> Just use the right tools in the first place.

There are two reasons to ask the question.

The first reason is because the questioner is looking for an excuse to use something different. In this case, your answer is the right answer.

The second reason is because the questioner wants to learn more about how cryptography works, for educational value. In this case, your answer is not helpful.

Re: Why you should never use hash functions for message authentication

#102
post #24

Earlier quoted context omitted.

Wouldn't this attack be better eliminated by fixing the timing leak that is potentially allowing people to guess valid MACs on packets? The reality is that you probably can dick around with things in your deployment and your app to make timing attacks prohibitively expensive/annoying; if you understand that you're not eliminating the timing leak, but rather masking it, you can take advantage of the additional measure…

I guess the idea of just blacklisting the client's IP after the first 1,048,576 failed attempts is too boring, or has some other drawback.

Real attackers don't use the same IP. They have access to millions.

Re: Why you should never use hash functions for message authentication

#103
post #102

Earlier quoted context omitted.

I guess the idea of just blacklisting the client's IP after the first 1,048,576 failed attempts is too boring, or has some other drawback.

Real attackers don't use the same IP. They have access to millions.

Botnets haven't historically used timing attacks.

Might be an interesting research problem, though...

Post reply on HN