From e5a0bf22b17d7d6c92d7793bed5d63d0e9e72e4c Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sat, 24 Aug 2024 17:53:44 +0200 Subject: Windows: Exclude Argon2 for System Encryption and from automatic detection Bootloader doesn't support Argon2 yet. We don't want to add overhead to automatic detection for now. --- src/Format/Tcformat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Format') diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c index 658d3797..3134c816 100644 --- a/src/Format/Tcformat.c +++ b/src/Format/Tcformat.c @@ -4195,7 +4195,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa for (hid = FIRST_PRF_ID; hid <= LAST_PRF_ID; hid++) { - if ((!HashIsDeprecated (hid)) && (bSystemIsGPT || HashForSystemEncryption (hid))) + if ((!HashIsDeprecated (hid)) && (bSystemIsGPT || HashForSystemEncryption (hid)) && (hid != ARGON2)) // We don't support Argon2 for system encryption AddComboPair (GetDlgItem (hwndDlg, IDC_COMBO_BOX_HASH_ALGO), HashGetName(hid), hid); } } @@ -5988,7 +5988,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa { HWND hHashAlgoItem = GetDlgItem (hwndDlg, IDC_COMBO_BOX_HASH_ALGO); int selectedAlgo = (int) SendMessage (hHashAlgoItem, CB_GETITEMDATA, SendMessage (hHashAlgoItem, CB_GETCURSEL, 0, 0), 0); - if (!bSystemIsGPT && !HashForSystemEncryption(selectedAlgo)) + if ((!bSystemIsGPT && !HashForSystemEncryption(selectedAlgo)) || (selectedAlgo == ARGON2)) { hash_algo = DEFAULT_HASH_ALGORITHM_BOOT; RandSetHashFunction (DEFAULT_HASH_ALGORITHM_BOOT); -- cgit v1.2.3