Reorder SM4-based cascade ciphers: apply SM4 as the final stage following external review.

The cascade order has been updated so that SM4 is applied after the other cipher(s) (e.g., Serpent). This change reflects standard cryptanalytic guidance, which shows that the overall strength of a cascade is limited by the first encryption stage. Given that SM4 uses a 128-bit key, its post-quantum brute-force resistance is lower than ciphers with a 256-bit key (such as Serpent). By placing SM4 last, we ensure that any potential weakness in SM4 cannot reduce the security margin provided by the stronger cipher.
This commit is contained in:
Mounir IDRASSI committed 2025-05-16 15:37:32 +09:00
1 parent b0311f7a86
commit 982fffe4db
13 files changed
+108 -108

No files matched your search

+3 -3
View File
@@ -316,10 +316,10 @@ namespace VeraCrypt
|| (typeid (*volume->GetEncryptionAlgorithm()) == typeid (CamelliaKuznyechik))
|| (typeid (*volume->GetEncryptionAlgorithm()) == typeid (KuznyechikTwofish))
|| (typeid (*volume->GetEncryptionAlgorithm()) == typeid (KuznyechikAES))
|| (typeid (*volume->GetEncryptionAlgorithm()) == typeid (KuznyechikSM4))
|| (typeid (*volume->GetEncryptionAlgorithm()) == typeid (SerpentSM4))
|| (typeid (*volume->GetEncryptionAlgorithm()) == typeid (SM4Kuznyechik))
|| (typeid (*volume->GetEncryptionAlgorithm()) == typeid (SM4Serpent))
|| (typeid (*volume->GetEncryptionAlgorithm()) == typeid (SM4Twofish))
|| (typeid (*volume->GetEncryptionAlgorithm()) == typeid (TwofishSerpentSM4))
|| (typeid (*volume->GetEncryptionAlgorithm()) == typeid (SM4TwofishSerpent))
|| (typeid (*volume->GetEncryptionAlgorithm()) == typeid (KuznyechikSerpentCamellia));
if (options.NoKernelCrypto