3 ms·
In general I don't see any reason to look at any data in the payload before the signature is verified. If anything, a good reason is that increases attack surfa
by lmilcin 6y ago
In general I don't see any reason to look at any data in the payload before the signature is verified. If anything, a good reason is that increases attack surface by giving attacker ability to interact with my system without the signature.
I don't know what exactly you mean by improving performance by looking at the payload before the cost of signature verification. If you mean that for some reason you could discard large portion of messages without actually verifying the signature then this is generally false.
In a DoS situation the attacker might want to consume your resources without bothering to forge the signature but just as well he can forge the content so potentially easy fix to their fake content will cause you to pay for the signature verification anyway.
If, on the other hand, the application somehow relies on this to be viable then very likely this is a design fault. I can imagine for example that you might want to discard messages with outdated tokens but there are better ways to solve this (just don't send outdated tokens?)
- hinkley 6y agoIn one case they were trying to categorize the content based on inspecting the manifest, shall we call it. If you start making decisions based on non-authoritative information, my experience is that you very quickly forget that it's non-authoritative. That slippery slope is universal, rather than particular to any examples in this thread. If it can happen, it will happen. If you decide things without checking with a higher authority, then you are the Confused Deputy, and that typically ends badly. It's not Barney's fault he keeps getting locked in the jail cell. It's Andy's.