Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HMAC may have timing comparision problem #655

Closed
shashiranjan84 opened this issue Oct 23, 2015 · 0 comments
Closed

HMAC may have timing comparision problem #655

shashiranjan84 opened this issue Oct 23, 2015 · 0 comments
Labels

Comments

@shashiranjan84
Copy link
Contributor

Creating this ticked in reference to tweet
screenshot 2015-10-23 12 51 15

Not sure what exactly Alex meant, most probably he is referring to following line of code, where clock skew test is done twice, once for X-Date and if it fails then for Date header and each time ngx_parse_time is called to get the current time. Ideally ngx_parse_time should be called once and passed as an argument.

" -- validate clock skew
if not (validate_clock_skew(headers, X_DATE, conf.clock_skew) or validate_clock_skew(headers, DATE, conf.clock_skew)) then
responses.send_HTTP_FORBIDDEN("HMAC signature cannot be verified, a valid date or x-date header is required for HMAC Authentication")
end
"

Update: Issue is how digest being compared, solution: http://codahale.com/a-lesson-in-timing-attacks/

@subnetmarco subnetmarco changed the title HMAC may have timming comparision problem HMAC may have timing comparision problem Oct 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants