mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 02:58:02 -06:00
Crypto: Add optimized Twofish assembly implementation for x86_64.
This commit is contained in:
@@ -246,6 +246,11 @@ void EncipherBlocks (int cipher, void *dataPtr, void *ks, size_t blockCount)
|
||||
KeRestoreFloatingPointState (&floatingPointState);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#if CRYPTOPP_BOOL_X64
|
||||
else if (cipher == TWOFISH) {
|
||||
twofish_encrypt_blocks(ks, data, data, (uint32) blockCount);
|
||||
}
|
||||
#endif
|
||||
else if (cipher == GOST89) {
|
||||
gost_encrypt(data, data, ks, (int)blockCount);
|
||||
@@ -341,6 +346,11 @@ void DecipherBlocks (int cipher, void *dataPtr, void *ks, size_t blockCount)
|
||||
KeRestoreFloatingPointState (&floatingPointState);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#if CRYPTOPP_BOOL_X64
|
||||
else if (cipher == TWOFISH) {
|
||||
twofish_decrypt_blocks(ks, data, data, (uint32) blockCount);
|
||||
}
|
||||
#endif
|
||||
else if (cipher == GOST89) {
|
||||
gost_decrypt(data, data, ks, (int)blockCount);
|
||||
@@ -417,6 +427,9 @@ BOOL CipherSupportsIntraDataUnitParallelization (int cipher)
|
||||
|| (cipher == GOST89)
|
||||
#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined (_UEFI)
|
||||
|| (cipher == SERPENT && HasSSE2())
|
||||
#endif
|
||||
#if CRYPTOPP_BOOL_X64
|
||||
|| (cipher == TWOFISH)
|
||||
#endif
|
||||
;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user