This patch series imports the Argon2 code and tests from libgcrypt and
adds Argon2 support to LUKS2.
- Patch 1~3 import kdf.c from libgcrypt and extract the Argon2 related
functions. The _gcry_kdf_* functions are also imported to make it
easier to support other KDF functions when necessary.
- Patch 4 introduces grub_crypto_argon2().
- Patch 5 and 6 integrates the Argon2 tests from libgcrypt into
functional_test.
- Patch 7 leverages grub_crypto_argon2() to add Argon2 support to LUKS2.
- Patch 8 changes the default KDF of the LUKS2 test to Argon2id.
- Patch 9 documents argon2 and argon2_test modules.
v2:
- Import Argon2 code differently to improve maintainability
* Updating import_gcry.py to import Argon2 and _gcry_kdf_* functions
from kdf.c instead of extracting the code manually
* Implementing grub_crypto_argon2() with the _gcry_kdf_* functions to
avoid the GCRY flags when building argon2.c
* Building argon2.c inside libgrubkernel.a since the GCRY flags are not
needed anymore
Gary Lin (9):
util/import_gcry: Import kdf.c for Argon2
crypto: Update crypto.h for libgcrypt KDF functions
kdf: Resovle the build errors
argon2: Introduce grub_crypto_argon2()
Import Argon2 tests from libgcrypt
Integrate Argon2 tests into functional_test
disk/luks2: Add Argon2 support
tests/util/grub-fs-tester: Use Argon2id for LUKS2 test
docs: Document argon2 and argon2_test
Makefile.util.def | 19 +-
conf/Makefile.extra-dist | 1 +
docs/grub.texi | 11 +
grub-core/Makefile.core.def | 10 +
grub-core/disk/luks2.c | 38 ++-
grub-core/lib/argon2.c | 52 ++++
.../libgcrypt-patches/09_kdf_build_fix.patch | 230 ++++++++++++++++++
grub-core/tests/argon2_test.c | 139 +++++++++++
grub-core/tests/lib/functional_test.c | 1 +
include/grub/crypto.h | 49 ++++
tests/util/grub-fs-tester.in | 10 +-
util/import_gcry.py | 28 ++-
12 files changed, 572 insertions(+), 16 deletions(-)
create mode 100644 grub-core/lib/argon2.c
create mode 100644 grub-core/lib/libgcrypt-patches/09_kdf_build_fix.patch
create mode 100644 grub-core/tests/argon2_test.c
--
2.43.0
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel