mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 02:58:02 -06:00
Crypto: Add optimized SHA-512 and SHA-256 assembly implementations for x86_64 and x86. This improves speed by 30%.
This commit is contained in:
@@ -584,7 +584,7 @@ BOOL RunHashTest (HashFunction fn, HashTestVector* vector, BOOL bUseSSE)
|
||||
#if defined (DEVICE_DRIVER) && !defined (_WIN64)
|
||||
KFLOATING_SAVE floatingPointState;
|
||||
NTSTATUS saveStatus = STATUS_SUCCESS;
|
||||
if (bUseSSE && (HasSSE2() || HasSSE41()))
|
||||
if (bUseSSE && (HasISSE() || HasSSE2()))
|
||||
saveStatus = KeSaveFloatingPointState (&floatingPointState);
|
||||
#endif
|
||||
while (vector[i].hexInput && vector[i].hexOutput)
|
||||
@@ -601,7 +601,7 @@ BOOL RunHashTest (HashFunction fn, HashTestVector* vector, BOOL bUseSSE)
|
||||
}
|
||||
|
||||
#if defined (DEVICE_DRIVER) && !defined (_WIN64)
|
||||
if (NT_SUCCESS (saveStatus) && bUseSSE && (HasSSE2() || HasSSE41()))
|
||||
if (NT_SUCCESS (saveStatus) && bUseSSE && (HasISSE() || HasSSE2()))
|
||||
KeRestoreFloatingPointState (&floatingPointState);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user