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

Merged
merged 1 commit into from
Mar 7, 2025

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

@twiss twiss requested a review from BenWiederhake October 28, 2024 09:00
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!

@twiss twiss requested a review from nmahendru December 5, 2024 10:44
@BenWiederhake
Copy link
Collaborator

Any updates on this?

@twiss twiss requested a review from annevk January 23, 2025 11:48
If the ciphertext is not a positive multiple of 16 bytes, return an
OperationError.
@twiss twiss force-pushed the aes-cbc-handle-odd-length branch from d2b4d2b to 52eed0f Compare March 7, 2025 16:45
@twiss
Copy link
Member Author

twiss commented Mar 7, 2025

I'll merge this despite the absence of feedback from WebKit because Chromium and Mozilla already behave as specified by this change, and the current behavior of WebKit (returning an empty ArrayBuffer) seems nonsensical.

@nmahendru or @annevk let me know if you have any objections.

And @BenWiederhake thanks for your patience!

@twiss twiss merged commit 43f2f62 into main Mar 7, 2025
2 checks passed
github-actions bot added a commit that referenced this pull request Mar 7, 2025
SHA: 43f2f62
Reason: push, by twiss

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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