1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2026-06-13 08:17:00 -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
+1 -1
View File
@@ -5375,7 +5375,7 @@ namespace VeraCrypt
return status;
}
// Change the PKCS-5 PRF if requested by user
// Change the KDF if requested by user
if (pkcs5 != 0)
{
cryptoInfo->pkcs5 = pkcs5;
+1 -1
View File
@@ -93,7 +93,7 @@ BEGIN
LTEXT "What is hidden volume protection?",IDC_LINK_HIDVOL_PROTECTION_INFO,16,220,279,10,SS_NOTIFY
RTEXT "P&assword to hidden volume:\n(if empty, cache is used)",IDT_HIDDEN_PROT_PASSWD,15,132,115,17,0,WS_EX_RIGHT
GROUPBOX "Hidden Volume Protection",IDT_HIDDEN_VOL_PROTECTION,6,101,299,136
RTEXT "PKCS-5 PRF:",IDT_PKCS5_PRF,15,155,115,17
RTEXT "KDF:",IDT_KDF,15,155,115,17
RTEXT "Volume PIM:",IDT_PIM,15,177,115,17,NOT WS_VISIBLE
LTEXT "Volume Label in Windows:",IDT_VOLUME_LABEL,12,85,115,8
CONTROL "Only create virtual device without mounting on selected drive letter",IDC_DISABLE_MOUNT_MANAGER,
+2 -2
View File
@@ -6507,7 +6507,7 @@ static BOOL PerformBenchmark(HWND hBenchDlg, HWND hwndDlg)
}
}
}
StringCbPrintfW (benchmarkTable[benchmarkTotalItems].name, sizeof(benchmarkTable[benchmarkTotalItems].name),L"%s", get_pkcs5_prf_name (thid));
StringCbPrintfW (benchmarkTable[benchmarkTotalItems].name, sizeof(benchmarkTable[benchmarkTotalItems].name),L"%s", get_kdf_name (thid));
benchmarkTotalItems++;
}
@@ -6687,7 +6687,7 @@ BOOL CALLBACK BenchmarkDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
nIndex = SendMessageW (hCboxList, CB_ADDSTRING, 0, (LPARAM) GetString ("ENCRYPTION_ALGORITHM"));
SendMessage (hCboxList, CB_SETITEMDATA, nIndex, (LPARAM) 0);
nIndex = SendMessageW (hCboxList, CB_ADDSTRING, 0, (LPARAM) GetString ("PKCS5_PRF"));
nIndex = SendMessageW (hCboxList, CB_ADDSTRING, 0, (LPARAM) GetString ("KDF"));
SendMessage (hCboxList, CB_SETITEMDATA, nIndex, (LPARAM) 0);
nIndex = SendMessageW (hCboxList, CB_ADDSTRING, 0, (LPARAM) GetString ("IDT_HASH_ALGO"));
+4 -3
View File
@@ -291,8 +291,8 @@
<entry lang="en" key="IDT_NEW_PASSWORD">Password:</entry>
<entry lang="en" key="IDT_PARALLELIZATION_OPTIONS">Thread-Based Parallelization</entry>
<entry lang="en" key="IDT_PKCS11_LIB_PATH">PKCS #11 Library Path</entry>
<entry lang="en" key="IDT_PKCS5_PRF">PKCS-5 PRF:</entry>
<entry lang="en" key="IDT_NEW_PKCS5_PRF">PKCS-5 PRF:</entry>
<entry lang="en" key="IDT_KDF">KDF:</entry>
<entry lang="en" key="IDT_NEW_KDF">KDF:</entry>
<entry lang="en" key="IDT_PW_CACHE_OPTIONS">Password Cache</entry>
<entry lang="en" key="IDT_SECURITY_OPTIONS">Security Options</entry>
<entry lang="en" key="IDT_EMV_OPTIONS">EMV Options</entry>
@@ -813,7 +813,7 @@
<entry lang="en" key="SECONDARY_KEY_SIZE_LRW">Tweak Key Size (LRW Mode)</entry>
<entry lang="en" key="BITS">bits</entry>
<entry lang="en" key="BLOCK_SIZE">Block Size</entry>
<entry lang="en" key="PKCS5_PRF">PKCS-5 PRF</entry>
<entry lang="en" key="KDF">KDF</entry>
<entry lang="en" key="PKCS5_ITERATIONS">PKCS-5 Iteration Count</entry>
<entry lang="en" key="VOLUME_CREATE_DATE">Volume Created</entry>
<entry lang="en" key="VOLUME_HEADER_DATE">Header Last Modified</entry>
@@ -1647,6 +1647,7 @@
<entry lang="en" key="IDC_DISABLE_SCREEN_PROTECTION">Disable protection against screenshots and screen recording</entry>
<entry lang="en" key="DISABLE_SCREEN_PROTECTION_WARNING">WARNING: Disabling screen protection significantly reduces security. Enable this option ONLY if you have a specific need to capture VeraCrypt's interface. This may expose sensitive data to screenshot tools and screen recording features such as Windows 11 Recall.</entry>
<entry lang="en" key="MEMORY_COST">Memory Cost</entry>
<entry lang="en" key="IDT_KDF_ALGO">KDF Algorithm</entry>
</localization>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="VeraCrypt">
+1 -1
View File
@@ -400,7 +400,7 @@ int ChangePwd (const wchar_t *lpszVolume, Password *oldPassword, int old_pkcs5,
goto error;
}
// Change the PKCS-5 PRF if requested by user
// Change the KDF if requested by user
if (pkcs5 != 0)
cryptoInfo->pkcs5 = pkcs5;
+8 -8
View File
@@ -1235,24 +1235,24 @@ cancelled:
burn (key, sizeof(key));
}
wchar_t *get_pkcs5_prf_name (int pkcs5_prf_id)
wchar_t *get_kdf_name (int kdf_id)
{
switch (pkcs5_prf_id)
switch (kdf_id)
{
case SHA512:
return L"HMAC-SHA-512";
return L"SHA512-PBKDF2";
case SHA256:
return L"HMAC-SHA-256";
return L"SHA256-PBKDF2";
case BLAKE2S:
return L"HMAC-BLAKE2s-256";
return L"BLAKE2S-PBKDF2";
case WHIRLPOOL:
return L"HMAC-Whirlpool";
return L"Whirlpool-PBKDF2";
case STREEBOG:
return L"HMAC-STREEBOG";
return L"STREEBOG-PBKDF2";
case ARGON2:
return L"Argon2";
@@ -1335,7 +1335,7 @@ void derive_key_argon2(const unsigned char *pwd, int pwd_len, const unsigned cha
#if defined (DEVICE_DRIVER) && !defined(_M_ARM64)
NTSTATUS saveStatus = STATUS_INVALID_PARAMETER;
XSTATE_SAVE SaveState;
if (IsCpuIntel() && HasSAVX())
if (HasSAVX2())
saveStatus = KeSaveExtendedProcessorState(XSTATE_MASK_GSSE, &SaveState);
#endif
if (0 != argon2id_hash_raw(
+1 -1
View File
@@ -42,7 +42,7 @@ void hmac_streebog (unsigned char *k, int lk, unsigned char *d, int ld);
void derive_key_streebog (const unsigned char *pwd, int pwd_len, const unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen, long volatile *pAbortKeyDerivation);
int get_pkcs5_iteration_count (int pkcs5_prf_id, int pim, BOOL bBoot, int* pMemoryCost);
wchar_t *get_pkcs5_prf_name (int pkcs5_prf_id);
wchar_t *get_kdf_name (int kdf_id);
void derive_key_argon2(const unsigned char *pwd, int pwd_len, const unsigned char *salt, int salt_len, uint32 iterations, uint32 memcost, unsigned char *dk, int dklen, long volatile *pAbortKeyDerivation);
void get_argon2_params(int pim, int* pIterations, int* pMemcost);
+1 -1
View File
@@ -202,7 +202,7 @@
#define IDT_STATIC_MODAL_WAIT_DLG_INFO 5125
#define IDC_WAIT_PROGRESS_BAR 5126
#define IDC_PKCS5_PRF_ID 5127
#define IDT_PKCS5_PRF 5128
#define IDT_KDF 5128
#define IDT_PIM 5129
#define IDC_PIM 5130
#define IDC_PIM_HELP 5131