AVX implementation for PQC

Jussi Kivilinna jussi.kivilinna at iki.fi
Tue Nov 14 18:41:13 CET 2023


On 14.11.2023 17.27, Falko Strenzke wrote:
> In the course of our project for the integration of PQC into libgcrypt we also plan to provide an AVX2 implementation. As our implementation is generally based on the reference implementation, the AVX2 implementation would also closely follow the one provided in the reference implementation of the respective scheme, i.e. using immintrin.h. We plan, however, to create a more unified implementation in that we will keep common higher level functions with compile-time switches and for the lower level functions that are completely different for AVX2, we would create separate files.

So, if I understood right, higher level functions be compiled both without and with AVX2 using, for example, AVX2_ENABLED macro defined from Makefile. AVX2 implementation would be then selected run-time based on HWF flags and AVX2 would be compiled only if configure.ac detected that compiler supports "immintrin.h" intrinsics.

> Please let me know if that approach sounds suitable for libcrypt and if you have any comments.

Sounds good to me.


More information about the Gcrypt-devel mailing list