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

Throw in AES-CBC decrypt operation for odd ciphertext lengths #382

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

twiss
Copy link
Member

@twiss twiss commented Oct 28, 2024

If the ciphertext is not a positive multiple of 16 bytes, return an OperationError.

Fixes #381.

Most implementations already return an OperationError in this case, except Safari, which currently returns an empty ArrayBuffer for the test case in #381. @nmahendru let me know if this change seems reasonable to you.


Preview | Diff

If the ciphertext is not a positive multiple of 16 bytes, return an
OperationError.
Copy link
Collaborator

@BenWiederhake BenWiederhake left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!

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.

AES-CBC decrypt: Unspecified error type for ciphertext of odd length
2 participants