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

Investigate potential re-use of EVP_CIPHER_CTX #683

Open
alex-chew opened this issue Jan 6, 2021 · 1 comment
Open

Investigate potential re-use of EVP_CIPHER_CTX #683

alex-chew opened this issue Jan 6, 2021 · 1 comment

Comments

@alex-chew
Copy link
Contributor

The encrypt and decrypt path each appear to initialize an EVP_CIPHER_CTX twice using the same content key, which may represent a redundant AES key schedule. Re-using this context could avoid a redundant key schedule. This would likely require some refactoring of the aws_cryptosdk_session and the encrypt/decrypt paths, as well as the corresponding proofs.

@SalusaSecondus
Copy link
Contributor

To clarify: It looks like we initialized an EVP_CIPHER_CTX structure n+1 times where n is the number of frames. (Once to encrypt/decrypt each frame and once for the header.)

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

No branches or pull requests

2 participants