5 ms·
I'm reminded of LUKS Argon2 implementation, which is much slower than userspace. Therefore a sufficiently difficult challenge that may take less than a second i
by radlad 18d ago
I'm reminded of LUKS Argon2 implementation, which is much slower than userspace. Therefore a sufficiently difficult challenge that may take less than a second in userspace Linux can take 20 or more seconds at boot.
- jwilk 18d agoHuh? Are you saying there's an Argon2 implementation in the kernel?
- minimaltom 18d agoIts not in the kernel but in the userspace tool that goes from password to key (the key is handed to the kernel). You can see the implementation here: https://gitlab.com/cryptsetup/cryptsetup/-/blob/main/lib/crypto_backend/argon2_generic.c https://gitlab.com/cryptsetup/cryptsetup/-/blob/main/lib/cry...
- radlad 17d agoI got this wrong yesterday. While LUKS2 and GRUB now support Argon2, I configured LUKS1, which uses PBKDF2-SHA512. In any case, it is GRUB which behaves slowly during boot. While I haven't tested Argon2, I believe it is affected in the same way as PBKDF2.