Git repo: https://github.com/lcp/grub2/tree/libgcrypt-1.11.0-argon2-hw-accel-upstream
This patchset is based on Vladimir's libgcrypt 1.11.0 patches. With the newer libgcrypt code, it's possible to drop the hardware acceleration code into libgcrypt-grub. I managed to build the sha256 and blake2 modules with the available optimization code for grub-emu, and the result looks promising. For a 20MB LUKS2 block with pbkdf2 (sha256), the original decryption time is 10~11 seconds. With intel shaext, it becomes 3~4 seconds. I also have a tentative implementation for Argon2. With AVX2 support, the decryption time is down from 26 seconds to 20 seconds. Of course, this patchset is not for any production use yet, but I'd like to demostrate the benefit to upgrade libgcryt! Gary Lin (6): tweak autoconf/automake files to detect x86_64 features Copy the x86_64 optimization files libgcrypt-grub: implement _gcry_get_hw_features() Build blake2 and sha256 with x86_64 optimization assembly code libgcrypt-grub: fix a typo in blake2.c libgcrypt-grub: fix missing-prototypes error in sha256-intel-shaext.c autogen.sh | 7 + conf/Makefile.common | 2 + configure.ac | 254 ++++++++++++++++++ .../libgcrypt-patches/08_add_hwfeatures.patch | 51 ++++ .../09_build_x86_64_opt_code.patch | 80 ++++++ .../10_fix_blake2_typo.patch | 28 ++ .../11_fix_build_shaext.patch | 30 +++ include/grub/crypto.h | 4 + 8 files changed, 456 insertions(+) create mode 100644 grub-core/lib/libgcrypt-patches/08_add_hwfeatures.patch create mode 100644 grub-core/lib/libgcrypt-patches/09_build_x86_64_opt_code.patch create mode 100644 grub-core/lib/libgcrypt-patches/10_fix_blake2_typo.patch create mode 100644 grub-core/lib/libgcrypt-patches/11_fix_build_shaext.patch -- 2.43.0 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel