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 subtle for constant-time compare #247

Open
cjpatton opened this issue Mar 15, 2023 · 1 comment
Open

Use subtle for constant-time compare #247

cjpatton opened this issue Mar 15, 2023 · 1 comment
Labels
good first issue Good for newcomers

Comments

@cjpatton
Copy link
Contributor

cjpatton commented Mar 15, 2023

When validating a bearer token we use a constant-time comparison algorithm in order to avoid leaking bits of the bearer token via a side channel: https://github.com/cloudflare/daphne/blob/main/daphne/src/messages/mod.rs#L1184

We should replace this with the implementation in the subtle crate, since the code is delicate and easy to get wrong.

@cjpatton
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant