diff --git a/src/Common/Crypto.c b/src/Common/Crypto.c index ca4d16f8..6b497bc9 100644 --- a/src/Common/Crypto.c +++ b/src/Common/Crypto.c @@ -133,7 +133,7 @@ static Hash Hashes[] = { BLAKE2S, L"BLAKE2s-256", FALSE, TRUE }, { WHIRLPOOL, L"Whirlpool", FALSE, FALSE }, { STREEBOG, L"Streebog", FALSE, FALSE }, - { ARGON2, L"Argon2", FALSE, FALSE }, + { ARGON2, L"BLAKE2b-512", FALSE, FALSE }, #endif { 0, 0, 0 } }; @@ -780,7 +780,7 @@ BOOL HashForSystemEncryption (int hashId) BOOL HashIsAvailable (int hashId) { - return (hashId != ARGON2) && (HashGet(hashId) != 0); // Argon2 is not a hash function + return (HashGet(hashId) != 0); } // Returns the largest key size needed by an EA for the specified mode of operation diff --git a/src/Common/Crypto.h b/src/Common/Crypto.h index 9686e557..2905d405 100644 --- a/src/Common/Crypto.h +++ b/src/Common/Crypto.h @@ -200,11 +200,12 @@ typedef struct #endif #include "Twofish.h" -#include "blake2.h" +#include "blake2s.h" #ifndef TC_WINDOWS_BOOT # include "Sha2.h" # include "Whirlpool.h" # include "argon2.h" +# include "blake2b.h" # include "Streebog.h" # include "kuznyechik.h" # include "Camellia.h" diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index 264d50c8..5691fa43 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -6343,10 +6343,11 @@ static BOOL PerformBenchmark(HWND hBenchDlg, HWND hwndDlg) { BYTE digest [MAX_DIGESTSIZE]; #ifndef WOLFCRYPT_BACKEND - WHIRLPOOL_CTX wctx; + WHIRLPOOL_CTX wctx; STREEBOG_CTX stctx; - blake2s_state bctx; - #endif + blake2s_state bctx; + blake2b_state b2ctx; + #endif sha512_ctx s2ctx; sha256_ctx s256ctx; @@ -6354,9 +6355,6 @@ static BOOL PerformBenchmark(HWND hBenchDlg, HWND hwndDlg) for (hid = FIRST_PRF_ID; hid <= LAST_PRF_ID; hid++) { - // Skip Argon2 since it is not a hash function - if (hid == ARGON2) - continue; if (QueryPerformanceCounter (&performanceCountStart) == 0) goto counter_error; @@ -6394,6 +6392,12 @@ static BOOL PerformBenchmark(HWND hBenchDlg, HWND hwndDlg) STREEBOG_add(&stctx, lpTestBuffer, benchmarkBufferSize); STREEBOG_finalize(&stctx, (unsigned char *)digest); break; + case ARGON2: + // For Argon2, we measure speed of the underlying blake2b hash function + blake2b_init(&b2ctx, BLAKE2B_OUTBYTES); + blake2b_update(&b2ctx, lpTestBuffer, benchmarkBufferSize); + blake2b_final(&b2ctx, digest, BLAKE2B_OUTBYTES); + break; } #endif diff --git a/src/Common/Pkcs5.c b/src/Common/Pkcs5.c index 51391574..52e1b44a 100644 --- a/src/Common/Pkcs5.c +++ b/src/Common/Pkcs5.c @@ -16,7 +16,7 @@ #include #include #endif -#include "blake2.h" +#include "blake2s.h" #ifndef TC_WINDOWS_BOOT #include "Sha2.h" #include "Whirlpool.h" diff --git a/src/Common/Random.c b/src/Common/Random.c index 681e213f..cadce0c0 100644 --- a/src/Common/Random.c +++ b/src/Common/Random.c @@ -258,8 +258,9 @@ BOOL Randmix () { unsigned char hashOutputBuffer [MAX_DIGESTSIZE]; #ifndef WOLFCRYPT_BACKEND - WHIRLPOOL_CTX wctx; - blake2s_state bctx; + WHIRLPOOL_CTX wctx; + blake2s_state bctx; + blake2b_state b2ctx; STREEBOG_CTX stctx; #endif sha512_ctx sctx; @@ -314,9 +315,8 @@ BOOL Randmix () sha256_end (hashOutputBuffer, &s256ctx); break; - #ifndef WOLFCRYPT_BACKEND - case BLAKE2S: - case ARGON2: // in case of Argon2, we use Blake2s +#ifndef WOLFCRYPT_BACKEND + case BLAKE2S: blake2s_init(&bctx); blake2s_update(&bctx, pRandPool, RNG_POOL_SIZE); blake2s_final(&bctx, hashOutputBuffer); @@ -333,7 +333,14 @@ BOOL Randmix () STREEBOG_add (&stctx, pRandPool, RNG_POOL_SIZE); STREEBOG_finalize (&stctx, hashOutputBuffer); break; - #endif + + case ARGON2: + // For Argon2, we use the underlying Blake2b hash function + blake2b_init(&b2ctx, BLAKE2B_OUTBYTES); + blake2b_update(&b2ctx, pRandPool, RNG_POOL_SIZE); + blake2b_final(&b2ctx, hashOutputBuffer, BLAKE2B_OUTBYTES); + break; +#endif default: // Unknown/wrong ID TC_THROW_FATAL_EXCEPTION; diff --git a/src/Crypto/Argon2/src/blake2/blake2b.c b/src/Crypto/Argon2/src/blake2/blake2b.c index 00133d1b..13f8eac5 100644 --- a/src/Crypto/Argon2/src/blake2/blake2b.c +++ b/src/Crypto/Argon2/src/blake2/blake2b.c @@ -18,7 +18,7 @@ #include "Crypto/config.h" #include "Crypto/cpu.h" #include "Crypto/misc.h" -#include "blake2.h" +#include "blake2b.h" #include "blake2-impl.h" static const uint64_t blake2b_IV[8] = { diff --git a/src/Crypto/Argon2/src/blake2/blake2.h b/src/Crypto/Argon2/src/blake2/blake2b.h similarity index 95% rename from src/Crypto/Argon2/src/blake2/blake2.h rename to src/Crypto/Argon2/src/blake2/blake2b.h index 501c6a31..d2044f15 100644 --- a/src/Crypto/Argon2/src/blake2/blake2.h +++ b/src/Crypto/Argon2/src/blake2/blake2b.h @@ -61,9 +61,9 @@ typedef struct __blake2b_state { /* Ensure param structs have not been wrongly padded */ /* Poor man's static_assert */ enum { - blake2_size_check_0 = 1 / !!(CHAR_BIT == 8), + blake2_size_check_0 = 1 / (!!(CHAR_BIT == 8) ? 1 : 0), blake2_size_check_2 = - 1 / !!(sizeof(blake2b_param) == sizeof(uint64_t) * CHAR_BIT) + 1 / (!!(sizeof(blake2b_param) == sizeof(uint64_t) * CHAR_BIT) ? 1 : 0) }; /* Streaming API */ diff --git a/src/Crypto/Argon2/src/blake2/blamka-round-ref.h b/src/Crypto/Argon2/src/blake2/blamka-round-ref.h index 16cfc1c7..99cf1d9f 100644 --- a/src/Crypto/Argon2/src/blake2/blamka-round-ref.h +++ b/src/Crypto/Argon2/src/blake2/blamka-round-ref.h @@ -18,7 +18,7 @@ #ifndef BLAKE_ROUND_MKA_H #define BLAKE_ROUND_MKA_H -#include "blake2.h" +#include "blake2b.h" #include "blake2-impl.h" /* designed by the Lyra PHC team */ diff --git a/src/Crypto/Argon2/src/core.c b/src/Crypto/Argon2/src/core.c index 1e67cce6..3e72c75c 100644 --- a/src/Crypto/Argon2/src/core.c +++ b/src/Crypto/Argon2/src/core.c @@ -26,7 +26,7 @@ #endif #include "Crypto/cpu.h" #include "Crypto/misc.h" -#include "blake2/blake2.h" +#include "blake2/blake2b.h" #include "blake2/blake2-impl.h" #define secure_wipe_memory(v, n) burn((v), (n)) diff --git a/src/Crypto/Argon2/src/opt_avx2.c b/src/Crypto/Argon2/src/opt_avx2.c index f9436d3b..574d8bee 100644 --- a/src/Crypto/Argon2/src/opt_avx2.c +++ b/src/Crypto/Argon2/src/opt_avx2.c @@ -26,7 +26,7 @@ #if defined(__AVX2__) -#include "blake2/blake2.h" +#include "blake2/blake2b.h" #include "blake2/blamka-round-opt.h" /* diff --git a/src/Crypto/Argon2/src/opt_sse2.c b/src/Crypto/Argon2/src/opt_sse2.c index 8b421351..ec795409 100644 --- a/src/Crypto/Argon2/src/opt_sse2.c +++ b/src/Crypto/Argon2/src/opt_sse2.c @@ -25,7 +25,7 @@ #if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE -#include "blake2/blake2.h" +#include "blake2/blake2b.h" #include "blake2/blamka-round-opt.h" /* diff --git a/src/Crypto/Argon2/src/ref.c b/src/Crypto/Argon2/src/ref.c index 097dcd0c..3043f154 100644 --- a/src/Crypto/Argon2/src/ref.c +++ b/src/Crypto/Argon2/src/ref.c @@ -22,7 +22,7 @@ #include "blake2/blamka-round-ref.h" #include "blake2/blake2-impl.h" -#include "blake2/blake2.h" +#include "blake2/blake2b.h" #include "Crypto/config.h" #include "Crypto/cpu.h" diff --git a/src/Crypto/Crypto.vcxproj b/src/Crypto/Crypto.vcxproj index 209dee87..c6578d30 100644 --- a/src/Crypto/Crypto.vcxproj +++ b/src/Crypto/Crypto.vcxproj @@ -85,7 +85,7 @@ Disabled - $(ProjectDir)\..;$(ProjectDir)\..\Common;$(ProjectDir)\Argon2\include;$(ProjectDir)\Argon2\src;%(AdditionalIncludeDirectories) + $(ProjectDir)\..;$(ProjectDir)\..\Common;$(ProjectDir)\Argon2\include;$(ProjectDir)\Argon2\src;$(ProjectDir)\Argon2\src\blake2;%(AdditionalIncludeDirectories) WIN32;ARGON2_NO_THREADS;DEBUG;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) true Default @@ -105,7 +105,7 @@ Disabled - $(ProjectDir)\..;$(ProjectDir)\..\Common;$(ProjectDir)\Argon2\include;$(ProjectDir)\Argon2\src;%(AdditionalIncludeDirectories) + $(ProjectDir)\..;$(ProjectDir)\..\Common;$(ProjectDir)\Argon2\include;$(ProjectDir)\Argon2\src;$(ProjectDir)\Argon2\src\blake2;%(AdditionalIncludeDirectories) WIN32;ARGON2_NO_THREADS;DEBUG;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) true Default @@ -127,7 +127,7 @@ MaxSpeed - $(ProjectDir)\..;$(ProjectDir)\..\Common;$(ProjectDir)\Argon2\include;$(ProjectDir)\Argon2\src;%(AdditionalIncludeDirectories) + $(ProjectDir)\..;$(ProjectDir)\..\Common;$(ProjectDir)\Argon2\include;$(ProjectDir)\Argon2\src;$(ProjectDir)\Argon2\src\blake2;%(AdditionalIncludeDirectories) WIN32;ARGON2_NO_THREADS;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) MultiThreaded true @@ -149,7 +149,7 @@ MaxSpeed - $(ProjectDir)\..;$(ProjectDir)\..\Common;$(ProjectDir)\Argon2\include;$(ProjectDir)\Argon2\src;%(AdditionalIncludeDirectories) + $(ProjectDir)\..;$(ProjectDir)\..\Common;$(ProjectDir)\Argon2\include;$(ProjectDir)\Argon2\src;$(ProjectDir)\Argon2\src\blake2;%(AdditionalIncludeDirectories) WIN32;ARGON2_NO_THREADS;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) MultiThreaded true diff --git a/src/Crypto/blake2s-ref.c b/src/Crypto/blake2s-ref.c index 435630b9..ab51356c 100644 --- a/src/Crypto/blake2s-ref.c +++ b/src/Crypto/blake2s-ref.c @@ -18,7 +18,7 @@ #include #include -#include "blake2.h" +#include "blake2s.h" #pragma optimize ("tl", on) diff --git a/src/Crypto/blake2s.c b/src/Crypto/blake2s.c index 9850cae1..371ce6a2 100644 --- a/src/Crypto/blake2s.c +++ b/src/Crypto/blake2s.c @@ -15,7 +15,7 @@ /* Adapted for VeraCrypt */ -#include "blake2.h" +#include "blake2s.h" #include "Common/Endian.h" #include "Crypto/config.h" #include "Crypto/cpu.h" diff --git a/src/Crypto/blake2.h b/src/Crypto/blake2s.h similarity index 100% rename from src/Crypto/blake2.h rename to src/Crypto/blake2s.h diff --git a/src/Crypto/blake2s_SSE2.c b/src/Crypto/blake2s_SSE2.c index 41ea0a6c..ce096a2c 100644 --- a/src/Crypto/blake2s_SSE2.c +++ b/src/Crypto/blake2s_SSE2.c @@ -15,7 +15,7 @@ /* Adapted for VeraCrypt */ -#include "blake2.h" +#include "blake2s.h" #include "Common/Endian.h" #include "Crypto/config.h" #include "Crypto/cpu.h" diff --git a/src/Crypto/blake2s_SSE41.c b/src/Crypto/blake2s_SSE41.c index 99e394c1..985fba7f 100644 --- a/src/Crypto/blake2s_SSE41.c +++ b/src/Crypto/blake2s_SSE41.c @@ -15,7 +15,7 @@ /* Adapted for VeraCrypt */ -#include "blake2.h" +#include "blake2s.h" #include "Common/Endian.h" #include "Crypto/config.h" #include "Crypto/cpu.h" diff --git a/src/Crypto/blake2s_SSSE3.c b/src/Crypto/blake2s_SSSE3.c index 4f3252c3..6386a50b 100644 --- a/src/Crypto/blake2s_SSSE3.c +++ b/src/Crypto/blake2s_SSSE3.c @@ -15,7 +15,7 @@ /* Adapted for VeraCrypt */ -#include "blake2.h" +#include "blake2s.h" #include "Common/Endian.h" #include "Crypto/config.h" #include "Crypto/cpu.h" diff --git a/src/Driver/Driver.vcxproj b/src/Driver/Driver.vcxproj index ff1c93fd..4e3c6baf 100644 --- a/src/Driver/Driver.vcxproj +++ b/src/Driver/Driver.vcxproj @@ -101,7 +101,7 @@ sha256 - $(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir)Crypto\Argon2\include;$(SolutionDir);%(AdditionalIncludeDirectories);$(IntDir) + $(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir)Crypto\Argon2\src\blake2;$(SolutionDir)Crypto\Argon2\include;$(SolutionDir);%(AdditionalIncludeDirectories);$(IntDir) TC_WINDOWS_DRIVER;ARGON2_NO_THREADS;_NO_CRT_STDIO_INLINE;UNICODE;_UNICODE;DEBUG;_DEBUG;%(PreprocessorDefinitions) true @@ -129,7 +129,7 @@ copy $(OutDir)veracrypt.inf "$(SolutionDir)Debug\Setup Files\veracrypt.inf"sha256 - $(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir)Crypto\Argon2\include;$(SolutionDir);%(AdditionalIncludeDirectories);$(IntDir) + $(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir)Crypto\Argon2\src\blake2;$(SolutionDir)Crypto\Argon2\include;$(SolutionDir);%(AdditionalIncludeDirectories);$(IntDir) TC_WINDOWS_DRIVER;ARGON2_NO_THREADS;_NO_CRT_STDIO_INLINE;UNICODE;_UNICODE;%(PreprocessorDefinitions) true @@ -158,7 +158,7 @@ copy $(OutDir)veracrypt.inf "$(SolutionDir)Release\Setup Files\veracrypt.inf" TC_WINDOWS_DRIVER;ARGON2_NO_THREADS;_NO_CRT_STDIO_INLINE;UNICODE;_UNICODE;_ARM64_;ARM64;_USE_DECLSPECS_FOR_SAL=1;STD_CALL;%(PreprocessorDefinitions) - $(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir)Crypto\Argon2\include;$(SolutionDir);%(AdditionalIncludeDirectories);$(IntDir) + $(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir)Crypto\Argon2\src\blake2;$(SolutionDir)Crypto\Argon2\include;$(SolutionDir);%(AdditionalIncludeDirectories);$(IntDir) veracrypt.cat @@ -185,7 +185,7 @@ copy $(OutDir)veracrypt.inf "$(SolutionDir)Release\Setup Files\veracrypt.inf" TC_WINDOWS_DRIVER;ARGON2_NO_THREADS;_NO_CRT_STDIO_INLINE;UNICODE;_UNICODE;DEBUG;_DEBUG;_ARM64_;ARM64;_USE_DECLSPECS_FOR_SAL=1;STD_CALL;%(PreprocessorDefinitions) - $(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir)Crypto\Argon2\include;$(SolutionDir);%(AdditionalIncludeDirectories);$(IntDir) + $(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir)Crypto\Argon2\src\blake2;$(SolutionDir)Crypto\Argon2\include;$(SolutionDir);%(AdditionalIncludeDirectories);$(IntDir) veracrypt.cat diff --git a/src/Driver/Driver.vcxproj.filters b/src/Driver/Driver.vcxproj.filters index 53520f65..5567c168 100644 --- a/src/Driver/Driver.vcxproj.filters +++ b/src/Driver/Driver.vcxproj.filters @@ -382,8 +382,8 @@ Crypto\Source Files - - Crypto\Source Files\Argon2 + + Source Files diff --git a/src/ExpandVolume/ExpandVolume.vcxproj b/src/ExpandVolume/ExpandVolume.vcxproj index 75d6ae55..77ba229d 100644 --- a/src/ExpandVolume/ExpandVolume.vcxproj +++ b/src/ExpandVolume/ExpandVolume.vcxproj @@ -141,7 +141,7 @@ Disabled - ..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) VCEXPANDER;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) true Sync @@ -199,7 +199,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" >NUL: Disabled - ..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) VCEXPANDER;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) true Sync @@ -253,7 +253,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-arm64.exe" >NUL: /w34189 %(AdditionalOptions) MaxSpeed - ..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) VCEXPANDER;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) MultiThreaded true @@ -301,7 +301,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-arm64.exe" >NUL: /w34189 %(AdditionalOptions) MaxSpeed - ..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) VCEXPANDER;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) MultiThreaded true @@ -349,7 +349,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-arm64.exe" >NUL: /w34189 %(AdditionalOptions) MaxSpeed - ..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) VCEXPANDER;VC_EFI_CUSTOM_MODE;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) MultiThreaded true @@ -396,7 +396,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-arm64.exe" >NUL: /w34189 %(AdditionalOptions) MaxSpeed - ..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) VCEXPANDER;VC_EFI_CUSTOM_MODE;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) MultiThreaded true diff --git a/src/Format/Format.vcxproj b/src/Format/Format.vcxproj index 28aa24c9..4ba04157 100644 --- a/src/Format/Format.vcxproj +++ b/src/Format/Format.vcxproj @@ -134,7 +134,7 @@ Disabled - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) true EnableFastChecks @@ -177,7 +177,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: Disabled - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) true EnableFastChecks @@ -220,7 +220,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-arm64.exe" >NUL: /w34189 %(AdditionalOptions) MaxSpeed - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) MultiThreaded true @@ -264,7 +264,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-arm64.exe" >NUL: /w34189 %(AdditionalOptions) MaxSpeed - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) MultiThreaded true @@ -308,7 +308,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-arm64.exe" >NUL: /w34189 %(AdditionalOptions) MaxSpeed - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) VOLFORMAT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) MultiThreaded true @@ -351,7 +351,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-arm64.exe" >NUL: /w34189 %(AdditionalOptions) MaxSpeed - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) VOLFORMAT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) MultiThreaded true diff --git a/src/FormatDLL/FormatDLL.vcxproj b/src/FormatDLL/FormatDLL.vcxproj index e4c33580..14aa2ed0 100644 --- a/src/FormatDLL/FormatDLL.vcxproj +++ b/src/FormatDLL/FormatDLL.vcxproj @@ -186,7 +186,7 @@ NotUsing - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) ProgramDatabase MultiThreadedDebug @@ -212,7 +212,7 @@ copy VeraCryptFormatSDK.h "..\Debug\SDK Files\VeraCryptFormatSDK.h" NotUsing - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) ProgramDatabase MultiThreadedDebug @@ -240,7 +240,7 @@ copy VeraCryptFormatSDK.h "..\Debug\SDK Files\VeraCryptFormatSDK.h" NotUsing - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) MultiThreaded @@ -270,7 +270,7 @@ copy VeraCryptFormatSDK.h "..\Release\SDK Files\VeraCryptFormatSDK.h" NotUsing - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) MultiThreaded diff --git a/src/Mount/Mount.vcxproj b/src/Mount/Mount.vcxproj index 155f4f7b..47efaf31 100644 --- a/src/Mount/Mount.vcxproj +++ b/src/Mount/Mount.vcxproj @@ -137,7 +137,7 @@ Disabled - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) true Sync @@ -190,7 +190,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.exe" >NUL: Disabled - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) true Sync @@ -243,7 +243,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-arm64.exe" >NUL: /w34189 %(AdditionalOptions) MaxSpeed - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) MultiThreaded true @@ -290,7 +290,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-arm64.exe" >NUL: /w34189 %(AdditionalOptions) MaxSpeed - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) MultiThreaded true @@ -337,7 +337,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-arm64.exe" >NUL: /w34189 %(AdditionalOptions) MaxSpeed - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) TCMOUNT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) MultiThreaded true @@ -383,7 +383,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-arm64.exe" >NUL: /w34189 %(AdditionalOptions) MaxSpeed - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) TCMOUNT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) MultiThreaded true diff --git a/src/Setup/Portable.vcxproj b/src/Setup/Portable.vcxproj index c6f1fa0a..6d448b9b 100644 --- a/src/Setup/Portable.vcxproj +++ b/src/Setup/Portable.vcxproj @@ -93,7 +93,7 @@ Disabled - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) SETUP;PORTABLE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions) true EnableFastChecks @@ -132,7 +132,7 @@ copy PortableDebug\VeraCryptPortable.exe "..\Debug\Setup Files\VeraCrypt Portabl /w34189 %(AdditionalOptions) MaxSpeed - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) SETUP;PORTABLE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions) MultiThreaded true @@ -171,7 +171,7 @@ copy PortableDebug\VeraCryptPortable.exe "..\Debug\Setup Files\VeraCrypt Portabl /w34189 %(AdditionalOptions) MaxSpeed - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) SETUP;PORTABLE;VC_SKIP_OS_DRIVER_REQ_CHECK;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions) MultiThreaded true @@ -209,7 +209,7 @@ copy PortableDebug\VeraCryptPortable.exe "..\Debug\Setup Files\VeraCrypt Portabl /w34189 %(AdditionalOptions) MaxSpeed - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) SETUP;PORTABLE;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions) MultiThreaded true diff --git a/src/Setup/Setup.vcxproj b/src/Setup/Setup.vcxproj index 8d83ae59..15eb3d1e 100644 --- a/src/Setup/Setup.vcxproj +++ b/src/Setup/Setup.vcxproj @@ -93,7 +93,7 @@ Disabled - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) SETUP;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions) true EnableFastChecks @@ -133,7 +133,7 @@ copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt Setup.exe" >NUL /w34189 %(AdditionalOptions) MaxSpeed - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) SETUP;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions) MultiThreaded true @@ -172,7 +172,7 @@ copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt Setup.exe" >NUL /w34189 %(AdditionalOptions) MaxSpeed - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) SETUP;VC_SKIP_OS_DRIVER_REQ_CHECK;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions) MultiThreaded true @@ -210,7 +210,7 @@ copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt Setup.exe" >NUL /w34189 %(AdditionalOptions) MaxSpeed - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) SETUP;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions) MultiThreaded true diff --git a/src/SetupDLL/SetupDLL.vcxproj b/src/SetupDLL/SetupDLL.vcxproj index f4334def..068d5ef2 100644 --- a/src/SetupDLL/SetupDLL.vcxproj +++ b/src/SetupDLL/SetupDLL.vcxproj @@ -75,7 +75,7 @@ Disabled - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) SETUP;SETUP_DLL;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions) true EnableFastChecks @@ -115,7 +115,7 @@ copy Debug\VeraCryptSetup.dll "..\Debug\Setup Files\VeraCryptSetup.dll" >NUL: /w34189 %(AdditionalOptions) MaxSpeed - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) SETUP;SETUP_DLL;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions) MultiThreaded true @@ -155,7 +155,7 @@ copy Debug\VeraCryptSetup.dll "..\Debug\Setup Files\VeraCryptSetup.dll" >NUL: /w34189 %(AdditionalOptions) MaxSpeed - ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;%(AdditionalIncludeDirectories) + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;..\Crypto\Argon2\include;..\Crypto\Argon2\src\blake2;%(AdditionalIncludeDirectories) SETUP_DLL;SETUP;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions) MultiThreaded true diff --git a/src/Volume/Hash.cpp b/src/Volume/Hash.cpp index ab263738..f739f664 100644 --- a/src/Volume/Hash.cpp +++ b/src/Volume/Hash.cpp @@ -12,7 +12,7 @@ #include "Hash.h" -#include "Crypto/blake2.h" +#include "Crypto/blake2s.h" #include "Crypto/Sha2.h" #include "Crypto/Whirlpool.h" #include "Crypto/Streebog.h" @@ -27,7 +27,7 @@ namespace VeraCrypt l.push_back (shared_ptr (new Sha256 ())); #ifndef WOLFCRYPT_BACKEND l.push_back (shared_ptr (new Blake2s ())); - l.push_back (shared_ptr (new Whirlpool ())); + l.push_back (shared_ptr (new Whirlpool ())); l.push_back (shared_ptr (new Streebog ())); #endif return l; @@ -46,7 +46,7 @@ namespace VeraCrypt } #ifndef WOLFCRYPT_BACKEND - // RIPEMD-160 + // BLAKE2s Blake2s::Blake2s () { Context.Allocate (sizeof (blake2s_state), 32); @@ -69,6 +69,30 @@ namespace VeraCrypt if_debug (ValidateDataParameters (data)); blake2s_update ((blake2s_state *) Context.Ptr(), data.Get(), data.Size()); } + + // BLAKE2b + Blake2b::Blake2b () + { + Context.Allocate (sizeof (blake2b_state), 32); + Init(); + } + + void Blake2b::GetDigest (const BufferPtr &buffer) + { + if_debug (ValidateDigestParameters (buffer)); + blake2b_final ((blake2b_state *) Context.Ptr(), buffer, BLAKE2B_OUTBYTES); + } + + void Blake2b::Init () + { + blake2b_init ((blake2b_state *) Context.Ptr(), BLAKE2B_OUTBYTES); + } + + void Blake2b::ProcessData (const ConstBufferPtr &data) + { + if_debug (ValidateDataParameters (data)); + blake2b_update ((blake2b_state *) Context.Ptr(), data.Get(), data.Size()); + } #endif // SHA-256 diff --git a/src/Volume/Hash.h b/src/Volume/Hash.h index 1a370f09..31db179b 100644 --- a/src/Volume/Hash.h +++ b/src/Volume/Hash.h @@ -71,6 +71,29 @@ namespace VeraCrypt Blake2s (const Blake2s &); Blake2s &operator= (const Blake2s &); }; + + // Blake2b + class Blake2b : public Hash + { + public: + Blake2b (); + virtual ~Blake2b () { } + + virtual void GetDigest (const BufferPtr &buffer); + virtual size_t GetBlockSize () const { return 128; } + virtual size_t GetDigestSize () const { return 64; } + virtual wstring GetName () const { return L"BLAKE2b-512"; } + virtual wstring GetAltName () const { return L"BLAKE2b"; } + virtual shared_ptr GetNew () const { return shared_ptr (new Blake2b); } + virtual void Init (); + virtual void ProcessData (const ConstBufferPtr &data); + + protected: + + private: + Blake2b (const Blake2b &); + Blake2b &operator= (const Blake2b &); + }; #endif // SHA-256