1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2026-06-19 02:56:07 -05:00

Use "KDF" instead of "PKCS5 PRF" for UI selection of KDF to use

This commit is contained in:
Mounir IDRASSI
2025-08-08 22:53:04 +09:00
parent 04648bc5ee
commit 54c39e4eb2
65 changed files with 244 additions and 189 deletions
+2 -2
View File
@@ -105,7 +105,7 @@ BEGIN
COMBOBOX IDC_COMBO_BOX_HASH_ALGO,7,169,95,126,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "",IDC_BOX_HELP,7,40,266,78
GROUPBOX "Encryption Algorithm",IDT_ENCRYPTION_ALGO,0,10,273,131
GROUPBOX "Hash Algorithm",IDT_HASH_ALGO,0,156,273,35
GROUPBOX "KDF Algorithm",IDT_KDF_ALGO,0,156,273,35
LTEXT "More information",IDC_LINK_MORE_INFO_ABOUT_CIPHER,7,124,176,10,SS_NOTIFY
LTEXT "Information on hash algorithms",IDC_LINK_HASH_INFO,121,171,148,8,SS_NOTIFY
END
@@ -236,7 +236,7 @@ BEGIN
PUSHBUTTON "&Keyfiles...",IDC_KEY_FILES,188,54,85,14
LTEXT "",IDC_BOX_HELP,0,74,273,119
RTEXT "Password:",IDT_PASSWORD,0,6,71,8
RTEXT "PKCS-5 PRF:",IDT_PKCS5_PRF,0,19,71,8
RTEXT "KDF:",IDT_KDF,0,19,71,8
RTEXT "Volume PIM:",IDT_PIM,0,35,71,8,NOT WS_VISIBLE
CONTROL "Use P&IM",IDC_PIM_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,75,35,97,10
END
+2 -1
View File
@@ -147,6 +147,7 @@
#define IDC_SKIP_RESCUE_VERIFICATION 1108
#define SPARSE_FILE 1109
#define IDC_FORMAT_TYPE 1110
#define IDT_KDF_ALGO 1111
// Next default values for new objects
//
@@ -155,7 +156,7 @@
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 134
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1111
#define _APS_NEXT_CONTROL_VALUE 1112
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
+5 -3
View File
@@ -4218,7 +4218,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)) && (hid != ARGON2)) // We don't support Argon2 for system encryption
AddComboPair (GetDlgItem (hwndDlg, IDC_COMBO_BOX_HASH_ALGO), HashGetName(hid), hid);
AddComboPair (GetDlgItem (hwndDlg, IDC_COMBO_BOX_HASH_ALGO), get_kdf_name(hid), hid);
}
}
else
@@ -4227,7 +4227,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))
AddComboPair (GetDlgItem (hwndDlg, IDC_COMBO_BOX_HASH_ALGO), HashGetName(hid), hid);
AddComboPair (GetDlgItem (hwndDlg, IDC_COMBO_BOX_HASH_ALGO), get_kdf_name(hid), hid);
}
}
@@ -4355,7 +4355,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
for (i = FIRST_PRF_ID; i <= LAST_PRF_ID; i++)
{
nIndex = (int) SendMessage (hComboBox, CB_ADDSTRING, 0, (LPARAM) get_pkcs5_prf_name(i));
nIndex = (int) SendMessage (hComboBox, CB_ADDSTRING, 0, (LPARAM) get_kdf_name(i));
SendMessage (hComboBox, CB_SETITEMDATA, nIndex, (LPARAM) i);
}
@@ -9312,6 +9312,8 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
CmdVolumePkcs5 = SHA256;
else if ((_wcsicmp(szTmp, L"blake2s") == 0) || (_wcsicmp(szTmp, L"blake2s-256") == 0))
CmdVolumePkcs5 = BLAKE2S;
else if ((_wcsicmp(szTmp, L"argon2") == 0))
CmdVolumePkcs5 = ARGON2;
else
{
/* match using internal hash names */