VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/ExpandVolume/WinMain.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-05-10Remove trailing whitespaceDavid Foerster1-16/+16
2016-05-10Normalize all line terminatorsDavid Foerster1-423/+423
2016-05-05Windows: Add option and command line switch to hide waiting dialog when ↵Mounir IDRASSI1-0/+2
performing operations.
2016-02-07Windows:Fix various issues and warnings reported by static code analysis ↵Mounir IDRASSI1-1/+1
tool Coverity.
2016-01-20Copyright: update dates to include 2016.Mounir IDRASSI1-1/+1
2016-01-10Windows: Avoid wrong update of configuration XML file caused by not using ↵Mounir IDRASSI1-1/+1
the correct window handle to get some GUI fields content. Some code cleanup.
2016-01-10Windows: Don't show disconnected network drives in the list of available ↵Mounir IDRASSI1-0/+2
drives. Add option to make them available for mounting if needed.
2016-01-03Windows: Fix Dll hijacking vulnerability affecting installer that allows ↵Mounir IDRASSI1-1/+0
arbitrary code execution with elevation of privilege (CVE-2016-1281)
2015-12-31Cryptography: Optimize Whirlpool implementation by using public domain ↵Mounir IDRASSI1-0/+3
assembly code developed by Wei Dai
2015-11-26Windows: Full UNICODE rewrite and implement support for UNICODE passwords.Mounir IDRASSI1-38/+46
2015-09-26-2/+2
reported by users
2015-06-08Windows: rename PIN to PIM to avoid confusion. Better error messages.Mounir IDRASSI1-6/+6
2015-05-27Windows: GUI modifications around PIN fieldMounir IDRASSI1-16/+2
2015-05-26Windows: first implementation of dynamic modeMounir IDRASSI1-1/+43
2015-05-06Windows: Solve detection issue when resuming encryption. Add separate logic ↵Mounir IDRASSI1-1/+3
for manual selection of device and display error message in case of failure.
2015-05-03Windows: enable showing/hiding password for system encryption in Windows UI ↵Mounir IDRASSI1-1/+0
and in the bootloader (F5 key). This will be helpful to diagnose issues with non-US versions of Windows.
2015-04-27Windows: Support A: and B: as driver letters for mounting volumes.Mounir IDRASSI1-1/+1
2015-02-09Static Code Analysis: handle unused variables more properly. Catch STL ↵Mounir IDRASSI1-1/+0
exception. Add more checks. Add proper cast to arithmetic operations.
2015-01-20Windows: Add first version of VeraCryptExpander who is based on extcv. Minor ↵Mounir IDRASSI1-0/+971
modification to Mount.c to avoid link errors when building VeraCryptExpander.
n) (((x) >> n) | ((x) << (64 - n))) #define rotl64(x,n) (((x) << n) | ((x) >> (64 - n))) #endif #if _MSC_VER >= 1400 && !defined(__INTEL_COMPILER) // Intel C++ Compiler 10.0 calls a function instead of using the rotate instruction when using these instructions #pragma intrinsic(_rotr8,_rotl8,_rotr16,_rotl16) #define rotr8(x,n) _rotr8(x, n) #define rotl8(x,n) _rotl8(x, n) #define rotr16(x,n) _rotr16(x, n) #define rotl16(x,n) _rotl16(x, n) #else #define rotr8(x,n) (((x) >> n) | ((x) << (8 - n))) #define rotl8(x,n) (((x) << n) | ((x) >> (8 - n))) #define rotr16(x,n) (((x) >> n) | ((x) << (16 - n))) #define rotl16(x,n) (((x) << n) | ((x) >> (16 - n))) #endif #if defined(__GNUC__) && defined(__linux__) #define CRYPTOPP_BYTESWAP_AVAILABLE #include <byteswap.h> #elif defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_UEFI) #pragma intrinsic(_byteswap_ulong,_byteswap_uint64) #define CRYPTOPP_BYTESWAP_AVAILABLE #define bswap_32(x) _byteswap_ulong(x) #define bswap_64(x) _byteswap_uint64(x) #elif defined(__APPLE__) #include <libkern/OSByteOrder.h> #define CRYPTOPP_BYTESWAP_AVAILABLE #define bswap_16 OSSwapInt16 #define bswap_32 OSSwapInt32 #define bswap_64 OSSwapInt64 #else #if CRYPTOPP_FAST_ROTATE(32) #define bswap_32(x) (rotr32((x), 8U) & 0xff00ff00) | (rotl32((x), 8U) & 0x00ff00ff) #else #define CRYPTOPP_BYTESWAP_AVAILABLE #define bswap_32(x) (rotl32((((x) & 0xFF00FF00) >> 8) | (((x) & 0x00FF00FF) << 8), 16U)) #define bswap_64(x) rotl64(((((((x & LL(0xFF00FF00FF00FF00)) >> 8) | ((x & LL(0x00FF00FF00FF00FF)) << 8)) & LL(0xFFFF0000FFFF0000)) >> 16) | (((((x & LL(0xFF00FF00FF00FF00)) >> 8) | ((x & LL(0x00FF00FF00FF00FF)) << 8)) & LL(0x0000FFFF0000FFFF)) << 16)), 32U) #endif #ifndef TC_NO_COMPILER_INT64 #define bswap_64(x) rotl64(((((((x & LL(0xFF00FF00FF00FF00)) >> 8) | ((x & LL(0x00FF00FF00FF00FF)) << 8)) & LL(0xFFFF0000FFFF0000)) >> 16) | (((((x & LL(0xFF00FF00FF00FF00)) >> 8) | ((x & LL(0x00FF00FF00FF00FF)) << 8)) & LL(0x0000FFFF0000FFFF)) << 16)), 32U) #endif #endif VC_INLINE uint32 ByteReverseWord32 (uint32 value) { #if defined(__GNUC__) && defined(CRYPTOPP_X86_ASM_AVAILABLE) __asm__ ("bswap %0" : "=r" (value) : "0" (value)); return value; #elif defined(CRYPTOPP_BYTESWAP_AVAILABLE) return bswap_32(value); #elif defined(__MWERKS__) && TARGET_CPU_PPC return (uint32)__lwbrx(&value,0); #elif _MSC_VER >= 1400 || (_MSC_VER >= 1300 && !defined(_DLL)) return _byteswap_ulong(value); #elif CRYPTOPP_FAST_ROTATE(32) // 5 instructions with rotate instruction, 9 without return (rotr32(value, 8U) & 0xff00ff00) | (rotl32(value, 8U) & 0x00ff00ff); #else // 6 instructions with rotate instruction, 8 without value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8); return rotl32(value, 16U); #endif } #ifndef TC_NO_COMPILER_INT64 VC_INLINE uint64 ByteReverseWord64(uint64 value) { #if defined(__GNUC__) && defined(CRYPTOPP_X86_ASM_AVAILABLE) && defined(__x86_64__) __asm__ ("bswap %0" : "=r" (value) : "0" (value)); return value; #elif defined(CRYPTOPP_BYTESWAP_AVAILABLE) return bswap_64(value); #elif defined(_MSC_VER) && _MSC_VER >= 1300 return _byteswap_uint64(value); #else value = ((value & LL(0xFF00FF00FF00FF00)) >> 8) | ((value & LL(0x00FF00FF00FF00FF)) << 8); value = ((value & LL(0xFFFF0000FFFF0000)) >> 16) | ((value & LL(0x0000FFFF0000FFFF)) << 16); return rotl64(value, 32U); #endif } VC_INLINE void CorrectEndianess(uint64 *out, const uint64 *in, size_t byteCount) { size_t i, count = byteCount/sizeof(uint64); for (i=0; i<count; i++) out[i] = ByteReverseWord64(in[i]); } #endif #ifdef CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS #define GetAlignmentOf(T) 1 #elif (_MSC_VER >= 1300) #define GetAlignmentOf(T) __alignof(T) #elif defined(__GNUC__) #define GetAlignmentOf(T) __alignof__(T) #else #define GetAlignmentOf(T) sizeof(T) #endif #define IsPowerOf2(n) (((n) > 0) && (((n) & ((n)-1)) == 0)) #define ModPowerOf2(a,b) ((a) & ((b)-1)) #define IsAlignedOn(p,alignment) ((alignment==1) || (IsPowerOf2(alignment) ? ModPowerOf2((size_t)p, alignment) == 0 : (size_t)p % alignment == 0)) #define IsAligned16(p) IsAlignedOn(p, GetAlignmentOf(uint64)) #ifdef __cplusplus } #endif #endif