Hi,

> 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.

This is really useful! I was able to get the decryption time from 17 s to 9 s 
for my case after cherry-picking this patch series onto 
https://lists.gnu.org/archive/html/grub-devel/2025-08/msg00226.html.

I also had to make some small changes to fix some build errors (since your 
patch series seems to be for emu, but I am building for efi 64/my native 
machine) and to include SHA512 optimizations since that's what my partition 
uses. They're at 
https://codeberg.org/ljchiu/grub/src/branch/libgcrypt-1.11.0-argon2-hw-accel-upstream;
 my changes are quite hacky, but I was able to get them to work--hopefully this 
is useful to anyone else who wants to hasten their decryption times 
considerably! I was also considering porting the Rijndael optimizations too, 
but it seems quite nontrivial; nevertheless I'm satisfied with what I have, 
thank you!



_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to