RFR: 8371864: GaloisCounterMode.implGCMCrypt0 AVX512/AVX2 intrinsics stubs cause AES-GCM encryption failure for certain payload sizes

Tobias Hartmann thartmann at openjdk.org
Tue Nov 18 06:20:15 UTC 2025


On Mon, 17 Nov 2025 22:34:14 GMT, Jiangli Zhou <jiangli at openjdk.org> wrote:

> Please review the fix in StubGenerator::aesgcm_avx512 and StubGenerator::aesgcm_avx2 to handle some edge cases with input sizes that are not multiple of the block size. 
> 
> Thanks to Thomas Holenstein and Lukas Zobernig for analyzing the issue and providing the test case!

test/jdk/com/sun/crypto/provider/Cipher/AES/TestAesGcmIntrinsic.java line 41:

> 39: public class TestAesGcmIntrinsic {
> 40: 
> 41:   static final SecureRandom SECURE_RANDOM = newDefaultSecureRandom();

Drive-by comment: Java code should use 4x whitespace indentation.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28363#discussion_r2536463222


More information about the security-dev mailing list