Conversation
Makes HMAC comparison to avoid potential timing attacks.
|
I'm not sure if application code is the right place to fix something like timing attacks. So far it is extremely difficult to run timing attacks against the python VM. While |
Timing attacks are not some mysterious things but a rather simple concept: you can measure how many characters you guessed right by measuring the time it takes for the HTTP call to finish. It is only relevant to code which compares hashes / padding / etc. The gae-session code does a lot of things right (like checking HMAC before decrypting) and with this small change you would eliminate the possibility of exploiting this flaw. |
|
Closing this since I resubmitted it as #47 |
Makes HMAC comparison to avoid potential timing attacks. A timing attack would allow an attacker to "craft" (trough a series of requests) a valid HMAC for any cookie. Here is a good introduction to them: http://codahale.com/a-lesson-in-timing-attacks/
Note: I was unable to exploit the flaw either locally or in a production setup (even tried using a high-quality datacenter network), but that doesn't mean that someone smarter couldn't ✨