News for hackers. Stuff that matters.
Re:It's Dangerous, a Python cryptographic signing module by __alexs on Sunday June 10, 2012 @02:44PM (#4091794)
Is == not good enough for you?
Re:It's Dangerous, a Python cryptographic signing module by tptacek on Sunday June 10, 2012 @02:47PM (#4091807)
Sigh.

http://codahale.com/a-lesson-in-timing-attacks/

Preemptively:

* Yes, a realistic attack.

* Yes, very difficult over the Internet.

* Still difficult but not implausible if the attacker can colocate near your app; ie, if you deploy anywhere on EC2.

* Measurement bounds are high nanoseconds LAN, tens of usecs WAN.

* HMAC verification, unlike password hash comparisons, is a place where timing actually does matter.

Not to suggest that I occupy the high road when it comes to snarky comments, but consider whether your snarky comment in this case suggests an unearned (and thus dangerous) level of confidence about crypto app security. This problem (HMAC timing) is so well known that it's generated many hundreds of comments over the years on HN.

Re:It's Dangerous, a Python cryptographic signing module by __alexs on Sunday June 10, 2012 @03:01PM (#4091851)
That's still a lot of code just to import a single 6 line function...
Re:It's Dangerous, a Python cryptographic signing module by tptacek on Sunday June 10, 2012 @03:03PM (#4091860)
The fact that he knew about that function and you (standing in as "representative Python developer") did not seems to justify the library pretty nicely from what I can tell.

But, obviously, this code does more than Python's hmac library does, beyond just knowing how to properly verify the MAC itself.

Re:It's Dangerous, a Python cryptographic signing module by __alexs on Sunday June 10, 2012 @03:38PM (#4091948)
I wasn't criticising the security of this library, I was criticising it's reason to exist in the form that it does.
Re:It's Dangerous, a Python cryptographic signing module by pmylund on Sunday June 10, 2012 @03:57PM (#4092009)
Nice save.