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

fix(block-ciphers): cbc: use array offsets #5

Merged
merged 2 commits into from
Sep 29, 2023
Merged

fix(block-ciphers): cbc: use array offsets #5

merged 2 commits into from
Sep 29, 2023

Conversation

nkeor
Copy link
Contributor

@nkeor nkeor commented Sep 29, 2023

For example, if decrypting a Uint8Array created with an offset, decrypt() would skip that offset and read the entire underlying buffer, even if not all data is encrypted.

I'm unsure whether this means a breaking change.

For example, if decrypting a Uint8Array created with an offset
decrypt() would skip that offset and read the entire underlying buffer,
even if not all data is encrypted.
@codecov
Copy link

codecov bot commented Sep 29, 2023

Welcome to Codecov 🎉

Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.

Thanks for integrating Codecov - We've got you covered ☂️

@aykxt
Copy link
Owner

aykxt commented Sep 29, 2023

Hi, thanks for the contribution! Would you mind adding the array offsets to other block modes as well?

@nkeor
Copy link
Contributor Author

nkeor commented Sep 29, 2023

The only other one I found was in cfb's encrypt().

All the others use data.slice(), which already uses the correct offsets. The issue is when creating a new DataView from the underlying data.buffer

@aykxt aykxt merged commit 7486524 into aykxt:main Sep 29, 2023
5 checks passed
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