diff --git a/doc/html/en/Cascades.html b/doc/html/en/Cascades.html index b20b7e7a..f484cd3f 100644 --- a/doc/html/en/Cascades.html +++ b/doc/html/en/Cascades.html @@ -87,17 +87,17 @@ Modes of Operation). Each 128-bit block is first encrypted with Serpent (256-bit key) in XTS mode and then with Twofish (256-bit key) in XTS mode. Each of the cascaded ciphers uses its own key. All encryption keys are mutually independent (note that header keys are independent too, even though they are derived from a single password – see the section Header Key Derivation, Salt, and Iteration Count). See above for information on the individual cascaded ciphers.

-

Kuznyechik-SM4

+

SM4-Kuznyechik

-Two ciphers in a cascade [15, 16] operating in XTS mode (see the section -Modes of Operation). Each 128-bit block is first encrypted with SM4 (128-bit key) in XTS mode and then with Kuznyechik (256-bit key) in XTS mode. Each of the cascaded ciphers uses its own key. All encryption keys are mutually independent (note that header keys are independent too, even though they are derived from a single password – see the section +Two ciphers in a cascade [15, 16] operating in XTS mode (see the section +Modes of Operation). Each 128-bit block is first encrypted with Kuznyechik (256-bit key) in XTS mode and then with SM4 (128-bit key) in XTS mode. Each of the cascaded ciphers uses its own key. All encryption keys are mutually independent (note that header keys are independent too, even though they are derived from a single password – see the section Header Key Derivation, Salt, and Iteration Count). See above for information on the individual cascaded ciphers.

-

Serpent-SM4

+

SM4-Serpent

-Two ciphers in a cascade [15, 16] operating in XTS mode (see the section -Modes of Operation). Each 128-bit block is first encrypted with SM4 (128-bit key) in XTS mode and then with Serpent (256-bit key) in XTS mode. Each of the cascaded ciphers uses its own key. All encryption keys are mutually independent (note that header keys are independent too, even though they are derived from a single password – see the section +Two ciphers in a cascade [15, 16] operating in XTS mode (see the section +Modes of Operation). Each 128-bit block is first encrypted with Serpent (256-bit key) in XTS mode and then with SM4 (128-bit key) in XTS mode. Each of the cascaded ciphers uses its own key. All encryption keys are mutually independent (note that header keys are independent too, even though they are derived from a single password – see the section Header Key Derivation, Salt, and Iteration Count). See above for information on the individual cascaded ciphers.

@@ -108,10 +108,10 @@ Two ciphers in a cascade [15, 16] operating in XTS mode (see the section Header Key Derivation, Salt, and Iteration Count). See above for information on the individual cascaded ciphers.

-

Twofish-Serpent-SM4

+

SM4-Twofish-Serpent

-Three ciphers in a cascade [15, 16] operating in XTS mode (see the section -Modes of Operation). Each 128-bit block is first encrypted with SM4 (128-bit key) in XTS mode, then with Serpent (256-bit key) in XTS mode, and finally with Twofish (256-bit key) in XTS mode. Each of the cascaded ciphers uses its own key. All encryption keys are mutually independent (note that header keys are independent too, even though they are derived from a single password – see the section +Three ciphers in a cascade [15, 16] operating in XTS mode (see the section +Modes of Operation). Each 128-bit block is first encrypted with Serpent (256-bit key) in XTS mode, then with Twofish (256-bit key) in XTS mode, and finally with SM4 (128-bit key) in XTS mode. Each of the cascaded ciphers uses its own key. All encryption keys are mutually independent (note that header keys are independent too, even though they are derived from a single password – see the section Header Key Derivation, Salt, and Iteration Count). See above for information on the individual cascaded ciphers.

diff --git a/doc/html/en/Encryption Algorithms.html b/doc/html/en/Encryption Algorithms.html index 0fd464bc..7873cd5d 100644 --- a/doc/html/en/Encryption Algorithms.html +++ b/doc/html/en/Encryption Algorithms.html @@ -263,11 +263,11 @@ XTS - Kuznyechik-SM4 + SM4-Kuznyechik   - 256; 128 + 128; 256 128 @@ -276,11 +276,11 @@ XTS - Serpent-SM4 + SM4-Serpent   - 256; 128 + 128; 256 128 @@ -302,11 +302,11 @@ XTS - Twofish-Serpent-SM4 + SM4-Twofish-Serpent   - 256; 256; 128 + 128; 256; 256 128 diff --git a/doc/html/ru/Cascades.html b/doc/html/ru/Cascades.html index 60e5183c..6a60a08c 100644 --- a/doc/html/ru/Cascades.html +++ b/doc/html/ru/Cascades.html @@ -87,17 +87,17 @@ Режимы работы). Каждый блок размером 128 бит сначала шифруется алгоритмом Serpent (с ключом размером 256 бит) в режиме XTS, а затем алгоритмом Twofish (с ключом размером 256 бит) в режиме XTS. Каждый из этих каскадных шифров использует свой собственный ключ. Все ключи шифрования не зависят друг от друга (обратите внимание, что ключи заголовка тоже независимы, хотя и получены в результате формирования одного пароля – см. раздел Формирование ключа заголовка, соль и количество итераций). Информация о каждом отдельном шифре приведена выше.

-

Kuznyechik-SM4

+

SM4-Kuznyechik

Последовательно выполняемые (каскадом) [15, 16] два шифра, работающие в режиме XTS (см. раздел -Режимы работы). Каждый блок размером 128 бит сначала шифруется алгоритмом SM4 (с ключом размером 128 бит) в режиме XTS, а затем алгоритмом Kuznyechik (с ключом размером 256 бит) в режиме XTS. Каждый из этих каскадных шифров использует свой собственный ключ. Все ключи шифрования не зависят друг от друга (обратите внимание, что ключи заголовка тоже независимы, хотя и получены в результате формирования одного пароля – см. раздел +Режимы работы). Каждый блок размером 128 бит сначала шифруется алгоритмом Kuznyechik (с ключом размером 256 бит) в режиме XTS, а затем алгоритмом SM4 (с ключом размером 128 бит) в режиме XTS. Каждый из этих каскадных шифров использует свой собственный ключ. Все ключи шифрования не зависят друг от друга (обратите внимание, что ключи заголовка тоже независимы, хотя и получены в результате формирования одного пароля – см. раздел Формирование ключа заголовка, соль и количество итераций). Информация о каждом отдельном шифре приведена выше.

-

Serpent-SM4

+

SM4-Serpent

Последовательно выполняемые (каскадом) [15, 16] два шифра, работающие в режиме XTS (см. раздел -Режимы работы). Каждый блок размером 128 бит сначала шифруется алгоритмом SM4 (с ключом размером 128 бит) в режиме XTS, а затем алгоритмом Serpent (с ключом размером 256 бит) в режиме XTS. Каждый из этих каскадных шифров использует свой собственный ключ. Все ключи шифрования не зависят друг от друга (обратите внимание, что ключи заголовка тоже независимы, хотя и получены в результате формирования одного пароля – см. раздел +Режимы работы). Каждый блок размером 128 бит сначала шифруется алгоритмом Serpent (с ключом размером 256 бит) в режиме XTS, а затем алгоритмом SM4 (с ключом размером 128 бит) в режиме XTS. Каждый из этих каскадных шифров использует свой собственный ключ. Все ключи шифрования не зависят друг от друга (обратите внимание, что ключи заголовка тоже независимы, хотя и получены в результате формирования одного пароля – см. раздел Формирование ключа заголовка, соль и количество итераций). Информация о каждом отдельном шифре приведена выше.

@@ -108,10 +108,10 @@ Формирование ключа заголовка, соль и количество итераций). Информация о каждом отдельном шифре приведена выше.

-

Twofish-Serpent-SM4

+

SM4-Twofish-Serpent

Последовательно выполняемые (каскадом) [15, 16] три шифра, работающие в режиме XTS (см. раздел -Режимы работы). Каждый блок размером 128 бит сначала шифруется алгоритмом SM4 (с ключом размером 128 бит) в режиме XTS, затем алгоритмом Serpent (с ключом размером 256 бит) в режиме XTS, и, наконец, алгоритмом Twofish (с ключом размером 256 бит) в режиме XTS. Каждый из этих каскадных шифров использует свой собственный ключ. Все ключи шифрования не зависят друг от друга (обратите внимание, что ключи заголовка тоже независимы, хотя и получены в результате формирования одного пароля – см. раздел +Режимы работы). Каждый блок размером 128 бит сначала шифруется алгоритмом Serpent (с ключом размером 256 бит) в режиме XTS, затем алгоритмом Twofish (с ключом размером 256 бит) в режиме XTS, и, наконец, алгоритмом SM4 (с ключом размером 128 бит) в режиме XTS. Каждый из этих каскадных шифров использует свой собственный ключ. Все ключи шифрования не зависят друг от друга (обратите внимание, что ключи заголовка тоже независимы, хотя и получены в результате формирования одного пароля – см. раздел Формирование ключа заголовка, соль и количество итераций). Информация о каждом отдельном шифре приведена выше.

diff --git a/doc/html/ru/Encryption Algorithms.html b/doc/html/ru/Encryption Algorithms.html index 36231013..b43f6882 100644 --- a/doc/html/ru/Encryption Algorithms.html +++ b/doc/html/ru/Encryption Algorithms.html @@ -264,11 +264,11 @@ XTS - Kuznyechik-SM4 + SM4-Kuznyechik   - 256; 128 + 128; 256 128 @@ -277,11 +277,11 @@ XTS - Serpent-SM4 + SM4-Serpent   - 256; 128 + 128; 256 128 @@ -303,11 +303,11 @@ XTS - Twofish-Serpent-SM4 + SM4-Twofish-Serpent   - 256; 256; 128 + 128; 256; 256 128 diff --git a/doc/html/zh-cn/Cascades.html b/doc/html/zh-cn/Cascades.html index 72d6d55f..bfc59843 100644 --- a/doc/html/zh-cn/Cascades.html +++ b/doc/html/zh-cn/Cascades.html @@ -57,14 +57,14 @@

级联中的三个密码算法 [15, 16] 以XTS模式运行(请参阅 操作模式 部分)。每个128位块首先使用AES(256位密钥)以XTS模式进行加密,然后使用Twofish(256位密钥)以XTS模式进行加密,最后使用Serpent(256位密钥)以XTS模式进行加密。级联中的每个密码算法使用其自己的密钥。所有加密密钥相互独立(请注意,即使头密钥是从单个密码派生而来,它们也是独立的 — 请参阅 头密钥派生、盐值和迭代次数)。有关级联中各个密码算法的信息,请参阅上文。

Twofish - Serpent

级联中的两个密码算法 [15, 16] 以XTS模式运行(请参阅 操作模式 部分)。每个128位块首先使用Serpent(256位密钥)以XTS模式进行加密,然后使用Twofish(256位密钥)以XTS模式进行加密。级联中的每个密码算法使用其自己的密钥。所有加密密钥相互独立(请注意,即使头密钥是从单个密码派生而来,它们也是独立的 — 请参阅 头密钥派生、盐值和迭代次数)。有关级联中各个密码算法的信息,请参阅上文。

-

Kuznyechik - SM4

-

级联中的两个密码算法 [15, 16] 以XTS模式运行(请参阅 操作模式 部分)。每个128位块首先使用SM4(128位密钥)以XTS模式进行加密,然后使用Kuznyechik(256位密钥)以XTS模式进行加密。级联中的每个密码算法使用其自己的密钥。所有加密密钥相互独立(请注意,即使头密钥是从单个密码派生而来,它们也是独立的 — 请参阅 头密钥派生、盐值和迭代次数)。有关级联中各个密码算法的信息,请参阅上文。

-

Serpent - SM4

-

级联中的两个密码算法 [15, 16] 以XTS模式运行(请参阅 操作模式 部分)。每个128位块首先使用SM4(128位密钥)以XTS模式进行加密,然后使用Serpent(256位密钥)以XTS模式进行加密。级联中的每个密码算法使用其自己的密钥。所有加密密钥相互独立(请注意,即使头密钥是从单个密码派生而来,它们也是独立的 — 请参阅 头密钥派生、盐值和迭代次数)。有关级联中各个密码算法的信息,请参阅上文。

+

SM4 - Kuznyechik

+

级联中的两个密码算法 [15, 16] 以XTS模式运行(请参阅 操作模式 部分)。每个128位块首先使用Kuznyechik(256位密钥)以XTS模式进行加密,然后使用SM4(128位密钥)以XTS模式进行加密。级联中的每个密码算法使用其自己的密钥。所有加密密钥相互独立(请注意,即使头密钥是从单个密码派生而来,它们也是独立的 — 请参阅 头密钥派生、盐值和迭代次数)。有关级联中各个密码算法的信息,请参阅上文。

+

SM4 - Serpent

+

级联中的两个密码算法 [15, 16] 以XTS模式运行(请参阅 操作模式 部分)。每个128位块首先使用Serpent(256位密钥)以XTS模式进行加密,然后使用SM4(128位密钥)以XTS模式进行加密。级联中的每个密码算法使用其自己的密钥。所有加密密钥相互独立(请注意,即使头密钥是从单个密码派生而来,它们也是独立的 — 请参阅 头密钥派生、盐值和迭代次数)。有关级联中各个密码算法的信息,请参阅上文。

SM4 - Twofish

级联中的两个密码算法 [15, 16] 以XTS模式运行(请参阅 操作模式 部分)。每个128位块首先使用Twofish(256位密钥)以XTS模式进行加密,然后使用SM4(128位密钥)以XTS模式进行加密。级联中的每个密码算法使用其自己的密钥。所有加密密钥相互独立(请注意,即使头密钥是从单个密码派生而来,它们也是独立的 — 请参阅 头密钥派生、盐值和迭代次数)。有关级联中各个密码算法的信息,请参阅上文。

-

Twofish - Serpent - SM4

-

级联中的三个密码算法 [15, 16] 以XTS模式运行(请参阅 操作模式 部分)。每个128位块首先使用SM4(128位密钥)以XTS模式进行加密,然后使用Serpent(256位密钥)以XTS模式进行加密,最后使用Twofish(256位密钥)以XTS模式进行加密。级联中的每个密码算法使用其自己的密钥。所有加密密钥相互独立(请注意,即使头密钥是从单个密码派生而来,它们也是独立的 — 请参阅 头密钥派生、盐值和迭代次数)。有关级联中各个密码算法的信息,请参阅上文。

+

SM4 - Twofish - Serpent

+

级联中的三个密码算法 [15, 16] 以XTS模式运行(请参阅 操作模式 部分)。每个128位块首先使用Serpent(256位密钥)以XTS模式进行加密,然后使用Twofish(256位密钥)以XTS模式进行加密,最后使用SM4(128位密钥)以XTS模式进行加密。级联中的每个密码算法使用其自己的密钥。所有加密密钥相互独立(请注意,即使头密钥是从单个密码派生而来,它们也是独立的 — 请参阅 头密钥派生、盐值和迭代次数)。有关级联中各个密码算法的信息,请参阅上文。

\ No newline at end of file diff --git a/doc/html/zh-cn/Encryption Algorithms.html b/doc/html/zh-cn/Encryption Algorithms.html index 2d1a0409..1faaa321 100644 --- a/doc/html/zh-cn/Encryption Algorithms.html +++ b/doc/html/zh-cn/Encryption Algorithms.html @@ -263,11 +263,11 @@ GOST R 34.12-2015

- Kuznyechik-SM4 + SM4-Kuznyechik   - 256; 128 + 128; 256 128 @@ -276,11 +276,11 @@ GOST R 34.12-2015

- Serpent-SM4 + SM4-Serpent   - 256; 128 + 128; 256 128 @@ -302,11 +302,11 @@ GOST R 34.12-2015

- Twofish-Serpent-SM4 + SM4-Twofish-Serpent   - 256; 256; 128 + 128; 256; 256 128 diff --git a/src/Common/Crypto.c b/src/Common/Crypto.c index d3de6216..29949be9 100644 --- a/src/Common/Crypto.c +++ b/src/Common/Crypto.c @@ -98,13 +98,13 @@ static EncryptionAlgorithm EncryptionAlgorithms[] = { { SERPENT, TWOFISH, 0 }, { XTS, 0 }, 1, 1 }, { { KUZNYECHIK, CAMELLIA, 0 }, { XTS, 0 }, 0, 1 }, { { TWOFISH, KUZNYECHIK, 0 }, { XTS, 0 }, 0, 1 }, - { { SM4, KUZNYECHIK, 0 }, { XTS, 0 }, 0, 1 }, - { { SM4, SERPENT, 0 }, { XTS, 0 }, 0, 1 }, + { { KUZNYECHIK, SM4, 0 }, { XTS, 0 }, 0, 1 }, + { { SERPENT, SM4, 0 }, { XTS, 0 }, 0, 1 }, { { TWOFISH, SM4, 0 }, { XTS, 0 }, 0, 1 }, { { SERPENT, CAMELLIA, 0 }, { XTS, 0 }, 0, 1 }, { { AES, KUZNYECHIK, 0 }, { XTS, 0 }, 0, 1 }, { { CAMELLIA, SERPENT, KUZNYECHIK, 0 }, { XTS, 0 }, 0, 1 }, - { { SM4, SERPENT, TWOFISH, 0 }, { XTS, 0 }, 0, 1 }, + { { SERPENT, TWOFISH, SM4, 0 }, { XTS, 0 }, 0, 1 }, #endif { { 0, 0 }, { 0, 0}, 0, 0 } // Must be all-zero diff --git a/src/Common/Tests.c b/src/Common/Tests.c index 8bd5299d..1c47e441 100644 --- a/src/Common/Tests.c +++ b/src/Common/Tests.c @@ -1202,53 +1202,53 @@ BOOL TestSectorBufEncryption (PCRYPTO_INFO ci) break; } } - else if (wcscmp (name, L"Kuznyechik-SM4") == 0) + else if (wcscmp (name, L"SM4-Kuznyechik") == 0) { switch (testCase) { case 0: - if (crc != 0xb126b7f8) + if (crc != 0xa8179f71) return FALSE; nTestsPerformed++; break; case 1: - if (crc != 0xa117004a) + if (crc != 0xaa372193) return FALSE; nTestsPerformed++; break; case 2: - if (crc != 0xc561be46) + if (crc != 0x49b78057) return FALSE; nTestsPerformed++; break; case 3: - if (crc != 0x47106ce3) + if (crc != 0x80718fd2) return FALSE; nTestsPerformed++; break; } } - else if (wcscmp (name, L"Serpent-SM4") == 0) + else if (wcscmp (name, L"SM4-Serpent") == 0) { switch (testCase) { case 0: - if (crc != 0x40a9eaa5) + if (crc != 0x77cd332a) return FALSE; nTestsPerformed++; break; case 1: - if (crc != 0xce6873f1) + if (crc != 0x3a2be34b) return FALSE; nTestsPerformed++; break; case 2: - if (crc != 0x92cafcad) + if (crc != 0xfc1a6d4c) return FALSE; nTestsPerformed++; break; case 3: - if (crc != 0x7e1463ca) + if (crc != 0xf9b54baf) return FALSE; nTestsPerformed++; break; @@ -1306,27 +1306,27 @@ BOOL TestSectorBufEncryption (PCRYPTO_INFO ci) break; } } - else if (wcscmp (name, L"Twofish-Serpent-SM4") == 0) + else if (wcscmp (name, L"SM4-Twofish-Serpent") == 0) { switch (testCase) { case 0: - if (crc != 0x881b6e3d) + if (crc != 0x3ef6c86f) return FALSE; nTestsPerformed++; break; case 1: - if (crc != 0x37ed1418) + if (crc != 0xe5202d6c) return FALSE; nTestsPerformed++; break; case 2: - if (crc != 0x8e563eef) + if (crc != 0xa3acb43b) return FALSE; nTestsPerformed++; break; case 3: - if (crc != 0xdcbc41ac) + if (crc != 0xe9d64477) return FALSE; nTestsPerformed++; break; @@ -1469,15 +1469,15 @@ BOOL TestSectorBufEncryption (PCRYPTO_INFO ci) return FALSE; nTestsPerformed++; } - else if (wcscmp (name, L"Kuznyechik-SM4") == 0) + else if (wcscmp (name, L"SM4-Kuznyechik") == 0) { - if (crc != 0x8190551b) + if (crc != 0x23039a99) return FALSE; nTestsPerformed++; } - else if (wcscmp (name, L"Serpent-SM4") == 0) + else if (wcscmp (name, L"SM4-Serpent") == 0) { - if (crc != 0x31408c47) + if (crc != 0xa7c3155b) return FALSE; nTestsPerformed++; } @@ -1493,9 +1493,9 @@ BOOL TestSectorBufEncryption (PCRYPTO_INFO ci) return FALSE; nTestsPerformed++; } - else if (wcscmp (name, L"Twofish-Serpent-SM4") == 0) + else if (wcscmp (name, L"SM4-Twofish-Serpent") == 0) { - if (crc != 0x033093e5) + if (crc != 0x9723753f) return FALSE; nTestsPerformed++; } diff --git a/src/Core/Unix/Linux/CoreLinux.cpp b/src/Core/Unix/Linux/CoreLinux.cpp index 57126883..dd09ff48 100644 --- a/src/Core/Unix/Linux/CoreLinux.cpp +++ b/src/Core/Unix/Linux/CoreLinux.cpp @@ -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 diff --git a/src/Volume/EncryptionAlgorithm.cpp b/src/Volume/EncryptionAlgorithm.cpp index 0fddb087..d000d385 100644 --- a/src/Volume/EncryptionAlgorithm.cpp +++ b/src/Volume/EncryptionAlgorithm.cpp @@ -81,10 +81,10 @@ namespace VeraCrypt l.push_back (shared_ptr (new SerpentAES ())); l.push_back (shared_ptr (new SerpentTwofishAES ())); l.push_back (shared_ptr (new TwofishSerpent ())); - l.push_back (shared_ptr (new KuznyechikSM4 ())); - l.push_back (shared_ptr (new SerpentSM4 ())); + l.push_back (shared_ptr (new SM4Kuznyechik ())); + l.push_back (shared_ptr (new SM4Serpent ())); l.push_back (shared_ptr (new SM4Twofish ())); - l.push_back (shared_ptr (new TwofishSerpentSM4 ())); + l.push_back (shared_ptr (new SM4TwofishSerpent ())); #endif return l; } @@ -394,20 +394,20 @@ namespace VeraCrypt SupportedModes.push_back (shared_ptr (new EncryptionModeXTS ())); } - // Kuznyechik-SM4 - KuznyechikSM4::KuznyechikSM4 () + // SM4-Kuznyechik + SM4Kuznyechik::SM4Kuznyechik () { - Ciphers.push_back (shared_ptr (new CipherSM4 ())); Ciphers.push_back (shared_ptr (new CipherKuznyechik ())); + Ciphers.push_back (shared_ptr (new CipherSM4 ())); SupportedModes.push_back (shared_ptr (new EncryptionModeXTS ())); } - // Serpent-SM4 - SerpentSM4::SerpentSM4 () + // SM4-Serpent + SM4Serpent::SM4Serpent () { - Ciphers.push_back (shared_ptr (new CipherSM4 ())); Ciphers.push_back (shared_ptr (new CipherSerpent ())); + Ciphers.push_back (shared_ptr (new CipherSM4 ())); SupportedModes.push_back (shared_ptr (new EncryptionModeXTS ())); } @@ -421,12 +421,12 @@ namespace VeraCrypt SupportedModes.push_back (shared_ptr (new EncryptionModeXTS ())); } - // Twofish-Serpent-SM4 - TwofishSerpentSM4::TwofishSerpentSM4 () + // SM4-Twofish-Serpent + SM4TwofishSerpent::SM4TwofishSerpent () { - Ciphers.push_back (shared_ptr (new CipherSM4 ())); Ciphers.push_back (shared_ptr (new CipherSerpent ())); Ciphers.push_back (shared_ptr (new CipherTwofish ())); + Ciphers.push_back (shared_ptr (new CipherSM4 ())); SupportedModes.push_back (shared_ptr (new EncryptionModeXTS ())); } diff --git a/src/Volume/EncryptionAlgorithm.h b/src/Volume/EncryptionAlgorithm.h index de4cfe85..1b98cf19 100644 --- a/src/Volume/EncryptionAlgorithm.h +++ b/src/Volume/EncryptionAlgorithm.h @@ -96,10 +96,10 @@ namespace VeraCrypt TC_ENCRYPTION_ALGORITHM (CamelliaKuznyechik); TC_ENCRYPTION_ALGORITHM (CamelliaSerpent); TC_ENCRYPTION_ALGORITHM (SM4); - TC_ENCRYPTION_ALGORITHM (KuznyechikSM4); - TC_ENCRYPTION_ALGORITHM (SerpentSM4); + TC_ENCRYPTION_ALGORITHM (SM4Kuznyechik); + TC_ENCRYPTION_ALGORITHM (SM4Serpent); TC_ENCRYPTION_ALGORITHM (SM4Twofish); - TC_ENCRYPTION_ALGORITHM (TwofishSerpentSM4); + TC_ENCRYPTION_ALGORITHM (SM4TwofishSerpent); #undef TC_ENCRYPTION_ALGORITHM diff --git a/src/Volume/EncryptionTest.cpp b/src/Volume/EncryptionTest.cpp index 0d7ffba2..5a27c3a3 100644 --- a/src/Volume/EncryptionTest.cpp +++ b/src/Volume/EncryptionTest.cpp @@ -1076,53 +1076,53 @@ namespace VeraCrypt break; } } - else if (typeid (ea) == typeid (KuznyechikSM4)) + else if (typeid (ea) == typeid (SM4Kuznyechik)) { switch (testCase) { case 0: - if (crc != 0xb126b7f8) + if (crc != 0xa8179f71) throw TestFailed (SRC_POS); nTestsPerformed++; break; case 1: - if (crc != 0xa117004a) + if (crc != 0xaa372193) throw TestFailed (SRC_POS); nTestsPerformed++; break; case 2: - if (crc != 0xc561be46) + if (crc != 0x49b78057) throw TestFailed (SRC_POS); nTestsPerformed++; break; case 3: - if (crc != 0x47106ce3) + if (crc != 0x80718fd2) throw TestFailed (SRC_POS); nTestsPerformed++; break; } } - else if (typeid (ea) == typeid (SerpentSM4)) + else if (typeid (ea) == typeid (SM4Serpent)) { switch (testCase) { case 0: - if (crc != 0x40a9eaa5) + if (crc != 0x77cd332a) throw TestFailed (SRC_POS); nTestsPerformed++; break; case 1: - if (crc != 0xce6873f1) + if (crc != 0x3a2be34b) throw TestFailed (SRC_POS); nTestsPerformed++; break; case 2: - if (crc != 0x92cafcad) + if (crc != 0xfc1a6d4c) throw TestFailed (SRC_POS); nTestsPerformed++; break; case 3: - if (crc != 0x7e1463ca) + if (crc != 0xf9b54baf) throw TestFailed (SRC_POS); nTestsPerformed++; break; @@ -1154,27 +1154,27 @@ namespace VeraCrypt break; } } - else if (typeid (ea) == typeid (TwofishSerpentSM4)) + else if (typeid (ea) == typeid (SM4TwofishSerpent)) { switch (testCase) { case 0: - if (crc != 0x881b6e3d) + if (crc != 0x3ef6c86f) throw TestFailed (SRC_POS); nTestsPerformed++; break; case 1: - if (crc != 0x37ed1418) + if (crc != 0xe5202d6c) throw TestFailed (SRC_POS); nTestsPerformed++; break; case 2: - if (crc != 0x8e563eef) + if (crc != 0xa3acb43b) throw TestFailed (SRC_POS); nTestsPerformed++; break; case 3: - if (crc != 0xdcbc41ac) + if (crc != 0xe9d64477) throw TestFailed (SRC_POS); nTestsPerformed++; break; @@ -1333,15 +1333,15 @@ namespace VeraCrypt throw TestFailed (SRC_POS); nTestsPerformed++; } - else if (typeid (ea) == typeid (KuznyechikSM4)) + else if (typeid (ea) == typeid (SM4Kuznyechik)) { - if (crc != 0x8190551b) + if (crc != 0x23039a99) throw TestFailed (SRC_POS); nTestsPerformed++; } - else if (typeid (ea) == typeid (SerpentSM4)) + else if (typeid (ea) == typeid (SM4Serpent)) { - if (crc != 0x31408c47) + if (crc != 0xa7c3155b) throw TestFailed (SRC_POS); nTestsPerformed++; } @@ -1351,9 +1351,9 @@ namespace VeraCrypt throw TestFailed (SRC_POS); nTestsPerformed++; } - else if (typeid (ea) == typeid (TwofishSerpentSM4)) + else if (typeid (ea) == typeid (SM4TwofishSerpent)) { - if (crc != 0x033093e5) + if (crc != 0x9723753f) throw TestFailed (SRC_POS); nTestsPerformed++; } diff --git a/src/Volume/VolumeLayout.cpp b/src/Volume/VolumeLayout.cpp index e7e9f721..1fa1a7f8 100644 --- a/src/Volume/VolumeLayout.cpp +++ b/src/Volume/VolumeLayout.cpp @@ -120,10 +120,10 @@ namespace VeraCrypt SupportedEncryptionAlgorithms.push_back (shared_ptr (new SerpentAES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr (new SerpentTwofishAES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr (new TwofishSerpent ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr (new KuznyechikSM4 ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr (new SerpentSM4 ())); + SupportedEncryptionAlgorithms.push_back (shared_ptr (new SM4Kuznyechik ())); + SupportedEncryptionAlgorithms.push_back (shared_ptr (new SM4Serpent ())); SupportedEncryptionAlgorithms.push_back (shared_ptr (new SM4Twofish ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr (new TwofishSerpentSM4 ())); + SupportedEncryptionAlgorithms.push_back (shared_ptr (new SM4TwofishSerpent ())); SupportedEncryptionModes.push_back (shared_ptr (new EncryptionModeXTS ())); #else SupportedEncryptionModes.push_back (shared_ptr (new EncryptionModeWolfCryptXTS ())); @@ -174,10 +174,10 @@ namespace VeraCrypt SupportedEncryptionAlgorithms.push_back (shared_ptr (new SerpentAES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr (new SerpentTwofishAES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr (new TwofishSerpent ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr (new KuznyechikSM4 ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr (new SerpentSM4 ())); + SupportedEncryptionAlgorithms.push_back (shared_ptr (new SM4Kuznyechik ())); + SupportedEncryptionAlgorithms.push_back (shared_ptr (new SM4Serpent ())); SupportedEncryptionAlgorithms.push_back (shared_ptr (new SM4Twofish ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr (new TwofishSerpentSM4 ())); + SupportedEncryptionAlgorithms.push_back (shared_ptr (new SM4TwofishSerpent ())); SupportedEncryptionModes.push_back (shared_ptr (new EncryptionModeXTS ())); #else