You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Incorrect auth tag generated for GCM mode when feeding data using small chunks (at least when sized to cipher's block size). Using such small chunks appear to conform with DEC's documentation.
Add new test case to test chunked stream encoding, which uses existing test data set but feeds data in a smaller chunks (cipher's blocks sized) instead of whole stream at once
procedure TestTDECGCM.TestEncodeStreamChunked;
begin
// Use cipher block size as max chunk size
DoTestEncodeStream_LoadAndTestCAVSData(
Max(FCipherAES.Context.BlockSize, FCipherAES.Context.BufferSize));
end;
Run test GCM suite and get auth tag failure in new test case
Expected and actual behavior
Test should pass, proving that expected auth tag is generated when streaming data in small chunks.