Re:What I learned from my first C coding challenge
by Someone on Tuesday September 04, 2012 @03:04PM
(#4476013)
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.
[ Parent
| on HN ]
Re:What I learned from my first C coding challenge
by tptacek on Tuesday September 04, 2012 @03:26PM
(#4476106)
A timing attack against URL query strings as processed by a normalizing cache proxy?
Re:What I learned from my first C coding challenge
by masterzora on Tuesday September 04, 2012 @03:34PM
(#4476148)
Quoth the parent: "It does not apply here"
Re:What I learned from my first C coding challenge
by tptacek on Tuesday September 04, 2012 @03:37PM
(#4476165)
Sure. 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.
Re:What I learned from my first C coding challenge
by Xuzz on Tuesday September 04, 2012 @04:08PM
(#4476293)
Unless, of course, you're Nintendo: http://wiibrew.org/wiki/Signing_bug