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

Use cryptography.hazmat.primitives.constant_time.bytes_eq instead of allmydata.util.hashutil.timing_safe_compare. #336

Closed
tomprince opened this issue May 20, 2021 · 1 comment · Fixed by #393
Labels
enhancement New feature or request Nice To Have A feature that is not required but may be desirable

Comments

@tomprince
Copy link
Contributor

The later looks slightly more complex, but should have the same observable behaviour. The main motivation is removing a dependency on allmydata.

The one use is in magic_folder.web._is_authorized.

@meejah
Copy link
Collaborator

meejah commented May 20, 2021

+1 sounds fine. Low-priority.

(Honestly, I think I'd rather not use the secret directly but instead use it as the key for an HMAC or similar so that we don't leak the secret itself in headers .. but also I Am Not A Cryptographer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Nice To Have A feature that is not required but may be desirable
Projects
None yet
2 participants