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

No memory allocation for each C_DecryptUpdate. #643

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

Conversation

larssilven
Copy link
Contributor

Before this change the allocated memory was growing after each
C_DecryptUpdate.
If a large amount of data is decrypted then the memory runs out ...

@larssilven
Copy link
Contributor Author

The 'currentAEADBuffer' that is growing for each update is just used for the GCM decryption. So my easy fix is just to not update this buffer when another cipher mode but GCM is used.
This is of course not fixing the problem for the GCM that also has to be fixed.
Maybe it would be better if each cipher mode should have its own class instead of using this 'mode' variable.

Before this change the allocated memory was growing after each
C_DecryptUpdate.
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.

1 participant