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

Avoid cloning plaintext on AES encrypt #3

Closed
ernieturner opened this issue Feb 14, 2019 · 1 comment · Fixed by #246
Closed

Avoid cloning plaintext on AES encrypt #3

ernieturner opened this issue Feb 14, 2019 · 1 comment · Fixed by #246
Assignees

Comments

@ernieturner
Copy link
Contributor

In our AES encrypt method in crypto/aes.rs, we're cloning the provided plaintext vector so we can resize it to add 16 bytes to it to support adding on the GCM auth tag. As people could be encrypting large large documents with the SDK, doing a clone is bad. We need to figure out a way to avoid it.

It would also be nice to see if we can have the various AES methods take slices instead of vecs as some inputs to encrypt have to be copied to get them into vectors. See this code review comment

@ernieturner
Copy link
Contributor Author

Look into changing interface to take ownership of a Vector, resize it, and then return it.

@ernieturner ernieturner changed the title Figure out how to avoid cloning plaintext on AES encrypt Avoid cloning plaintext on AES encrypt May 6, 2019
@ernieturner ernieturner transferred this issue from another repository May 6, 2019
@giarc3 giarc3 self-assigned this Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants