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

feat(crypto): add subtle.timingSafeEqual() #2503

Merged
merged 2 commits into from
Aug 11, 2022

Conversation

kitsonk
Copy link
Contributor

@kitsonk kitsonk commented Aug 8, 2022

This adds subtle.timingSafeEqual() to std/crypto which is used to compare array buffers in a way that cannot be exploited in timing based attacks.

This is like to be added to WebCrypto at some point in the near future (see: w3c/webcrypto#270) but until that point, we should have it in std. It is required #2303 which I am refactoring as part of the migration of oak commons to std.

It also refactors node/crypto/timingSafeEqual to use this instead of its own implementation (which is very close to this implementation, but supports Node.js's Buffer as well).

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds a good idea to me.

LGTM

@kitsonk kitsonk merged commit 711caea into denoland:main Aug 11, 2022
@kitsonk kitsonk deleted the feat_crypto_tse branch August 11, 2022 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants