3 ms·
It does not apply here, but strcmp is, due to the early bailout that any sane implementation uses, suspectible to timing attacks, as in http://www.cs.rice.edu/~
by Someone 14y ago
It does not apply here, but strcmp is, due to the early bailout that any sane implementation uses, suspectible to timing attacks, as in http://www.cs.rice.edu/~scrosby/slides/SCISS-latency.1.ppt http://www.cs.rice.edu/~scrosby/slides/SCISS-latency.1.ppt.
- tptacek 14y agoA timing attack against URL query strings as processed by a normalizing cache proxy?
- masterzora 14y agoQuoth the parent: "It does not apply here"
- tptacek 14y agoSure. The flaw here isn't strcmp. In fact, most crypto compares don't use strcmp, even in naive code; an HMAC-SHA1 MAC, for instance, is an array of 8-bit bytes, not the hex string that programs encode them into for human consumption. "memcmp" is the normal culprit. Timing attacks aren't a flaw in memcmp or strcmp. Touching every byte of a string is stupid behavior in the overwhelming majority of cases.