Skip to content

Conversation

@denovosoftware
Copy link
Contributor

There is an issue in GCM code that results in incorrect auth tag being generated whenever processing TBytes array with length longer from actual data size. Discoverable when trying to encode large stream in 'chunked' mode, but decrypting as a whole stream or vice versa.

…tream as DoTestEncodeStream_TestSingleSet. Move data set related knowledge into DoTestEncodeStream_LoadAndTestCAVSData, which will then test each set using DoTestEncodeStream_TestSingleSet. DoTestEncodeStream_TestSingleSet now allows to optionally use data chunking instead of processing whole stream at once. Also addressed issue where failed test would mislabeled printed data in error message.
…unked approach is functional and produces same result as whole stream approach. Test is currently failing due to a bug in GCM encryption logic, which results in incorrect tag generated for whole stream approach when stream size is larger then StreamBufferSize.
@denovosoftware
Copy link
Contributor Author

This PR should apply cleanly to development branch, but please let me know if you want a PR based on dev branch.

Just a note that contribution guidelines are different between default branch and development branch, and thus new ones are not easily discoverable without some hints.

@MHumm MHumm added the bug label Dec 29, 2022
@MHumm
Copy link
Owner

MHumm commented Dec 29, 2022

Applied pull request #51

@MHumm MHumm merged commit 83416bf into MHumm:master Dec 29, 2022
MHumm added a commit that referenced this pull request Dec 29, 2022
Fixed auth tag generation for large data as proposed by pull request #51
@MHumm MHumm added the fixed bug got fixed by changing source code label Dec 29, 2022
@MHumm
Copy link
Owner

MHumm commented Dec 29, 2022

Fixed now. Next time please provide pull requests for development branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fixed bug got fixed by changing source code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants