From 44a9f8bcff1c853dbe1e6c2928c824013700c6ad Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 18 May 2025 18:31:39 +0900 Subject: [PATCH] Remove SM4 support! --- Translations/Language.ar.xml | 1 - Translations/Language.be.xml | 1 - Translations/Language.bg.xml | 1 - Translations/Language.ca.xml | 1 - Translations/Language.co.xml | 1 - Translations/Language.cs.xml | 1 - Translations/Language.da.xml | 1 - Translations/Language.de.xml | 1 - Translations/Language.el.xml | 1 - Translations/Language.es.xml | 1 - Translations/Language.et.xml | 1 - Translations/Language.eu.xml | 1 - Translations/Language.fa.xml | 1 - Translations/Language.fi.xml | 1 - Translations/Language.fr.xml | 1 - Translations/Language.he.xml | 1 - Translations/Language.hu.xml | 1 - Translations/Language.id.xml | 1 - Translations/Language.it.xml | 1 - Translations/Language.ja.xml | 1 - Translations/Language.ka.xml | 1 - Translations/Language.ko.xml | 1 - Translations/Language.lv.xml | 1 - Translations/Language.my.xml | 1 - Translations/Language.nb.xml | 1 - Translations/Language.nl.xml | 1 - Translations/Language.nn.xml | 1 - Translations/Language.pl.xml | 1 - Translations/Language.pt-br.xml | 1 - Translations/Language.ro.xml | 1 - Translations/Language.ru.xml | 1 - Translations/Language.sk.xml | 1 - Translations/Language.sl.xml | 1 - Translations/Language.sv.xml | 1 - Translations/Language.th.xml | 1 - Translations/Language.tr.xml | 1 - Translations/Language.uk.xml | 1 - Translations/Language.uz.xml | 1 - Translations/Language.vi.xml | 1 - Translations/Language.zh-cn.xml | 1 - Translations/Language.zh-hk.xml | 1 - Translations/Language.zh-tw.xml | 1 - doc/chm/en/VeraCrypt.hhc | 4 - doc/chm/en/VeraCrypt.hhp | 1 - doc/chm/ru/VeraCrypt.ru.hhc | 4 - doc/chm/ru/VeraCrypt.ru.hhp | 1 - doc/chm/zh-cn/VeraCrypt.zh-cn.hhc | 4 - doc/chm/zh-cn/VeraCrypt.zh-cn.hhp | 1 - doc/html/en/Acknowledgements.html | 2 +- doc/html/en/Cascades.html | 27 -- doc/html/en/Command Line Usage.html | 8 +- doc/html/en/Documentation.html | 2 +- doc/html/en/Encryption Algorithms.html | 64 ----- doc/html/en/FAQ.html | 2 +- doc/html/en/Release Notes.html | 1 - doc/html/en/Serpent.html | 2 +- doc/html/ru/Cascades.html | 27 -- doc/html/ru/Documentation.html | 2 +- doc/html/ru/Encryption Algorithms.html | 65 +---- doc/html/ru/Release Notes.html | 1 - doc/html/ru/Serpent.html | 2 +- doc/html/zh-cn/Cascades.html | 8 - doc/html/zh-cn/Documentation.html | 2 +- doc/html/zh-cn/Encryption Algorithms.html | 65 +---- doc/html/zh-cn/Release Notes.html | 1 - doc/html/zh-cn/Serpent.html | 2 +- src/Common/Crypto.c | 24 -- src/Common/Crypto.h | 6 +- src/Common/Dlgcode.c | 24 +- src/Common/Language.xml | 1 - src/Common/Tests.c | 257 +---------------- src/Core/Unix/Linux/CoreLinux.cpp | 5 - src/Crypto/Crypto.vcxproj | 6 - src/Crypto/Crypto.vcxproj.filters | 9 - src/Crypto/Sources | 2 - src/Driver/Driver.vcxproj | 6 - src/Driver/Driver.vcxproj.filters | 9 - src/Format/Tcformat.c | 8 - .../Forms/EncryptionOptionsWizardPage.cpp | 2 - src/Main/GraphicUserInterface.cpp | 4 - src/Release/Setup Files/Product64.wxs | 12 - src/SetupDLL/Setup.c | 4 - src/Volume/Cipher.cpp | 68 ----- src/Volume/Cipher.h | 1 - src/Volume/EncryptionAlgorithm.cpp | 49 ---- src/Volume/EncryptionAlgorithm.h | 5 - src/Volume/EncryptionTest.cpp | 261 +----------------- src/Volume/Volume.make | 6 - src/Volume/VolumeLayout.cpp | 10 - 89 files changed, 22 insertions(+), 1097 deletions(-) diff --git a/Translations/Language.ar.xml b/Translations/Language.ar.xml index 55e2ce3f..5119330d 100644 --- a/Translations/Language.ar.xml +++ b/Translations/Language.ar.xml @@ -1644,7 +1644,6 @@ خطأ: نقطة تركيب الحجم محظورة لأنها تحل محل دليل نظام محمي.\n\nيرجى اختيار نقطة تركيب مختلفة. خطأ: نقطة تركيب الحجم غير مسموح بها لأنها تحل محل دليل مدرج ضمن متغير البيئة PATH.\n\nيرجى اختيار نقطة تركيب مختلفة. [وضع غير آمن] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.be.xml b/Translations/Language.be.xml index 38c3fe9b..92005d27 100644 --- a/Translations/Language.be.xml +++ b/Translations/Language.be.xml @@ -1644,7 +1644,6 @@ ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point. ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point. [INSECURE MODE] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.bg.xml b/Translations/Language.bg.xml index cfbaffe8..213692aa 100644 --- a/Translations/Language.bg.xml +++ b/Translations/Language.bg.xml @@ -1644,7 +1644,6 @@ ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point. ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point. [INSECURE MODE] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.ca.xml b/Translations/Language.ca.xml index 092ea913..c00b74fd 100644 --- a/Translations/Language.ca.xml +++ b/Translations/Language.ca.xml @@ -1644,7 +1644,6 @@ ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point. ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point. [INSECURE MODE] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.co.xml b/Translations/Language.co.xml index 563fa20a..1d9986ef 100644 --- a/Translations/Language.co.xml +++ b/Translations/Language.co.xml @@ -1663,7 +1663,6 @@ Information about Corsican localization: SBAGLIU : U puntu du muntatura di u vulume hè bluccatu perchè ellu rimpiazzeghja un cartulare prutettu di u sistema.\n\nCi vole à sceglie un puntu du muntatura sfarente. SBAGLIU : U puntu du muntatura di u vulume ùn hè micca permessu perchè ellu rimpiazzeghja un cartulare chì face parte di a variabile d’ambiente PATH.\n\nCi vole à sceglie un puntu du muntatura sfarente. [MODU NONSICURU] - SM4 hè una norma di ciframentu à u bloccu, publicata da l'Amministrazione naziunale chinese di crittografia in u 2006, chì face parte di a norma GB/T 32907-2016. Chjave di 128 bit è bloccu di 128 bit. U modu d’operazione hè XTS. SM4 hè impiegata assai in e norme naziunale chinese è in l’appiecazioni cummerciale. diff --git a/Translations/Language.cs.xml b/Translations/Language.cs.xml index d425bedd..ae7747de 100644 --- a/Translations/Language.cs.xml +++ b/Translations/Language.cs.xml @@ -1644,7 +1644,6 @@ CHYBA: Připojovací bod svazku je blokován, jelikož je nadřazen chráněnému systémovému adresáři.\n\nProsím, zvolte jiný přípojovací bod. CHYBA: Připojovací bod svazku není povolen, jelikož přepisuje adresář, jenž je součástí proměnného prostředí PATH.\n\nProsím, vyberte jiný připojovací bod. [NEZABEZPEČENÝ REŽIM] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.da.xml b/Translations/Language.da.xml index 530f0eaa..b72fee2b 100644 --- a/Translations/Language.da.xml +++ b/Translations/Language.da.xml @@ -1644,7 +1644,6 @@ ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point. ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point. [INSECURE MODE] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.de.xml b/Translations/Language.de.xml index 3e08ca90..0bc2c6fe 100644 --- a/Translations/Language.de.xml +++ b/Translations/Language.de.xml @@ -1647,7 +1647,6 @@ FEHLER: Der Einhängepunkt ist blockiert, da er ein geschütztes Systemverzeichnis überschreibt.\n\nBitte wählen Sie einen anderen Einhängepunkt. FEHLER: Der Einhängepunkt ist unzulässig, da er ein Verzeichnis überschreibt, das zur PATH-Umgebungsvariable gehört.\n\nBitte wählen Sie einen anderen Einhängepunkt. [UNSICHERER MODUS] - SM4 ist ein Blockchiffre-Standard, der 2006 von der nationalen chinesischen Behörde für Kryptografie im Rahmen des Standards GB/T 32907-2016 veröffentlicht wurde. 128 Bit Schlüssellänge, 128 Bit Blockgröße.\nArbeitet im XTS-Modus. Findet breite Anwendung in chinesischen nationalen Standards und kommerziellen Anwendungen. diff --git a/Translations/Language.el.xml b/Translations/Language.el.xml index 0b69d7b7..1f8c97c0 100644 --- a/Translations/Language.el.xml +++ b/Translations/Language.el.xml @@ -1644,7 +1644,6 @@ ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point. ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point. [INSECURE MODE] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.es.xml b/Translations/Language.es.xml index d3c26b42..eeae7714 100644 --- a/Translations/Language.es.xml +++ b/Translations/Language.es.xml @@ -1644,7 +1644,6 @@ ERROR: El punto de montaje del volumen está bloqueado porque sobrescribe un directorio protegido del sistema.\n\nElija un punto de montaje diferente. ERROR: No se permite el punto de montaje del volumen porque sobrescribe un directorio que forma parte de la ruta PATH.\n\nElija un punto de montaje diferente. [MODO INSEGURO] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.et.xml b/Translations/Language.et.xml index 847f1ddd..c0302863 100644 --- a/Translations/Language.et.xml +++ b/Translations/Language.et.xml @@ -1644,7 +1644,6 @@ ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point. ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point. [INSECURE MODE] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.eu.xml b/Translations/Language.eu.xml index 0e2ee4a2..8642f586 100644 --- a/Translations/Language.eu.xml +++ b/Translations/Language.eu.xml @@ -1644,7 +1644,6 @@ ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point. ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point. [INSECURE MODE] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.fa.xml b/Translations/Language.fa.xml index a0fb9092..a3e984b2 100644 --- a/Translations/Language.fa.xml +++ b/Translations/Language.fa.xml @@ -1644,7 +1644,6 @@ ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point. ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point. [INSECURE MODE] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.fi.xml b/Translations/Language.fi.xml index 19a933f3..a4b35921 100644 --- a/Translations/Language.fi.xml +++ b/Translations/Language.fi.xml @@ -1644,7 +1644,6 @@ VIRHE: Taltion liitoskohta on estetty, koska se korvaa suojatun järjestelmäkansion.\n\nValitse toinen liitoskohta. VIRHE: Taltion liitoskohta ei ole sallittu, koska se korvaa PATH-ympäristömuuttujaan kuuluvan sijainnin.\n\nValitse toinen liitoskohta. [EPÄTURVALLINEN TILA] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.fr.xml b/Translations/Language.fr.xml index e594e350..53f6a07a 100644 --- a/Translations/Language.fr.xml +++ b/Translations/Language.fr.xml @@ -1644,7 +1644,6 @@ ERREUR : Le point de montage du volume est bloqué car il remplace un répertoire système protégé.\n\nVeuillez choisir un autre point de montage. ERREUR : Le point de montage du volume n'est pas autorisé car il remplace un répertoire faisant partie de la variable d'environnement PATH.\n\nVeuillez choisir un autre point de montage. [MODE NON SÉCURISÉ] - SM4 est un standard de chiffrement par blocs publié en 2006 par l’Administration nationale de la cryptographie de Chine, dans le cadre de la norme GB/T 32907-2016. Clé de 128 bits et bloc de 128 bits. Le mode opératoire est XTS. Il a été largement adopté dans les normes nationales chinoises et dans des applications commerciales. diff --git a/Translations/Language.he.xml b/Translations/Language.he.xml index 4b35b109..910efc63 100644 --- a/Translations/Language.he.xml +++ b/Translations/Language.he.xml @@ -1645,7 +1645,6 @@ ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point. ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point. [INSECURE MODE] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.hu.xml b/Translations/Language.hu.xml index a2bc068f..49280001 100644 --- a/Translations/Language.hu.xml +++ b/Translations/Language.hu.xml @@ -1644,7 +1644,6 @@ ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point. ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point. [INSECURE MODE] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.id.xml b/Translations/Language.id.xml index b0ef56f2..87e7c61e 100644 --- a/Translations/Language.id.xml +++ b/Translations/Language.id.xml @@ -1644,7 +1644,6 @@ ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point. ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point. [INSECURE MODE] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.it.xml b/Translations/Language.it.xml index 0403466a..d14a3905 100644 --- a/Translations/Language.it.xml +++ b/Translations/Language.it.xml @@ -1644,7 +1644,6 @@ ERRORE: Il punto di montaggio del volume è bloccato perché sovrascrive una directory di sistema protetta.\n\nScegli un punto di montaggio diverso. ERRORE: Il punto di montaggio del volume non è consentito perché sovrascrive una directory che fa parte della variabile d'ambiente PATH.\n\nScegli un punto di montaggio diverso. [MODALITÀ NON SICURA] - SM4 è uno standard di cifratura a blocchi pubblicato dall'Amministrazione Cinese per la Crittografia Nazionale nel 2006 come parte dello standard GB/T 32907-2016. Chiave a 128 bit, blocco a 128 bit. La modalità operativa è XTS. È ampiamente utilizzato negli standard nazionali cinesi e nelle applicazioni commerciali. diff --git a/Translations/Language.ja.xml b/Translations/Language.ja.xml index 91c15e85..8c33ad3a 100644 --- a/Translations/Language.ja.xml +++ b/Translations/Language.ja.xml @@ -1644,7 +1644,6 @@ エラー: ボリュームのマウントポイントは、保護されたシステムディレクトリと競合するためブロックされました。\n\n別のマウントポイントを選択してください。 エラー: ボリュームのマウントポイントは、PATH環境変数に含まれるディレクトリを上書きするため使用できません。\n\n別のマウントポイントを選択してください。 [非セキュアモード] - SM4(エスエムフォー)とは、2006年に中国国家暗号管理局によって発表されたブロック暗号規格であり、GB/T 32907-2016標準の一部を成しています。128ビットキー、128ビットブロックを使用します。動作モードはXTSです。SM4は中国の国家標準および商用アプリケーションに広く使用されています。 diff --git a/Translations/Language.ka.xml b/Translations/Language.ka.xml index 700861d1..7bd070cf 100644 --- a/Translations/Language.ka.xml +++ b/Translations/Language.ka.xml @@ -1644,7 +1644,6 @@ ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point. ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point. [INSECURE MODE] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.ko.xml b/Translations/Language.ko.xml index 8a8bbd28..faa20298 100644 --- a/Translations/Language.ko.xml +++ b/Translations/Language.ko.xml @@ -1644,7 +1644,6 @@ 오류: 볼륨 마운트 위치가 보호된 시스템 디렉터리를 덮어쓰기 때문에 차단되었습니다.\n\n다른 마운트 위치를 선택하세요. 오류: 볼륨 마운트 위치가 PATH 환경 변수의 일부인 디렉터리를 덮어쓰기 때문에 허용되지 않습니다.\n\n다른 마운트 위치를 선택하세요. [비보안 모드] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.lv.xml b/Translations/Language.lv.xml index 70a116a8..5e783735 100644 --- a/Translations/Language.lv.xml +++ b/Translations/Language.lv.xml @@ -1644,7 +1644,6 @@ ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point. ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point. [INSECURE MODE] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.my.xml b/Translations/Language.my.xml index b1fcc775..c5be5d95 100644 --- a/Translations/Language.my.xml +++ b/Translations/Language.my.xml @@ -1646,7 +1646,6 @@ ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point. ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point. [INSECURE MODE] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.nb.xml b/Translations/Language.nb.xml index 80aab7e0..9a87cb37 100644 --- a/Translations/Language.nb.xml +++ b/Translations/Language.nb.xml @@ -1644,7 +1644,6 @@ FEIL: Volumets monteringspunkt er blokkert fordi det overstyrer en beskyttet systemkatalog.\n\nVennligst velg et annet monteringspunkt. FEIL: Volumets monteringspunkt er ikke tillatt fordi det overstyrer en katalog som er en del av PATH-miljøvariabelen.\n\nVennligst velg et annet monteringspunkt. [USIKKER MODUS] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.nl.xml b/Translations/Language.nl.xml index eda18ea6..5a498ceb 100644 --- a/Translations/Language.nl.xml +++ b/Translations/Language.nl.xml @@ -1644,7 +1644,6 @@ FOUT: Het koppelpunt van het volume is geblokkeerd omdat het een beveiligde systeemmap overschrijft.\n\nKies een ander koppelpunt. FOUT: het koppelpunt voor het volume is niet toegestaan omdat het een map overschrijft die deel uitmaakt van de omgevingsvariabele PATH.\n\nKies een ander koppelpunt. [ONVEILIGE MODUS] - SM4 is een blokcijferstandaard die in 2006 werd gepubliceerd door de Chinese Nationale Cryptografieadministratie als onderdeel van de GB/T 32907-2016-standaard. 128-bit sleutel, 128-bit blok. Werkingswijze is XTS. Het wordt veel gebruikt in Chinese nationale standaarden en commerciële toepassingen. diff --git a/Translations/Language.nn.xml b/Translations/Language.nn.xml index 025d8b8c..35a60ad6 100644 --- a/Translations/Language.nn.xml +++ b/Translations/Language.nn.xml @@ -1644,7 +1644,6 @@ ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point. ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point. [INSECURE MODE] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.pl.xml b/Translations/Language.pl.xml index 5ab8b310..bf5ac059 100644 --- a/Translations/Language.pl.xml +++ b/Translations/Language.pl.xml @@ -1644,7 +1644,6 @@ BŁĄD: Punkt podłączania wolumenu jest zablokowany, ponieważ nadpisuje chroniony katalog systemowy.\n\nWybierz inny punkt podłączania. BŁĄD: Punkt podłączania wolumenu nie jest dozwolony, ponieważ nadpisuje katalog, który jest częścią zmiennej środowiskowej PATH.\n\nWybierz inny punkt podłączania. [TRYB NIEBEZPIECZNY] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.pt-br.xml b/Translations/Language.pt-br.xml index c3bc79a9..070ade27 100644 --- a/Translations/Language.pt-br.xml +++ b/Translations/Language.pt-br.xml @@ -1644,7 +1644,6 @@ ERRO: O ponto de montagem do volume está bloqueado porque substitui um diretório protegido do sistema.\n\nPor favor, escolha um ponto de montagem diferente. ERRO: O ponto de montagem do volume não é permitido porque substitui um diretório que faz parte da variável de ambiente PATH.\n\nPor favor, escolha um ponto de montagem diferente. [MODO INSEGURO] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.ro.xml b/Translations/Language.ro.xml index 6cd79ffd..da0fc056 100644 --- a/Translations/Language.ro.xml +++ b/Translations/Language.ro.xml @@ -1644,7 +1644,6 @@ EROARE: Punctul de montare al volumului este blocat deoarece suprascrie un director de sistem protejat.\n\nVă rugăm să alegeți un alt punct de montare. EROARE: Punctul de montare al volumului nu este permis deoarece suprascrie un director care face parte din variabila de mediu PATH.\n\nVă rugăm să alegeți un alt punct de montare. [MOD INSECURIZAT] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.ru.xml b/Translations/Language.ru.xml index 91503d46..ad82d956 100644 --- a/Translations/Language.ru.xml +++ b/Translations/Language.ru.xml @@ -1644,7 +1644,6 @@ ОШИБКА: Точка монтирования тома заблокирована, так как она переопределяет защищённую системную папку.\n\nВыберите другую точку монтирования. ОШИБКА: Точка монтирования тома не разрешена, так как она переопределяет папку, которая является частью переменной среды PATH.\n\nВыберите другую точку монтирования. [НЕБЕЗОПАСНЫЙ РЕЖИМ] - Стандарт блочного шифрования, опубликованный Китайским национальным управлением криптографии в 2006 г. в рамках стандарта GB/T 32907-2016. Ключ: 128 бит, блок: 128 бит. Режим работы: XTS. Широко используется в национальных стандартах Китая и в коммерческих приложениях. diff --git a/Translations/Language.sk.xml b/Translations/Language.sk.xml index bb3f653a..b11d26a0 100644 --- a/Translations/Language.sk.xml +++ b/Translations/Language.sk.xml @@ -1644,7 +1644,6 @@ ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point. ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point. [INSECURE MODE] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.sl.xml b/Translations/Language.sl.xml index af16a33e..b4e19b0a 100644 --- a/Translations/Language.sl.xml +++ b/Translations/Language.sl.xml @@ -1644,7 +1644,6 @@ NAPAKA: Tocka priklopa nosilca je blokirana, ker prekriva zašciteno sistemsko mapo.\n\nIzberite drugo tocko priklopa. NAPAKA: Tocka priklopa nosilca ni dovoljena, ker prekriva mapo, ki je del okoljske spremenljivke PATH.\n\nIzberite drugo tocko priklopa. [NEVAREN NACIN] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.sv.xml b/Translations/Language.sv.xml index b70ce011..76d5082f 100644 --- a/Translations/Language.sv.xml +++ b/Translations/Language.sv.xml @@ -1644,7 +1644,6 @@ FEL: Volymens monteringspunkt är blockerad eftersom den skriver över en skyddad systemkatalog.\n\nVar god välj en annan monteringspunkt. FEL: Volymens monteringspunkt är inte tillåten eftersom den skriver över en katalog som är en del av miljövariabeln PATH.\n\nVar god välj en annan monteringspunkt. [OSÄKERT] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.th.xml b/Translations/Language.th.xml index fc28c91d..6b85f58a 100644 --- a/Translations/Language.th.xml +++ b/Translations/Language.th.xml @@ -1645,7 +1645,6 @@ ข้อผิดพลาด: จุดเชื่อมต่อโวลุ่มถูกบล็อกเนื่องจากไปทับซ้อนกับไดเรกทอรีระบบที่ได้รับการป้องกัน\n\nกรุณาเลือกจุดเชื่อมต่ออื่น ข้อผิดพลาด: จุดเชื่อมต่อโวลุ่มไม่ได้รับอนุญาตเนื่องจากไปทับซ้อนกับไดเรกทอรีที่เป็นส่วนหนึ่งของตัวแปร PATH\n\nกรุณาเลือกจุดเชื่อมต่ออื่น [โหมดไม่ปลอดภัย] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.tr.xml b/Translations/Language.tr.xml index d2d7a5c1..6d27fa15 100644 --- a/Translations/Language.tr.xml +++ b/Translations/Language.tr.xml @@ -1644,7 +1644,6 @@ HATA: Birim bağlama noktası, korunan bir sistem dizinini geçersiz kıldığı için engellendi.\n\nLütfen farklı bir bağlama noktası seçin. HATA: Birim bağlama noktası, PATH ortam değişkeninin bir parçası olan bir dizini geçersiz kıldığı için izin verilmiyor.\n\nLütfen farklı bir bağlama noktası seçin. [GÜVENSİZ MOD] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.uk.xml b/Translations/Language.uk.xml index c8c73893..58c61bf4 100644 --- a/Translations/Language.uk.xml +++ b/Translations/Language.uk.xml @@ -1644,7 +1644,6 @@ ПОМИЛКА: Точка монтування тому заблокована, оскільки вона заміщує захищений системний каталог.\n\nБудь ласка, оберіть іншу точку монтування. ПОМИЛКА: Точка монтування тому не дозволена, оскільки вона заміщує каталог, який є частиною змінної середовища PATH.\n\nБудь ласка, оберіть іншу точку монтування. [НЕБЕЗПЕЧНИЙ РЕЖИМ] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.uz.xml b/Translations/Language.uz.xml index 6dad4a52..2994975c 100644 --- a/Translations/Language.uz.xml +++ b/Translations/Language.uz.xml @@ -1644,7 +1644,6 @@ ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point. ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point. [INSECURE MODE] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.vi.xml b/Translations/Language.vi.xml index b7baf17a..69b09c4c 100644 --- a/Translations/Language.vi.xml +++ b/Translations/Language.vi.xml @@ -1644,7 +1644,6 @@ ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point. ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point. [INSECURE MODE] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.zh-cn.xml b/Translations/Language.zh-cn.xml index fad068de..e960dc2c 100644 --- a/Translations/Language.zh-cn.xml +++ b/Translations/Language.zh-cn.xml @@ -1645,7 +1645,6 @@ 错误:卷挂载点被阻止,因为它覆盖了受保护的系统目录。\n\n请选择其他挂载点。 错误:卷挂载点不允许使用,因为它覆盖了 PATH 环境变量中的目录。\n\n请选择其他挂载点。 [不安全模式] - SM4 是由中国国家密码管理局在 2006 年发布的分组密码标准,作为 GB/T 32907-2016 标准的一部分。128 位密钥,128 位块。操作方式 XTS。它在中国国家标准和商业应用中被广泛使用。 diff --git a/Translations/Language.zh-hk.xml b/Translations/Language.zh-hk.xml index 30c2dd7f..ec144709 100644 --- a/Translations/Language.zh-hk.xml +++ b/Translations/Language.zh-hk.xml @@ -1644,7 +1644,6 @@ 錯誤:磁碟區掛載點因其覆寫系統受保護的路徑而被阻止。\n\n請選擇另一個掛載點。 錯誤: 磁碟區掛載點因其覆寫的路徑屬於 PATH 環境變數的一部份而不被接納。\n\n請選擇另一個掛載點。 [不安全模式] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/Translations/Language.zh-tw.xml b/Translations/Language.zh-tw.xml index 00193a1c..37e739f5 100644 --- a/Translations/Language.zh-tw.xml +++ b/Translations/Language.zh-tw.xml @@ -1644,7 +1644,6 @@ ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point. ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point. [INSECURE MODE] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/doc/chm/en/VeraCrypt.hhc b/doc/chm/en/VeraCrypt.hhc index 6aa69798..3c2223c7 100644 --- a/doc/chm/en/VeraCrypt.hhc +++ b/doc/chm/en/VeraCrypt.hhc @@ -172,10 +172,6 @@ -
  • - - -
  • diff --git a/doc/chm/en/VeraCrypt.hhp b/doc/chm/en/VeraCrypt.hhp index a64132c8..66e0abe6 100644 --- a/doc/chm/en/VeraCrypt.hhp +++ b/doc/chm/en/VeraCrypt.hhp @@ -143,7 +143,6 @@ Serpent.html SHA-256.html SHA-512.html Sharing over Network.html -SM4.html Source Code.html Standard Compliance.html Streebog.html diff --git a/doc/chm/ru/VeraCrypt.ru.hhc b/doc/chm/ru/VeraCrypt.ru.hhc index 5e1b9c2c..01238ff9 100644 --- a/doc/chm/ru/VeraCrypt.ru.hhc +++ b/doc/chm/ru/VeraCrypt.ru.hhc @@ -172,10 +172,6 @@ -
  • - - -
  • diff --git a/doc/chm/ru/VeraCrypt.ru.hhp b/doc/chm/ru/VeraCrypt.ru.hhp index a6b0d76f..1420f362 100644 --- a/doc/chm/ru/VeraCrypt.ru.hhp +++ b/doc/chm/ru/VeraCrypt.ru.hhp @@ -143,7 +143,6 @@ Serpent.html SHA-256.html SHA-512.html Sharing over Network.html -SM4.html Source Code.html Standard Compliance.html Streebog.html diff --git a/doc/chm/zh-cn/VeraCrypt.zh-cn.hhc b/doc/chm/zh-cn/VeraCrypt.zh-cn.hhc index 3fbac102..9a369514 100644 --- a/doc/chm/zh-cn/VeraCrypt.zh-cn.hhc +++ b/doc/chm/zh-cn/VeraCrypt.zh-cn.hhc @@ -172,10 +172,6 @@ -
  • - - -
  • diff --git a/doc/chm/zh-cn/VeraCrypt.zh-cn.hhp b/doc/chm/zh-cn/VeraCrypt.zh-cn.hhp index ce06a913..d7746ca0 100644 --- a/doc/chm/zh-cn/VeraCrypt.zh-cn.hhp +++ b/doc/chm/zh-cn/VeraCrypt.zh-cn.hhp @@ -144,7 +144,6 @@ Security Tokens & Smart Cards.html Serpent.html SHA-256.html SHA-512.html -SM4.html Sharing over Network.html Source Code.html Standard Compliance.html diff --git a/doc/html/en/Acknowledgements.html b/doc/html/en/Acknowledgements.html index 8fa6347b..7083ed54 100644 --- a/doc/html/en/Acknowledgements.html +++ b/doc/html/en/Acknowledgements.html @@ -47,7 +47,7 @@ Dobbertin, Antoon Bosselaers, Bart Preneel, Paulo S. L. M. Barreto.

    Andreas Becker for designing VeraCrypt logo and icons.

    Xavier de Carné de Carnavalet who proposed a speed optimization for PBKDF2 that reduced mount/boot time by half.

    -

    kerukuro for cppcrypto library (http://cppcrypto.sourceforge.net/) from which Kuznyechik and SM4 ciphers implementation was taken.

    +

    kerukuro for cppcrypto library (http://cppcrypto.sourceforge.net/) from which Kuznyechik cipher implementation was taken.


    Dieter Baron and Thomas Klausner who wrote the libzip library.


    diff --git a/doc/html/en/Cascades.html b/doc/html/en/Cascades.html index f484cd3f..0f0e9f4d 100644 --- a/doc/html/en/Cascades.html +++ b/doc/html/en/Cascades.html @@ -87,33 +87,6 @@ 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.

    -

    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 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. -

    - -

    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 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. -

    - -

    SM4-Twofish

    -

    -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 Twofish (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. -

    - -

    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 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/Command Line Usage.html b/doc/html/en/Command Line Usage.html index a96289b3..0b005da9 100644 --- a/doc/html/en/Command Line Usage.html +++ b/doc/html/en/Command Line Usage.html @@ -245,16 +245,12 @@ It must be followed by a parameter indicating the PRF hash algorithm to use when (Only with /create)
    It must be followed by a parameter indicating the encryption algorithm to use. The default is AES if this switch is not specified. The parameter can have the following values (case insensitive):
      -
    • AES
    • Serpent
    • Twofish
    • Camellia
    • Kuznyechik
    • SM4
    • AES(Twofish)
    • AES(Twofish(Serpent))
    • Serpent(AES)
    • Serpent(Twofish(AES))
    • Twofish(Serpent)
    • +
    • AES
    • Serpent
    • Twofish
    • Camellia
    • Kuznyechik
    • AES(Twofish)
    • AES(Twofish(Serpent))
    • Serpent(AES)
    • Serpent(Twofish(AES))
    • Twofish(Serpent)
    • Camellia(Kuznyechik)
    • Kuznyechik(Twofish)
    • Camellia(Serpent)
    • Kuznyechik(AES)
    • Kuznyechik(Serpent(Camellia))
    • -
    • Kuznyechik(SM4)
    • -
    • Serpent(SM4)
    • -
    • SM4(Twofish)
    • -
    • Twofish(Serpent(SM4))
    @@ -316,7 +312,7 @@ If it is followed by n or no: the password dia

    Syntax

    VeraCrypt.exe [/tc] [/hash {sha256|sha-256|sha512|sha-512|whirlpool |blake2s|blake2s-256}][/a [devices|favorites]] [/b] [/c [y|n|f]] [/d [drive letter]] [/e] [/f] [/h [y|n]] [/k keyfile or search path] [tryemptypass [y|n]] [/l drive letter] [/m {bk|rm|recovery|ro|sm|ts|noattach}] [/p password] [/pim pimvalue] [/q [background|preferences]] [/s] [/tokenlib path] [/v volume] [/w]

    -

    "VeraCrypt Format.exe" [/n] [/create] [/size number[{K|M|G|T}]] [/p password]  [/encryption {AES | Serpent | Twofish | Camellia | Kuznyechik | SM4 | AES(Twofish) | AES(Twofish(Serpent)) | Serpent(AES) | Serpent(Twofish(AES)) | Twofish(Serpent) | Camellia(Kuznyechik) | Kuznyechik(Twofish) | Camellia(Serpent) | Kuznyechik(AES) | Kuznyechik(Serpent(Camellia)) | Kuznyechik(SM4) | Serpent(SM4) | SM4(Twofish) | Twofish(Serpent(SM4))}] [/hash {sha256|sha-256|sha512|sha-512|whirlpool|blake2s|blake2s-256}] +

    "VeraCrypt Format.exe" [/n] [/create] [/size number[{K|M|G|T}]] [/p password]  [/encryption {AES | Serpent | Twofish | Camellia | Kuznyechik | AES(Twofish) | AES(Twofish(Serpent)) | Serpent(AES) | Serpent(Twofish(AES)) | Twofish(Serpent) | Camellia(Kuznyechik) | Kuznyechik(Twofish) | Camellia(Serpent) | Kuznyechik(AES) | Kuznyechik(Serpent(Camellia)))}] [/hash {sha256|sha-256|sha512|sha-512|whirlpool|blake2s|blake2s-256}] [/filesystem {None|FAT|NTFS|ExFAT|ReFS}] [/dynamic] [/force] [/silent] [/noisocheck] [FastCreateFile] [/quick]

    Note that the order in which options are specified does not matter.

    Examples

    diff --git a/doc/html/en/Documentation.html b/doc/html/en/Documentation.html index bdee99cf..ae864742 100644 --- a/doc/html/en/Documentation.html +++ b/doc/html/en/Documentation.html @@ -78,7 +78,7 @@
  • Hash Algorithms
      diff --git a/doc/html/en/Encryption Algorithms.html b/doc/html/en/Encryption Algorithms.html index 7873cd5d..6c27dfe9 100644 --- a/doc/html/en/Encryption Algorithms.html +++ b/doc/html/en/Encryption Algorithms.html @@ -115,18 +115,6 @@ R. Anderson, E. Biham, L. Knudsen XTS - - - SM4 - - Data Assurance & Communication Security Center, Chinese Academy of Sciences
      GB/T 32907-2016 - - 128 - - 128 - - XTS - Twofish @@ -261,58 +249,6 @@ XTS XTS - - - SM4-Kuznyechik - -   - - 128; 256 - - 128 - - XTS - - - - - SM4-Serpent - -   - - 128; 256 - - 128 - - XTS - - - - - SM4-Twofish - -   - - 128; 256 - - 128 - - XTS - - - - - SM4-Twofish-Serpent - -   - - 128; 256; 256 - - 128 - - XTS - - diff --git a/doc/html/en/FAQ.html b/doc/html/en/FAQ.html index b73c4754..c8f0b13b 100644 --- a/doc/html/en/FAQ.html +++ b/doc/html/en/FAQ.html @@ -712,7 +712,7 @@ Windows built-in backup utility looks only for physical driver, that's why it do
      VeraCrypt uses block ciphers (AES, Serpent, Twofish) for its encryption. Quantum attacks against these block ciphers are just a faster brute-force since the best know attack against these algorithms is exhaustive search (related keys attacks are irrelevant to our case because all keys are random and independent from each other).
      -Since VeraCrypt always uses 256-bit random and independent keys (except for SM4 cipher which uses 128-bit key by design), we are assured of a 128-bit security
      +Since VeraCrypt always uses 256-bit random and independent keys, we are assured of a 128-bit security
      level against quantum algorithms which makes VeraCrypt encryption immune to such attacks.
      How to make a VeraCrypt volume available for Windows Search indexing?
      diff --git a/doc/html/en/Release Notes.html b/doc/html/en/Release Notes.html index a865706a..a87ff08f 100644 --- a/doc/html/en/Release Notes.html +++ b/doc/html/en/Release Notes.html @@ -44,7 +44,6 @@
      • All OSes:
          -
        • Add support for the Chinese encryption algorithm SM4 (System encryption not supported yet).
        • Fix whirlpool implementation for big-endian platforms (GH #1529).
        • Rename "Dismount All" to "Unmount All" in UI. Use ALT+u as new accelerator key instead of ALT+s
        • Add contributed Chinese and Russian CHM documentation.
        • diff --git a/doc/html/en/Serpent.html b/doc/html/en/Serpent.html index 9dfd5f0d..dc23bce6 100644 --- a/doc/html/en/Serpent.html +++ b/doc/html/en/Serpent.html @@ -49,6 +49,6 @@ In spite of these facts, Rijndael was considered an appropriate selection for th votes, Twofish got 31 votes, RC6 got 23 votes, and MARS got 13 votes [18, 19].*

          * These are positive votes. If negative votes are subtracted from the positive votes, the following results are obtained: Rijndael: 76 votes, Serpent: 52 votes, Twofish: 10 votes, RC6: -14 votes, MARS: -70 votes [19].

           

          -

          Next Section >>

          +

          Next Section >>

          diff --git a/doc/html/ru/Cascades.html b/doc/html/ru/Cascades.html index 6a60a08c..cc10b273 100644 --- a/doc/html/ru/Cascades.html +++ b/doc/html/ru/Cascades.html @@ -87,33 +87,6 @@ Режимы работы). Каждый блок размером 128 бит сначала шифруется алгоритмом Serpent (с ключом размером 256 бит) в режиме XTS, а затем алгоритмом Twofish (с ключом размером 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. Каждый из этих каскадных шифров использует свой собственный ключ. Все ключи шифрования не зависят друг от друга (обратите внимание, что ключи заголовка тоже независимы, хотя и получены в результате формирования одного пароля – см. раздел -Формирование ключа заголовка, соль и количество итераций). Информация о каждом отдельном шифре приведена выше. -

          - -

          SM4-Twofish-Serpent

          -

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

          diff --git a/doc/html/ru/Documentation.html b/doc/html/ru/Documentation.html index 1b650a2e..1f1d3938 100644 --- a/doc/html/ru/Documentation.html +++ b/doc/html/ru/Documentation.html @@ -78,7 +78,7 @@
        • Алгоритмы хеширования
            diff --git a/doc/html/ru/Encryption Algorithms.html b/doc/html/ru/Encryption Algorithms.html index b43f6882..fd66239f 100644 --- a/doc/html/ru/Encryption Algorithms.html +++ b/doc/html/ru/Encryption Algorithms.html @@ -115,18 +115,6 @@ XTS XTS - - - SM4 - - Центр обеспечения безопасности данных и коммуникаций, Китайская академия наук
            GB/T 32907-2016 - - 128 - - 128 - - XTS - @@ -261,58 +249,7 @@ XTS XTS - - - - SM4-Kuznyechik - -   - - 128; 256 - - 128 - - XTS - - - - - SM4-Serpent - -   - - 128; 256 - - 128 - - XTS - - - - - SM4-Twofish - -   - - 128; 256 - - 128 - - XTS - - - - - SM4-Twofish-Serpent - -   - - 128; 256; 256 - - 128 - - XTS - +   diff --git a/doc/html/ru/Release Notes.html b/doc/html/ru/Release Notes.html index 6f736035..21e7b23c 100644 --- a/doc/html/ru/Release Notes.html +++ b/doc/html/ru/Release Notes.html @@ -47,7 +47,6 @@ VeraCrypt старее, чем 1.18a.
            • Все ОС:
                -
              • Добавлена поддержка китайского алгоритма шифрования SM4 (системное шифрование пока не поддерживается).
              • Исправлена реализация хэш-функции Whirlpool для платформ с прямым порядком байтов (big-endian) (GH #1529).
              • В пользовательском интерфейсе "Dismount All" переименовано в "Unmount All". Новая комбинация клавиш: ALT+U вместо ALT+S.
              • Добавлена документация в формате CHM на китайском и русском языках (предоставлена сообществом).
              • diff --git a/doc/html/ru/Serpent.html b/doc/html/ru/Serpent.html index a8ee13ed..bc69d313 100644 --- a/doc/html/ru/Serpent.html +++ b/doc/html/ru/Serpent.html @@ -59,6 +59,6 @@

                * Это положительные голоса. Если вычесть отрицательные голоса, то получаются следующие результаты: Rijndael: 76 голосов, Serpent: 52 голоса, Twofish: 10 голосов, RC6: -14 голосов, MARS: -70 голосов [19].

                 

                -

                Следующий раздел >>

                +

                Следующий раздел >>

                diff --git a/doc/html/zh-cn/Cascades.html b/doc/html/zh-cn/Cascades.html index bfc59843..8f0523ff 100644 --- a/doc/html/zh-cn/Cascades.html +++ b/doc/html/zh-cn/Cascades.html @@ -57,14 +57,6 @@

                级联中的三个密码算法 [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模式进行加密。级联中的每个密码算法使用其自己的密钥。所有加密密钥相互独立(请注意,即使头密钥是从单个密码派生而来,它们也是独立的 — 请参阅 头密钥派生、盐值和迭代次数)。有关级联中各个密码算法的信息,请参阅上文。

                -

                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模式进行加密。级联中的每个密码算法使用其自己的密钥。所有加密密钥相互独立(请注意,即使头密钥是从单个密码派生而来,它们也是独立的 — 请参阅 头密钥派生、盐值和迭代次数)。有关级联中各个密码算法的信息,请参阅上文。

                -

                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/Documentation.html b/doc/html/zh-cn/Documentation.html index f1c0c6a3..06bdf6c6 100644 --- a/doc/html/zh-cn/Documentation.html +++ b/doc/html/zh-cn/Documentation.html @@ -78,7 +78,7 @@
              • 哈希算法
                  diff --git a/doc/html/zh-cn/Encryption Algorithms.html b/doc/html/zh-cn/Encryption Algorithms.html index 1faaa321..d5d34143 100644 --- a/doc/html/zh-cn/Encryption Algorithms.html +++ b/doc/html/zh-cn/Encryption Algorithms.html @@ -115,18 +115,6 @@ GOST R 34.12-2015

                  XTS - - - SM4 - - 数据保障与通信安全中心,中国科学院
                  国家标准 GB/T 32907-2016 - - 128 - - 128 - - XTS - Twofish @@ -260,58 +248,7 @@ GOST R 34.12-2015

                  XTS - - - - SM4-Kuznyechik - -   - - 128; 256 - - 128 - - XTS - - - - - SM4-Serpent - -   - - 128; 256 - - 128 - - XTS - - - - - SM4-Twofish - -   - - 128; 256 - - 128 - - XTS - - - - - SM4-Twofish-Serpent - -   - - 128; 256; 256 - - 128 - - XTS - +   diff --git a/doc/html/zh-cn/Release Notes.html b/doc/html/zh-cn/Release Notes.html index f7d82b3e..0e83992c 100644 --- a/doc/html/zh-cn/Release Notes.html +++ b/doc/html/zh-cn/Release Notes.html @@ -44,7 +44,6 @@
                  • 所有操作系统:
                      -
                    • 新增对中国加密算法SM4(国密算法)的支持(暂不支持系统加密)。
                    • 修复Whirlpool算法在大端平台上的实现问题(GH #1529)。
                    • 将用户界面中的“Dismount All”重命名为“Unmount All”,并将快捷键由ALT+s更改为ALT+u。
                    • 新增用户贡献的中文和俄文CHM格式帮助文档。
                    • diff --git a/doc/html/zh-cn/Serpent.html b/doc/html/zh-cn/Serpent.html index ccf1f156..fe5c0646 100644 --- a/doc/html/zh-cn/Serpent.html +++ b/doc/html/zh-cn/Serpent.html @@ -44,6 +44,6 @@ 尽管有这些情况,但由于Rijndael在安全性、性能、效率、可实现性和灵活性方面的综合表现,它被认为是AES的合适选择[4]。在最后一届AES候选算法会议上,Rijndael获得了86票,Serpent获得了59票,Twofish获得了31票,RC6获得了23票,MARS获得了13票[18, 19]。*

                      * 这些是赞成票。如果从赞成票中减去反对票,得到以下结果:Rijndael:76票,Serpent:52票,Twofish:10票,RC6: - 14票,MARS: - 70票[19]。

                       

                      -

                      下一部分 >>

                      +

                      下一部分 >>

                      \ No newline at end of file diff --git a/src/Common/Crypto.c b/src/Common/Crypto.c index 29949be9..87e365af 100644 --- a/src/Common/Crypto.c +++ b/src/Common/Crypto.c @@ -69,7 +69,6 @@ static Cipher Ciphers[] = { TWOFISH, L"Twofish", 16, 32, TWOFISH_KS }, { CAMELLIA, L"Camellia", 16, 32, CAMELLIA_KS }, { KUZNYECHIK, L"Kuznyechik",16, 32, KUZNYECHIK_KS }, - { SM4, L"SM4", 16, 16, SM4_KS }, #endif #endif { 0, 0, 0, 0, 0 } @@ -90,7 +89,6 @@ static EncryptionAlgorithm EncryptionAlgorithms[] = { { TWOFISH, 0 }, { XTS, 0 }, 1, 1 }, { { CAMELLIA, 0 }, { XTS, 0 }, 1, 1 }, { { KUZNYECHIK, 0 }, { XTS, 0 }, 0, 1 }, - { { SM4, 0 }, { XTS, 0 }, 0, 1 }, { { TWOFISH, AES, 0 }, { XTS, 0 }, 1, 1 }, { { SERPENT, TWOFISH, AES, 0 }, { XTS, 0 }, 1, 1 }, { { AES, SERPENT, 0 }, { XTS, 0 }, 1, 1 }, @@ -98,13 +96,9 @@ static EncryptionAlgorithm EncryptionAlgorithms[] = { { SERPENT, TWOFISH, 0 }, { XTS, 0 }, 1, 1 }, { { KUZNYECHIK, CAMELLIA, 0 }, { XTS, 0 }, 0, 1 }, { { TWOFISH, KUZNYECHIK, 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 }, - { { SERPENT, TWOFISH, SM4, 0 }, { XTS, 0 }, 0, 1 }, #endif { { 0, 0 }, { 0, 0}, 0, 0 } // Must be all-zero @@ -183,9 +177,6 @@ int CipherInit (int cipher, unsigned char *key, unsigned __int8 *ks) case KUZNYECHIK: kuznyechik_set_key(key, (kuznyechik_kds*)ks); break; - case SM4: - sm4_set_key(key, (sm4_kds*)ks); - break; #endif // !defined(TC_WINDOWS_BOOT) #endif @@ -218,7 +209,6 @@ void EncipherBlock(int cipher, void *data, void *ks) #endif #if !defined(TC_WINDOWS_BOOT) case KUZNYECHIK: kuznyechik_encrypt_block(data, data, ks); break; - case SM4: sm4_encrypt_block(data, data, ks); break; #endif // !defined(TC_WINDOWS_BOOT) #endif default: TC_THROW_FATAL_EXCEPTION; // Unknown/wrong ID @@ -270,12 +260,6 @@ void EncipherBlocks (int cipher, void *dataPtr, void *ks, size_t blockCount) { kuznyechik_encrypt_blocks (data, data, blockCount, ks); } - else if (cipher == SM4 - && HasSSE41() && HasAESNI() - ) - { - sm4_encrypt_blocks(data, data, blockCount, ks); - } #endif #endif else @@ -303,7 +287,6 @@ void DecipherBlock(int cipher, void *data, void *ks) #endif #if !defined(TC_WINDOWS_BOOT) case KUZNYECHIK: kuznyechik_decrypt_block(data, data, ks); break; - case SM4: sm4_decrypt_block(data, data, ks); break; #endif // !defined(TC_WINDOWS_BOOT) #endif @@ -369,12 +352,6 @@ void DecipherBlocks (int cipher, void *dataPtr, void *ks, size_t blockCount) { kuznyechik_decrypt_blocks (data, data, blockCount, ks); } - else if (cipher == SM4 - && HasSSE41() && HasAESNI() - ) - { - sm4_decrypt_blocks(data, data, blockCount, ks); - } #endif #endif else @@ -445,7 +422,6 @@ BOOL CipherSupportsIntraDataUnitParallelization (int cipher) #if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined (_UEFI) || (cipher == SERPENT && HasSSE2()) || (cipher == KUZNYECHIK && HasSSE2()) - || (cipher == SM4 && HasSSE41() && HasAESNI()) #endif #if CRYPTOPP_BOOL_X64 && !defined(CRYPTOPP_DISABLE_ASM) || (cipher == TWOFISH) diff --git a/src/Common/Crypto.h b/src/Common/Crypto.h index e7ef1575..e21000e5 100644 --- a/src/Common/Crypto.h +++ b/src/Common/Crypto.h @@ -112,8 +112,7 @@ enum SERPENT, TWOFISH, CAMELLIA, - KUZNYECHIK, - SM4 + KUZNYECHIK }; typedef struct @@ -173,7 +172,7 @@ typedef struct #ifdef TC_WINDOWS_BOOT #define MAX_EXPANDED_KEY VC_MAX((AES_KS + SERPENT_KS + TWOFISH_KS), CAMELLIA_KS) #else -#define MAX_EXPANDED_KEY VC_MAX(VC_MAX(VC_MAX(VC_MAX(VC_MAX((AES_KS + SERPENT_KS + TWOFISH_KS), CAMELLIA_KS + KUZNYECHIK_KS + SERPENT_KS), KUZNYECHIK_KS + TWOFISH_KS), AES_KS + KUZNYECHIK_KS), SM4_KS + SERPENT_KS + TWOFISH_KS), SM4_KS + KUZNYECHIK_KS) +#define MAX_EXPANDED_KEY VC_MAX(VC_MAX(VC_MAX((AES_KS + SERPENT_KS + TWOFISH_KS), CAMELLIA_KS + KUZNYECHIK_KS + SERPENT_KS), KUZNYECHIK_KS + TWOFISH_KS), AES_KS + KUZNYECHIK_KS) #endif #endif @@ -207,7 +206,6 @@ typedef struct # include "Streebog.h" # include "kuznyechik.h" # include "Camellia.h" -# include "sm4.h" #if !defined (_UEFI) # include "chachaRng.h" # include "t1ha.h" diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index 244d9a4f..b198fd82 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -7812,23 +7812,13 @@ ResetCipherTest(HWND hwndDlg, int idTestCipher) SetWindowText(GetDlgItem(hwndDlg, IDC_CIPHERTEXT), L"0000000000000000"); if (idTestCipher == AES || idTestCipher == SERPENT || idTestCipher == TWOFISH || idTestCipher == CAMELLIA - || idTestCipher == KUZNYECHIK || idTestCipher == SM4 + || idTestCipher == KUZNYECHIK ) { - if (idTestCipher == SM4) // SM4 key size is 128 bits - { - ndx = (int) SendMessage (GetDlgItem(hwndDlg, IDC_KEY_SIZE), CB_ADDSTRING, 0,(LPARAM) L"128"); - SendMessage(GetDlgItem(hwndDlg, IDC_KEY_SIZE), CB_SETITEMDATA, ndx, (LPARAM)16); - SetWindowText(GetDlgItem(hwndDlg, IDC_KEY), L"00000000000000000000000000000000"); - SetWindowText(GetDlgItem(hwndDlg, IDC_SECONDARY_KEY), L"00000000000000000000000000000000"); - } - else - { - ndx = (int)SendMessage(GetDlgItem(hwndDlg, IDC_KEY_SIZE), CB_ADDSTRING, 0, (LPARAM)L"256"); - SendMessage(GetDlgItem(hwndDlg, IDC_KEY_SIZE), CB_SETITEMDATA, ndx, (LPARAM)32); - SetWindowText(GetDlgItem(hwndDlg, IDC_KEY), L"0000000000000000000000000000000000000000000000000000000000000000"); - SetWindowText(GetDlgItem(hwndDlg, IDC_SECONDARY_KEY), L"0000000000000000000000000000000000000000000000000000000000000000"); - } + ndx = (int)SendMessage(GetDlgItem(hwndDlg, IDC_KEY_SIZE), CB_ADDSTRING, 0, (LPARAM)L"256"); + SendMessage(GetDlgItem(hwndDlg, IDC_KEY_SIZE), CB_SETITEMDATA, ndx, (LPARAM)32); + SetWindowText(GetDlgItem(hwndDlg, IDC_KEY), L"0000000000000000000000000000000000000000000000000000000000000000"); + SetWindowText(GetDlgItem(hwndDlg, IDC_SECONDARY_KEY), L"0000000000000000000000000000000000000000000000000000000000000000"); SendMessage(GetDlgItem(hwndDlg, IDC_KEY_SIZE), CB_SETCURSEL, ndx,0); SendMessage (GetDlgItem(hwndDlg, IDC_PLAINTEXT_SIZE), CB_RESETCONTENT, 0,0); @@ -11351,10 +11341,6 @@ void Applink (const char *dest) { StringCbCopyW (page, sizeof (page),L"Camellia.html"); } - else if (strcmp(dest, "sm4") == 0) - { - StringCbCopyW (page, sizeof (page),L"SM4.html"); - } else if (strcmp(dest, "cascades") == 0) { StringCbCopyW (page, sizeof (page),L"Cascades.html"); diff --git a/src/Common/Language.xml b/src/Common/Language.xml index 2a56fd1b..4c07e068 100644 --- a/src/Common/Language.xml +++ b/src/Common/Language.xml @@ -1644,7 +1644,6 @@ ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point. ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point. [INSECURE MODE] - SM4 is a block cipher standard published by the Chinese National Cryptography Administration in 2006 as part of the GB/T 32907-2016 standard. 128-bit key, 128-bit block. Mode of operation is XTS. It is widely used in Chinese national standards and commercial applications. diff --git a/src/Common/Tests.c b/src/Common/Tests.c index 1c47e441..d60eafe2 100644 --- a/src/Common/Tests.c +++ b/src/Common/Tests.c @@ -422,78 +422,6 @@ KUZNYECHIK_TEST kuznyechik_vectors[KUZNYECHIK_TEST_COUNT] = { } }; -// SM4 ECB test vectors -#define SM4_TEST_COUNT 11 - -typedef struct { - unsigned char key[16]; - unsigned char plaintext[16]; - unsigned char ciphertext[16]; -} SM4_TEST; - -// Based on test vector fron cppcrypto (cppcrypto/testvectors/block_cipher/sm4.txt) -SM4_TEST sm4_vectors[SM4_TEST_COUNT] = { -{ - // KEY 0 - { 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10 }, - { 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10 }, - { 0x68,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x46 } -}, -{ - // KEY 1 - { 0x68,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x46 }, - { 0xf4,0x21,0x31,0xb0,0x02,0x42,0x5b,0x6f,0x5c,0xf5,0x2a,0x81,0x06,0x82,0xa0,0x9d }, - { 0xec,0x4b,0x7b,0x17,0x57,0xfe,0xe9,0xce,0x45,0x51,0x97,0xe5,0xbf,0x9c,0x3a,0x90 } -}, -{ - // After KEY 1, PT/CT pairs - { 0x68,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x46 }, - { 0x07,0xbc,0xae,0x6a,0x83,0x88,0xe1,0x46,0x51,0xfe,0xd8,0x4b,0x37,0x49,0xd3,0x86 }, - { 0x89,0xf2,0xc4,0x1e,0xd9,0x7d,0xbb,0x1b,0x74,0xa2,0xad,0x93,0xb9,0x03,0xbb,0xc9 } -}, -{ - { 0x68,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x46 }, - { 0xf4,0x76,0x26,0x15,0xb3,0x2c,0x00,0x0a,0x16,0x5e,0x1d,0x72,0x2d,0x70,0x80,0x52 }, - { 0xf4,0x5a,0x41,0x05,0x2f,0x9b,0xf3,0xd5,0xb6,0x5d,0xf8,0xcc,0x1c,0x75,0xb4,0xcf } -}, -{ - { 0x68,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x46 }, - { 0xba,0x3c,0x19,0xd8,0x92,0x63,0x56,0xed,0x14,0x91,0xc6,0xe4,0xe5,0x28,0x78,0x2f }, - { 0x3e,0x1f,0x30,0xd5,0x7d,0xf4,0xb6,0x06,0x94,0xf5,0x66,0xde,0x44,0x48,0x4f,0xaf } -}, -{ - // KEY 2 - { 0x78,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x47 }, - { 0x91,0x08,0x95,0x7f,0xf9,0x17,0xe3,0xd6,0x1c,0x4e,0xa3,0x3e,0x53,0xdb,0x6e,0xf3 }, - { 0x6a,0x52,0x9a,0xc0,0x93,0xa5,0xf3,0x04,0x5a,0xed,0x78,0x7f,0x70,0xcc,0xb7,0xf5 } -}, -{ - { 0x78,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x47 }, - { 0xcb,0xa0,0xf0,0x56,0x75,0x35,0xd6,0x61,0x48,0xb3,0x5a,0x92,0x58,0x72,0x9c,0x23 }, - { 0x63,0x46,0xf0,0xe4,0xc5,0x95,0x32,0xd4,0x18,0xce,0x31,0x5b,0x9f,0x22,0xa0,0xf4 } -}, -{ - { 0x78,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x47 }, - { 0xfa,0x59,0x80,0x11,0xf7,0xc2,0x10,0x07,0x99,0x45,0x1e,0x62,0xf3,0xb5,0xcf,0x09 }, - { 0x62,0x55,0x45,0x91,0x00,0x95,0x8f,0x4d,0x95,0x3a,0x9d,0x56,0x67,0x69,0x2d,0x6d } -}, -{ - { 0x78,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x47 }, - { 0xba,0x1f,0x85,0x55,0xb2,0xdd,0xab,0x0e,0x4e,0x4d,0x80,0x26,0xb0,0x5a,0xf3,0x89 }, - { 0x37,0x6f,0xeb,0x09,0x78,0xb5,0x2a,0xb9,0xc9,0x84,0xa1,0x4d,0x7e,0x66,0xf6,0x71 } -}, -{ - { 0x78,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x47 }, - { 0x50,0xc6,0x3c,0xe2,0x55,0x82,0x57,0x1a,0xa5,0xd8,0xee,0x22,0x08,0x9c,0x1b,0x59 }, - { 0x31,0xff,0xaf,0x2c,0xad,0x65,0x49,0xf3,0xd9,0xfc,0xd7,0xf0,0x2d,0xf5,0x81,0x24 } -}, -{ - { 0x78,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x47 }, - { 0x22,0x9a,0xd7,0xa8,0xa8,0x3c,0x5e,0x23,0x84,0xb4,0x08,0x2e,0x50,0xd0,0x6e,0xbf }, - { 0x76,0xf2,0x9e,0x93,0xdd,0xf5,0x79,0x32,0xa4,0x1e,0x83,0xbb,0x7b,0x61,0xa4,0x06 } -} -}; - #endif /* Test vectors from FIPS 198a, RFC 4231, RFC 2104, RFC 2202, and other sources. */ @@ -722,7 +650,6 @@ void CipherInit2(int cipher, void* key, void* ks) case TWOFISH: case CAMELLIA: case KUZNYECHIK: - case SM4: CipherInit(cipher,key,ks); break; default: @@ -941,33 +868,7 @@ BOOL TestSectorBufEncryption (PCRYPTO_INFO ci) nTestsPerformed++; break; } - } - else if (wcscmp (name, L"SM4") == 0) - { - switch (testCase) - { - case 0: - if (crc != 0x561b1367) - return FALSE; - nTestsPerformed++; - break; - case 1: - if (crc != 0x8f72e14d) - return FALSE; - nTestsPerformed++; - break; - case 2: - if (crc != 0xf96df16f) - return FALSE; - nTestsPerformed++; - break; - case 3: - if (crc != 0x8997e6eb) - return FALSE; - nTestsPerformed++; - break; - } - } + } else if (wcscmp (name, L"AES-Twofish") == 0) { switch (testCase) @@ -1202,84 +1103,6 @@ BOOL TestSectorBufEncryption (PCRYPTO_INFO ci) break; } } - else if (wcscmp (name, L"SM4-Kuznyechik") == 0) - { - switch (testCase) - { - case 0: - if (crc != 0xa8179f71) - return FALSE; - nTestsPerformed++; - break; - case 1: - if (crc != 0xaa372193) - return FALSE; - nTestsPerformed++; - break; - case 2: - if (crc != 0x49b78057) - return FALSE; - nTestsPerformed++; - break; - case 3: - if (crc != 0x80718fd2) - return FALSE; - nTestsPerformed++; - break; - } - } - else if (wcscmp (name, L"SM4-Serpent") == 0) - { - switch (testCase) - { - case 0: - if (crc != 0x77cd332a) - return FALSE; - nTestsPerformed++; - break; - case 1: - if (crc != 0x3a2be34b) - return FALSE; - nTestsPerformed++; - break; - case 2: - if (crc != 0xfc1a6d4c) - return FALSE; - nTestsPerformed++; - break; - case 3: - if (crc != 0xf9b54baf) - return FALSE; - nTestsPerformed++; - break; - } - } - else if (wcscmp (name, L"SM4-Twofish") == 0) - { - switch (testCase) - { - case 0: - if (crc != 0xd9a46a64) - return FALSE; - nTestsPerformed++; - break; - case 1: - if (crc != 0x371fdc08) - return FALSE; - nTestsPerformed++; - break; - case 2: - if (crc != 0x231c5104) - return FALSE; - nTestsPerformed++; - break; - case 3: - if (crc != 0xa920424b) - return FALSE; - nTestsPerformed++; - break; - } - } else if (wcscmp (name, L"Kuznyechik-Serpent-Camellia") == 0) { switch (testCase) @@ -1306,32 +1129,6 @@ BOOL TestSectorBufEncryption (PCRYPTO_INFO ci) break; } } - else if (wcscmp (name, L"SM4-Twofish-Serpent") == 0) - { - switch (testCase) - { - case 0: - if (crc != 0x3ef6c86f) - return FALSE; - nTestsPerformed++; - break; - case 1: - if (crc != 0xe5202d6c) - return FALSE; - nTestsPerformed++; - break; - case 2: - if (crc != 0xa3acb43b) - return FALSE; - nTestsPerformed++; - break; - case 3: - if (crc != 0xe9d64477) - return FALSE; - nTestsPerformed++; - break; - } - } #endif if (crc == 0x9f5edd58) return FALSE; @@ -1409,12 +1206,6 @@ BOOL TestSectorBufEncryption (PCRYPTO_INFO ci) return FALSE; nTestsPerformed++; } - else if (wcscmp (name, L"SM4") == 0) - { - if (crc != 0x7b600d06) - return FALSE; - nTestsPerformed++; - } else if (wcscmp (name, L"AES-Twofish") == 0) { if (crc != 0x14ce7385) @@ -1469,36 +1260,12 @@ BOOL TestSectorBufEncryption (PCRYPTO_INFO ci) return FALSE; nTestsPerformed++; } - else if (wcscmp (name, L"SM4-Kuznyechik") == 0) - { - if (crc != 0x23039a99) - return FALSE; - nTestsPerformed++; - } - else if (wcscmp (name, L"SM4-Serpent") == 0) - { - if (crc != 0xa7c3155b) - return FALSE; - nTestsPerformed++; - } - else if (wcscmp (name, L"SM4-Twofish") == 0) - { - if (crc != 0x1eaede31) - return FALSE; - nTestsPerformed++; - } else if (wcscmp (name, L"Kuznyechik-Serpent-Camellia") == 0) { if (crc != 0x755dad72) return FALSE; nTestsPerformed++; } - else if (wcscmp (name, L"SM4-Twofish-Serpent") == 0) - { - if (crc != 0x9723753f) - return FALSE; - nTestsPerformed++; - } #endif if (crc == 0x9f5edd58) return FALSE; @@ -1510,7 +1277,7 @@ BOOL TestSectorBufEncryption (PCRYPTO_INFO ci) nTestsPerformed++; } - return (nTestsPerformed == 200); + return (nTestsPerformed == 150); } static BOOL DoAutoTestAlgorithms (void) @@ -1652,26 +1419,6 @@ static BOOL DoAutoTestAlgorithms (void) } if (i != KUZNYECHIK_TEST_COUNT) bFailed = TRUE; - - /* SM4 */ - - for (i = 0; i < SM4_TEST_COUNT; i++) - { - int cipher = SM4; - memcpy(key, sm4_vectors[i].key, 16); - memcpy(tmp, sm4_vectors[i].plaintext, 16); - CipherInit(cipher, key, ks_tmp); - - EncipherBlock(cipher, tmp, ks_tmp); - if (memcmp(sm4_vectors[i].ciphertext, tmp, 16) != 0) - break; - - DecipherBlock(cipher, tmp, ks_tmp); - if (memcmp(sm4_vectors[i].plaintext, tmp, 16) != 0) - break; - } - if (i != SM4_TEST_COUNT) - bFailed = TRUE; #endif /* PKCS #5 and HMACs */ diff --git a/src/Core/Unix/Linux/CoreLinux.cpp b/src/Core/Unix/Linux/CoreLinux.cpp index dd09ff48..f54045cc 100644 --- a/src/Core/Unix/Linux/CoreLinux.cpp +++ b/src/Core/Unix/Linux/CoreLinux.cpp @@ -312,14 +312,9 @@ namespace VeraCrypt typeid (EncryptionModeXTS)); #endif bool algoNotSupported = (typeid (*volume->GetEncryptionAlgorithm()) == typeid (Kuznyechik)) - || (typeid (*volume->GetEncryptionAlgorithm()) == typeid (SM4)) || (typeid (*volume->GetEncryptionAlgorithm()) == typeid (CamelliaKuznyechik)) || (typeid (*volume->GetEncryptionAlgorithm()) == typeid (KuznyechikTwofish)) || (typeid (*volume->GetEncryptionAlgorithm()) == typeid (KuznyechikAES)) - || (typeid (*volume->GetEncryptionAlgorithm()) == typeid (SM4Kuznyechik)) - || (typeid (*volume->GetEncryptionAlgorithm()) == typeid (SM4Serpent)) - || (typeid (*volume->GetEncryptionAlgorithm()) == typeid (SM4Twofish)) - || (typeid (*volume->GetEncryptionAlgorithm()) == typeid (SM4TwofishSerpent)) || (typeid (*volume->GetEncryptionAlgorithm()) == typeid (KuznyechikSerpentCamellia)); if (options.NoKernelCrypto diff --git a/src/Crypto/Crypto.vcxproj b/src/Crypto/Crypto.vcxproj index f0840c2c..cad50c06 100644 --- a/src/Crypto/Crypto.vcxproj +++ b/src/Crypto/Crypto.vcxproj @@ -260,11 +260,6 @@ true - - true - true - - @@ -292,7 +287,6 @@ - diff --git a/src/Crypto/Crypto.vcxproj.filters b/src/Crypto/Crypto.vcxproj.filters index d979e7e0..099c3ce4 100644 --- a/src/Crypto/Crypto.vcxproj.filters +++ b/src/Crypto/Crypto.vcxproj.filters @@ -99,12 +99,6 @@ Source Files - - Source Files - - - Source Files - @@ -182,9 +176,6 @@ Header Files - - Header Files - diff --git a/src/Crypto/Sources b/src/Crypto/Sources index fef3f636..bd990382 100644 --- a/src/Crypto/Sources +++ b/src/Crypto/Sources @@ -48,8 +48,6 @@ SOURCES = \ Streebog.c \ kuznyechik.c \ kuznyechik_simd.c \ - sm4.cpp \ - sm4-impl-aesni.cpp \ Whirlpool.c \ Camellia.c \ Camellia_$(TC_ARCH).S \ diff --git a/src/Driver/Driver.vcxproj b/src/Driver/Driver.vcxproj index 4a2d3128..a6912bd6 100644 --- a/src/Driver/Driver.vcxproj +++ b/src/Driver/Driver.vcxproj @@ -277,11 +277,6 @@ copy $(OutDir)veracrypt.inf "$(SolutionDir)Debug\Setup Files\veracrypt.inf"true - - true - true - - @@ -319,7 +314,6 @@ copy $(OutDir)veracrypt.inf "$(SolutionDir)Debug\Setup Files\veracrypt.inf" - diff --git a/src/Driver/Driver.vcxproj.filters b/src/Driver/Driver.vcxproj.filters index 0e4e3aa4..3c427dad 100644 --- a/src/Driver/Driver.vcxproj.filters +++ b/src/Driver/Driver.vcxproj.filters @@ -171,12 +171,6 @@ Crypto\Source Files - - Crypto\Source Files - - - Crypto\Source Files - @@ -287,9 +281,6 @@ Header Files - - Crypto\Header Files - diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c index 77a9910c..8e32d632 100644 --- a/src/Format/Tcformat.c +++ b/src/Format/Tcformat.c @@ -1442,12 +1442,6 @@ void ComboSelChangeEA (HWND hwndDlg) SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("CAMELLIA_HELP")); } - else if (wcscmp (name, L"SM4") == 0) - { - StringCbPrintfW (hyperLink, sizeof(hyperLink) / 2, GetString ("MORE_INFO_ABOUT"), name); - - SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("SM4_HELP")); - } else if (EAGetCipherCount (nIndex) > 1) { // Cascade @@ -5660,8 +5654,6 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa Applink ("kuznyechik"); else if (wcscmp (name, L"Camellia") == 0) Applink ("camellia"); - else if (wcscmp (name, L"SM4") == 0) - Applink ("sm4"); else if (EAGetCipherCount (nIndex) > 1) Applink ("cascades"); diff --git a/src/Main/Forms/EncryptionOptionsWizardPage.cpp b/src/Main/Forms/EncryptionOptionsWizardPage.cpp index 15b13aac..29d23f35 100644 --- a/src/Main/Forms/EncryptionOptionsWizardPage.cpp +++ b/src/Main/Forms/EncryptionOptionsWizardPage.cpp @@ -100,8 +100,6 @@ namespace VeraCrypt EncryptionAlgorithmStaticText->SetLabel (LangString["CAMELLIA_HELP"]); else if (typeid (*ea) == typeid (Kuznyechik)) EncryptionAlgorithmStaticText->SetLabel (LangString["KUZNYECHIK_HELP"]); - else if (typeid (*ea) == typeid (SM4)) - EncryptionAlgorithmStaticText->SetLabel (LangString["SM4_HELP"]); else EncryptionAlgorithmStaticText->SetLabel (L""); } diff --git a/src/Main/GraphicUserInterface.cpp b/src/Main/GraphicUserInterface.cpp index 3adeb54a..85c377f8 100644 --- a/src/Main/GraphicUserInterface.cpp +++ b/src/Main/GraphicUserInterface.cpp @@ -1304,10 +1304,6 @@ namespace VeraCrypt { url = L"Kuznyechik.html"; } - else if (linkId == L"sm4") - { - url = L"SM4.html"; - } else if (linkId == L"cascades") { url = L"Cascades.html"; diff --git a/src/Release/Setup Files/Product64.wxs b/src/Release/Setup Files/Product64.wxs index 4fada73a..2ed11dff 100644 --- a/src/Release/Setup Files/Product64.wxs +++ b/src/Release/Setup Files/Product64.wxs @@ -797,9 +797,6 @@ - - - @@ -1446,9 +1443,6 @@ - - - @@ -2094,9 +2088,6 @@ - - - @@ -2786,7 +2777,6 @@ - @@ -3004,7 +2994,6 @@ - @@ -3222,7 +3211,6 @@ - diff --git a/src/SetupDLL/Setup.c b/src/SetupDLL/Setup.c index 8084bb44..d18ab1e4 100644 --- a/src/SetupDLL/Setup.c +++ b/src/SetupDLL/Setup.c @@ -733,10 +733,6 @@ void Applink_Dll (MSIHANDLE hInstaller, const char *dest) { StringCbCopyW (page, sizeof (page),L"Camellia.html"); } - else if (strcmp(dest, "sm4") == 0) - { - StringCbCopyW (page, sizeof (page),L"SM4.html"); - } else if (strcmp(dest, "cascades") == 0) { StringCbCopyW (page, sizeof (page),L"Cascades.html"); diff --git a/src/Volume/Cipher.cpp b/src/Volume/Cipher.cpp index 03e7bb2f..bef39e41 100644 --- a/src/Volume/Cipher.cpp +++ b/src/Volume/Cipher.cpp @@ -17,7 +17,6 @@ #include "Crypto/Twofish.h" #include "Crypto/Camellia.h" #include "Crypto/kuznyechik.h" -#include "Crypto/sm4.h" #ifdef TC_AES_HW_CPU # include "Crypto/Aes_hw_cpu.h" @@ -100,7 +99,6 @@ namespace VeraCrypt l.push_back (shared_ptr (new CipherTwofish ())); l.push_back (shared_ptr (new CipherCamellia ())); l.push_back (shared_ptr (new CipherKuznyechik ())); - l.push_back (shared_ptr (new CipherSM4 ())); #endif return l; } @@ -521,72 +519,6 @@ namespace VeraCrypt #endif } - // SM4 - void CipherSM4::Decrypt (uint8 *data) const - { - sm4_decrypt_block (data, data, (sm4_kds *) ScheduledKey.Ptr()); - } - - void CipherSM4::Encrypt (uint8 *data) const - { - sm4_encrypt_block (data, data, (sm4_kds *) ScheduledKey.Ptr()); - } - - size_t CipherSM4::GetScheduledKeySize () const - { - return SM4_KS; - } - - void CipherSM4::SetCipherKey (const uint8 *key) - { - sm4_set_key (key, (sm4_kds *) ScheduledKey.Ptr()); - } - void CipherSM4::EncryptBlocks (uint8 *data, size_t blockCount) const - { - if (!Initialized) - throw NotInitialized (SRC_POS); - - if ((blockCount >= 4) - && IsHwSupportAvailable()) - { - sm4_encrypt_blocks (data, data, blockCount, (sm4_kds *) ScheduledKey.Ptr()); - } - else - Cipher::EncryptBlocks (data, blockCount); - } - - void CipherSM4::DecryptBlocks (uint8 *data, size_t blockCount) const - { - if (!Initialized) - throw NotInitialized (SRC_POS); - - if ((blockCount >= 4) - && IsHwSupportAvailable()) - { - sm4_decrypt_blocks (data, data, blockCount, (sm4_kds *) ScheduledKey.Ptr()); - } - else - Cipher::DecryptBlocks (data, blockCount); - } - - bool CipherSM4::IsHwSupportAvailable () const - { -#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 - static bool state = false; - static bool stateValid = false; - - if (!stateValid) - { - state = HasSSE41() && HasAESNI(); - stateValid = true; - } - return state; -#else - return false; -#endif - } - - #endif bool Cipher::HwSupportEnabled = true; } diff --git a/src/Volume/Cipher.h b/src/Volume/Cipher.h index fff210a6..8145f8cd 100644 --- a/src/Volume/Cipher.h +++ b/src/Volume/Cipher.h @@ -148,7 +148,6 @@ namespace VeraCrypt TC_CIPHER (Twofish, 16, 32); TC_CIPHER (Camellia, 16, 32); TC_CIPHER (Kuznyechik, 16, 32); - TC_CIPHER (SM4, 16, 16); #undef TC_CIPHER_ADD_METHODS #define TC_CIPHER_ADD_METHODS diff --git a/src/Volume/EncryptionAlgorithm.cpp b/src/Volume/EncryptionAlgorithm.cpp index d000d385..6c406c68 100644 --- a/src/Volume/EncryptionAlgorithm.cpp +++ b/src/Volume/EncryptionAlgorithm.cpp @@ -70,7 +70,6 @@ namespace VeraCrypt l.push_back (shared_ptr (new Twofish ())); l.push_back (shared_ptr (new Camellia ())); l.push_back (shared_ptr (new Kuznyechik ())); - l.push_back (shared_ptr (new SM4 ())); l.push_back (shared_ptr (new AESTwofish ())); l.push_back (shared_ptr (new AESTwofishSerpent ())); l.push_back (shared_ptr (new CamelliaKuznyechik ())); @@ -81,10 +80,6 @@ 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 SM4Kuznyechik ())); - l.push_back (shared_ptr (new SM4Serpent ())); - l.push_back (shared_ptr (new SM4Twofish ())); - l.push_back (shared_ptr (new SM4TwofishSerpent ())); #endif return l; } @@ -386,49 +381,5 @@ namespace VeraCrypt SupportedModes.push_back (shared_ptr (new EncryptionModeXTS ())); } - // SM4 - SM4::SM4 () - { - Ciphers.push_back (shared_ptr (new CipherSM4())); - - SupportedModes.push_back (shared_ptr (new EncryptionModeXTS ())); - } - - // SM4-Kuznyechik - SM4Kuznyechik::SM4Kuznyechik () - { - Ciphers.push_back (shared_ptr (new CipherKuznyechik ())); - Ciphers.push_back (shared_ptr (new CipherSM4 ())); - - SupportedModes.push_back (shared_ptr (new EncryptionModeXTS ())); - } - - // SM4-Serpent - SM4Serpent::SM4Serpent () - { - Ciphers.push_back (shared_ptr (new CipherSerpent ())); - Ciphers.push_back (shared_ptr (new CipherSM4 ())); - - SupportedModes.push_back (shared_ptr (new EncryptionModeXTS ())); - } - - // SM4-Twofish - SM4Twofish::SM4Twofish () - { - Ciphers.push_back (shared_ptr (new CipherTwofish ())); - Ciphers.push_back (shared_ptr (new CipherSM4 ())); - - SupportedModes.push_back (shared_ptr (new EncryptionModeXTS ())); - } - - // SM4-Twofish-Serpent - SM4TwofishSerpent::SM4TwofishSerpent () - { - 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 ())); - } #endif } diff --git a/src/Volume/EncryptionAlgorithm.h b/src/Volume/EncryptionAlgorithm.h index 1b98cf19..da31ed87 100644 --- a/src/Volume/EncryptionAlgorithm.h +++ b/src/Volume/EncryptionAlgorithm.h @@ -95,11 +95,6 @@ namespace VeraCrypt TC_ENCRYPTION_ALGORITHM (KuznyechikSerpentCamellia); TC_ENCRYPTION_ALGORITHM (CamelliaKuznyechik); TC_ENCRYPTION_ALGORITHM (CamelliaSerpent); - TC_ENCRYPTION_ALGORITHM (SM4); - TC_ENCRYPTION_ALGORITHM (SM4Kuznyechik); - TC_ENCRYPTION_ALGORITHM (SM4Serpent); - TC_ENCRYPTION_ALGORITHM (SM4Twofish); - TC_ENCRYPTION_ALGORITHM (SM4TwofishSerpent); #undef TC_ENCRYPTION_ALGORITHM diff --git a/src/Volume/EncryptionTest.cpp b/src/Volume/EncryptionTest.cpp index 5a27c3a3..8c2f2bd6 100644 --- a/src/Volume/EncryptionTest.cpp +++ b/src/Volume/EncryptionTest.cpp @@ -163,102 +163,6 @@ namespace VeraCrypt } } }; - - static const CipherTestVector SM4TestVectors[] = - { - { - // KEY 0 - { 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 // dummy - }, - 16, - { 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10 }, - { 0x68,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x46 } - }, - { - // KEY 1 - { 0x68,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x46, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 // dummy - }, - 16, - { 0xf4,0x21,0x31,0xb0,0x02,0x42,0x5b,0x6f,0x5c,0xf5,0x2a,0x81,0x06,0x82,0xa0,0x9d }, - { 0xec,0x4b,0x7b,0x17,0x57,0xfe,0xe9,0xce,0x45,0x51,0x97,0xe5,0xbf,0x9c,0x3a,0x90 } - }, - { - // After KEY 1, PT/CT pairs - { 0x68,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x46, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 // dummy - }, - 16, - { 0x07,0xbc,0xae,0x6a,0x83,0x88,0xe1,0x46,0x51,0xfe,0xd8,0x4b,0x37,0x49,0xd3,0x86 }, - { 0x89,0xf2,0xc4,0x1e,0xd9,0x7d,0xbb,0x1b,0x74,0xa2,0xad,0x93,0xb9,0x03,0xbb,0xc9 } - }, - { - { 0x68,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x46, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 // dummy - }, - 16, - { 0xf4,0x76,0x26,0x15,0xb3,0x2c,0x00,0x0a,0x16,0x5e,0x1d,0x72,0x2d,0x70,0x80,0x52 }, - { 0xf4,0x5a,0x41,0x05,0x2f,0x9b,0xf3,0xd5,0xb6,0x5d,0xf8,0xcc,0x1c,0x75,0xb4,0xcf } - }, - { - { 0x68,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x46, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 // dummy - }, - 16, - { 0xba,0x3c,0x19,0xd8,0x92,0x63,0x56,0xed,0x14,0x91,0xc6,0xe4,0xe5,0x28,0x78,0x2f }, - { 0x3e,0x1f,0x30,0xd5,0x7d,0xf4,0xb6,0x06,0x94,0xf5,0x66,0xde,0x44,0x48,0x4f,0xaf } - }, - { - // KEY 2 - { 0x78,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x47, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 // dummy - }, - 16, - { 0x91,0x08,0x95,0x7f,0xf9,0x17,0xe3,0xd6,0x1c,0x4e,0xa3,0x3e,0x53,0xdb,0x6e,0xf3 }, - { 0x6a,0x52,0x9a,0xc0,0x93,0xa5,0xf3,0x04,0x5a,0xed,0x78,0x7f,0x70,0xcc,0xb7,0xf5 } - }, - { - { 0x78,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x47, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 // dummy - }, - 16, - { 0xcb,0xa0,0xf0,0x56,0x75,0x35,0xd6,0x61,0x48,0xb3,0x5a,0x92,0x58,0x72,0x9c,0x23 }, - { 0x63,0x46,0xf0,0xe4,0xc5,0x95,0x32,0xd4,0x18,0xce,0x31,0x5b,0x9f,0x22,0xa0,0xf4 } - }, - { - { 0x78,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x47, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 // dummy - }, - 16, - { 0xfa,0x59,0x80,0x11,0xf7,0xc2,0x10,0x07,0x99,0x45,0x1e,0x62,0xf3,0xb5,0xcf,0x09 }, - { 0x62,0x55,0x45,0x91,0x00,0x95,0x8f,0x4d,0x95,0x3a,0x9d,0x56,0x67,0x69,0x2d,0x6d } - }, - { - { 0x78,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x47, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 // dummy - }, - 16, - { 0xba,0x1f,0x85,0x55,0xb2,0xdd,0xab,0x0e,0x4e,0x4d,0x80,0x26,0xb0,0x5a,0xf3,0x89 }, - { 0x37,0x6f,0xeb,0x09,0x78,0xb5,0x2a,0xb9,0xc9,0x84,0xa1,0x4d,0x7e,0x66,0xf6,0x71 } - }, - { - { 0x78,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x47, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 // dummy - }, - 16, - { 0x50,0xc6,0x3c,0xe2,0x55,0x82,0x57,0x1a,0xa5,0xd8,0xee,0x22,0x08,0x9c,0x1b,0x59 }, - { 0x31,0xff,0xaf,0x2c,0xad,0x65,0x49,0xf3,0xd9,0xfc,0xd7,0xf0,0x2d,0xf5,0x81,0x24 } - }, - { - { 0x78,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x47, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 // dummy - }, - 16, - { 0x22,0x9a,0xd7,0xa8,0xa8,0x3c,0x5e,0x23,0x84,0xb4,0x08,0x2e,0x50,0xd0,0x6e,0xbf }, - { 0x76,0xf2,0x9e,0x93,0xdd,0xf5,0x79,0x32,0xa4,0x1e,0x83,0xbb,0x7b,0x61,0xa4,0x06 } - } - }; #endif static void TestCipher (Cipher &cipher, const CipherTestVector *testVector, size_t testVectorCount) @@ -311,9 +215,6 @@ namespace VeraCrypt CipherKuznyechik kuznyechik; TestCipher (kuznyechik, KuznyechikTestVectors, array_capacity (KuznyechikTestVectors)); - - CipherSM4 sm4; - TestCipher (sm4, SM4TestVectors, array_capacity (SM4TestVectors)); #endif } @@ -790,32 +691,6 @@ namespace VeraCrypt break; } } - else if (typeid (ea) == typeid (SM4)) - { - switch (testCase) - { - case 0: - if (crc != 0x561b1367) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - case 1: - if (crc != 0x8f72e14d) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - case 2: - if (crc != 0xf96df16f) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - case 3: - if (crc != 0x8997e6eb) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - } - } else if (typeid (ea) == typeid (AESTwofish)) { switch (testCase) @@ -1076,110 +951,6 @@ namespace VeraCrypt break; } } - else if (typeid (ea) == typeid (SM4Kuznyechik)) - { - switch (testCase) - { - case 0: - if (crc != 0xa8179f71) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - case 1: - if (crc != 0xaa372193) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - case 2: - if (crc != 0x49b78057) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - case 3: - if (crc != 0x80718fd2) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - } - } - else if (typeid (ea) == typeid (SM4Serpent)) - { - switch (testCase) - { - case 0: - if (crc != 0x77cd332a) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - case 1: - if (crc != 0x3a2be34b) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - case 2: - if (crc != 0xfc1a6d4c) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - case 3: - if (crc != 0xf9b54baf) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - } - } - else if (typeid (ea) == typeid (SM4Twofish)) - { - switch (testCase) - { - case 0: - if (crc != 0xd9a46a64) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - case 1: - if (crc != 0x371fdc08) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - case 2: - if (crc != 0x231c5104) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - case 3: - if (crc != 0xa920424b) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - } - } - else if (typeid (ea) == typeid (SM4TwofishSerpent)) - { - switch (testCase) - { - case 0: - if (crc != 0x3ef6c86f) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - case 1: - if (crc != 0xe5202d6c) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - case 2: - if (crc != 0xa3acb43b) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - case 3: - if (crc != 0xe9d64477) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - } - } #endif if (crc == 0x9f5edd58) throw TestFailed (SRC_POS); @@ -1267,12 +1038,6 @@ namespace VeraCrypt throw TestFailed (SRC_POS); nTestsPerformed++; } - else if (typeid (ea) == typeid (SM4)) - { - if (crc != 0x7b600d06) - throw TestFailed (SRC_POS); - nTestsPerformed++; - } else if (typeid (ea) == typeid (AESTwofish)) { if (crc != 0x14ce7385) @@ -1333,30 +1098,6 @@ namespace VeraCrypt throw TestFailed (SRC_POS); nTestsPerformed++; } - else if (typeid (ea) == typeid (SM4Kuznyechik)) - { - if (crc != 0x23039a99) - throw TestFailed (SRC_POS); - nTestsPerformed++; - } - else if (typeid (ea) == typeid (SM4Serpent)) - { - if (crc != 0xa7c3155b) - throw TestFailed (SRC_POS); - nTestsPerformed++; - } - else if (typeid (ea) == typeid (SM4Twofish)) - { - if (crc != 0x1eaede31) - throw TestFailed (SRC_POS); - nTestsPerformed++; - } - else if (typeid (ea) == typeid (SM4TwofishSerpent)) - { - if (crc != 0x9723753f) - throw TestFailed (SRC_POS); - nTestsPerformed++; - } #endif if (crc == 0x9f5edd58) @@ -1370,7 +1111,7 @@ namespace VeraCrypt nTestsPerformed++; } #ifndef WOLFCRYPT_BACKEND - if (nTestsPerformed != 200) + if (nTestsPerformed != 150) #else if (nTestsPerformed != 10) #endif diff --git a/src/Volume/Volume.make b/src/Volume/Volume.make index 0c31483e..dcd574bd 100644 --- a/src/Volume/Volume.make +++ b/src/Volume/Volume.make @@ -96,11 +96,6 @@ else OBJS += ../Crypto/blake2s_SSE41.o OBJS += ../Crypto/blake2s_SSSE3.o endif -ifeq "$(GCC_GTEQ_440)" "1" - OBJAESNI += ../Crypto/sm4-impl-aesni.oaesni -else - OBJS += ../Crypto/sm4-impl-aesni.o -endif ifeq "$(GCC_GTEQ_500)" "1" OBJSHANI += ../Crypto/Sha2Intel.oshani else @@ -124,7 +119,6 @@ OBJS += ../Crypto/Camellia.o OBJS += ../Crypto/Streebog.o OBJS += ../Crypto/kuznyechik.o OBJS += ../Crypto/kuznyechik_simd.o -OBJS += ../Crypto/sm4.o OBJS += ../Common/Pkcs5.o endif diff --git a/src/Volume/VolumeLayout.cpp b/src/Volume/VolumeLayout.cpp index 1fa1a7f8..219aef51 100644 --- a/src/Volume/VolumeLayout.cpp +++ b/src/Volume/VolumeLayout.cpp @@ -109,7 +109,6 @@ namespace VeraCrypt SupportedEncryptionAlgorithms.push_back (shared_ptr (new Twofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr (new Camellia ())); SupportedEncryptionAlgorithms.push_back (shared_ptr (new Kuznyechik ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr (new SM4 ())); SupportedEncryptionAlgorithms.push_back (shared_ptr (new AESTwofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr (new AESTwofishSerpent ())); SupportedEncryptionAlgorithms.push_back (shared_ptr (new CamelliaKuznyechik ())); @@ -120,10 +119,6 @@ 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 SM4Kuznyechik ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr (new SM4Serpent ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr (new SM4Twofish ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr (new SM4TwofishSerpent ())); SupportedEncryptionModes.push_back (shared_ptr (new EncryptionModeXTS ())); #else SupportedEncryptionModes.push_back (shared_ptr (new EncryptionModeWolfCryptXTS ())); @@ -163,7 +158,6 @@ namespace VeraCrypt SupportedEncryptionAlgorithms.push_back (shared_ptr (new Twofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr (new Camellia ())); SupportedEncryptionAlgorithms.push_back (shared_ptr (new Kuznyechik ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr (new SM4 ())); SupportedEncryptionAlgorithms.push_back (shared_ptr (new AESTwofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr (new AESTwofishSerpent ())); SupportedEncryptionAlgorithms.push_back (shared_ptr (new CamelliaKuznyechik ())); @@ -174,10 +168,6 @@ 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 SM4Kuznyechik ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr (new SM4Serpent ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr (new SM4Twofish ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr (new SM4TwofishSerpent ())); SupportedEncryptionModes.push_back (shared_ptr (new EncryptionModeXTS ())); #else