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

PBKDF2 allows zero length and returns and empty string #49045

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

This CL adapts our implementation to the spec change described in the
PR#380 [1]. Instead of trowing an OperationError exception, we allow now
zero as value for the 'length' parameter.

Given that the deriveBits operation must result in an empty string, this
change early returns to avoid the unnecessary computation of the bits
derivation.

The specific WTP defined for this case are modified in this CL as well,
so no additional test cases are needed.

[1] w3c/webcrypto#380

Bug: 376493194
Change-Id: If685c349a0a9d134a8e8f7c902e8aac342945226
Reviewed-on: https://chromium-review.googlesource.com/5979996
WPT-Export-Revision: 432189205babf9b8d0e448a8f48c448428694cf9

This CL adapts our implementation to the spec change described in the
PR#380 [1]. Instead of trowing an OperationError exception, we allow now
zero as value for the 'length' parameter.

Given that the deriveBits operation must result in an empty string, this
change early returns to avoid the unnecessary computation of the bits
derivation.

The specific WTP defined for this case are modified in this CL as well,
so no additional test cases are needed.

[1] w3c/webcrypto#380

Bug: 376493194
Change-Id: If685c349a0a9d134a8e8f7c902e8aac342945226
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants