39 ms·
Quoth the article: That means that if you know SHA1(secret || message), then you can compute SHA1(secret || message || ANYTHING), which is a valid signature fo
by cperciva 17y ago
Quoth the article:
That means that if you know SHA1(secret || message), then you can compute SHA1(secret || message || ANYTHING), which is a valid signature for message || ANYTHING. So to break this system, you just need to see one signature from SuperAnnoyingPoke, and then you can impersonate SuperAnnoyingPoke for lots of other messages.
This is absolutely incorrect. If you know SHA1(secret || message), you can compute SHA1(secret || message || padding || anything), which is quite a different matter. Most useful values of "anything" don't start with such padding.
Should anyone be designing a system which relies on this distinction for its security? Of course not. But things are bad enough already without exaggerating the scope of attacks.
- tptacek 17y agoYou mean useful values of "anything" not including URLs, HTTP cookies, unicode comma-seperated lists, and unicode key=value ASCII pairs, where a small amount of padding isn't going to break anything.
- cperciva 17y agoI don't know about you, but I generally don't allow NUL bytes in my URLs, HTTP cookies, unicode comma-separated lists, or unicode key=value ASCII pairs.
- tptacek 17y agoThat's because you're a C programmer. Tarnsap may not have this problem, but Flickr definitely did. I don't know why you think it's a good idea to talk this problem down; it has already been catastrophically bad for some applications.
- cperciva 17y agoI'm not trying to talk the issue down. I'm just saying that it's bad enough already without exaggerating it further.
- shrughes 17y agoWell I generally don't disallow NUL bytes.