Hi,

I see that the stitched AES-NI AES-GCM code will be used if :

    gctx->ctr==aesni_ctr32_encrypt_blocks && \
    gctx->gcm.ghash==gcm_ghash_avx)

In gcm128, I see that it decides to use gcm_ghash_avx if:

    /* AVX+MOVBE */
    if (((OPENSSL_ia32cap_P[1] >> 22) & 0x41) == 0x41) {

But, I think the stitched AES-NI AES-GCM code requires AVX2, not just
AVX. So, I think that to condition to execute the stitched code should
be changed to also test the AVX2 flag.

Maybe in practice there are no processors that have AVX and MOVBE but
which don't have AVX2. But, better safe than sorry.

Cheers,
Brian
-- 
https://briansmith.org/
-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

Reply via email to