]> Cypherpunks.ru repositories - gost-www.git/commitdiff
Split cipher modes of operation
authorSergey Matveev <stargrave@stargrave.org>
Mon, 24 Oct 2016 21:16:43 +0000 (00:16 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Mon, 24 Oct 2016 21:16:43 +0000 (00:16 +0300)
14 files changed:
en/28147-89-modes.texi [new file with mode: 0644]
en/28147-89.texi
en/34.11-94.texi
en/34.12-2015.texi
en/34.13-2015.texi
en/index.texi
en/meshing.texi
ru/28147-89-modes.texi [new file with mode: 0644]
ru/28147-89.texi
ru/34.11-94.texi
ru/34.12-2015.texi
ru/34.13-2015.texi
ru/index.texi
ru/meshing.texi

diff --git a/en/28147-89-modes.texi b/en/28147-89-modes.texi
new file mode 100644 (file)
index 0000000..e23edaf
--- /dev/null
@@ -0,0 +1,29 @@
+@node en2814789modes
+@section GOST 28147-89 cipher modes of operation
+
+@table @asis
+@item Type of standard
+    Encryption and authentication modes
+@item What modes are defined
+    @itemize
+        @item ECB
+        @item CFB
+        @item CTR
+        @item MAC
+    @end itemize
+@item RFC
+    @url{https://tools.ietf.org/html/rfc5830.html, 5830}
+@end table
+
+@strong{Features}:
+@itemize
+@item 28147-89 MAC is completely unusable:
+    @itemize
+        @item Reduced 16-round Magma cipher is used instead of 32 one.
+        @item Authenticating data does not have neither padding, nor
+        length specifying, so @code{MAC(0xDEAD) = MAC(0xDEAD00)}.
+    @end itemize
+@item Specified counter (CTR) mode increments counters with predefined
+constants for 32-bit halves of the block. This differs from simpler
+counter mode implementations.
+@end itemize
index c198715377005b992249c532d3047f0cc5353537..7c0290f29d0ab260cca3884db105ca3c174a1b74 100644 (file)
@@ -1,5 +1,5 @@
 @node en2814789
-@section Magma (GOST 28147-89)
+@section GOST 28147-89 (Magma)
 
 @table @asis
 @item Algorithm type
     strength.
     @item Implementations using different S-boxes are not interoperable.
     @end itemize
-@item "Magma" name was issued in @ref{en34122015, Kuznechik} standard,
-that also defines this algorithm.
 @item You have to be very cautious using that cipher with that small
 blocksize and often do rekeying.
+@item "Magma" name was issued in @ref{en34122015, Kuznechik} standard.
+It is identical to GOST 28147-89, except fixed S-boxes.
 @end itemize
 
 @strong{Implementations}: @ref{2814789Impl, here}.
index 354d9bc49a16d65c511742ba0f1c5a5394a07a9e..bdb618f320e55f81856cdacbc6b828e476456dbb 100644 (file)
@@ -25,8 +25,8 @@
 
 @strong{Features}:
 @itemize
-@item Uses @ref{en2814789, Magma} block cipher inside.
-@item You have to specify S-box to use for that Magma cipher.
+@item Uses @ref{en2814789, GOST 28147-89} block cipher inside.
+@item You have to specify S-box to use for that block cipher.
 @item Standard does not define how digest output must be presented --
 that is why there are incompatible implementations, that output digest
 as either little-endian or big-endian value.
index 29825cee4fd34e77457a6bea4f8858164652ac64..bff0fcdebe70bca97fbb5dc2d3a041d4a8ca87b7 100644 (file)
@@ -26,6 +26,7 @@
 @item Defined S-boxes was not created pseudorandomly, but with reverse
 engineered @url{https://eprint.iacr.org/2016/071.pdf, algorithm}.
 However there is no proof that it reduces cipher's strength.
+@item Standard's document also defines @ref{en2814789, Magma} cipher.
 @end itemize
 
 @strong{Implementations}: @ref{34122015Impl, here}.
index 83cc9cbdda76ebe40e15057e86fe9efbde2ff615..29bac32226b724dd5f5fff52e1beab1b7c4da233 100644 (file)
@@ -1,42 +1,24 @@
 @node en34132015
-@section Cipher modes of operation
+@section GOST R 34.13-2015 cipher modes of operation
 
-@ref{en2814789, GOST 28147-89} standard defines the following modes of
-operation for Magma cipher:
-@itemize
+@table @asis
+@item Type of standard
+    Encryption and authentication modes
+@item What modes are defined
+    @itemize
     @item ECB
+    @item CBC
+    @item OFB
     @item CFB
     @item CTR
     @item MAC
-@end itemize
-
-@strong{Features}:
-@itemize
-@item 28147-89 MAC is completely unusable:
-    @itemize
-        @item Reduced 16-round Magma cipher is used instead of 32 one.
-        @item Authenticating data does not have neither padding, nor
-        length specifying, so @code{MAC(0xDEAD) = MAC(0xDEAD00)}.
     @end itemize
-@item Specified counter (CTR) mode increments counters with predefined
-constants for 32-bit halves of the block. This differs from simpler
-counter mode implementations.
-@end itemize
-
-Modern @strong{GOST R 34.13-2015} standard defines the following modes
-of operation:
-@itemize
-@item ECB
-@item CBC
-@item OFB
-@item CFB
-@item CTR
-@item MAC
-@end itemize
+@end table
 
 @strong{Features}:
 @itemize
+@item Replaces obsolete @ref{en2814789modes, GOST 28147-89 modes}.
 @item Common simple counter mode implementation.
 @item Specified MAC is identical to
-@url{https://en.wikipedia.org/wiki/CMAC, CMAC} and can be used safely.
+@url{https://en.wikipedia.org/wiki/CMAC, CMAC} and can be safely used.
 @end itemize
index 4ad4e5c0456b6aa75e866f2db57009a2ef26c2ab..f7b3c99dd24e89463155930dd28c3a5e6998d1f6 100644 (file)
@@ -23,7 +23,7 @@ Information here is aimed for software and protocol developers.
     @tab
     @itemize
     @item @ref{en34122015, Kuznechik} (GOST R 34.12-2015)
-    @item @ref{en2814789, Magma} (GOST 28147-89)
+    @item @ref{en2814789, GOST 28147-89} (Magma)
     @end itemize
 
 @item
@@ -68,14 +68,15 @@ Information here is aimed for software and protocol developers.
 @end multitable
 
 @menu
-* Kuznechik (block cipher): en34122015.
-* Streebog (hash function): en34112012.
-* 34.10 (digital signature): en3410.
-* VKO (common key derivation): enVKO.
-* Magma (block cipher): en2814789.
-* Cipher modes of operation: en34132015.
+* GOST R 34.12-2015 (Kuznechik) (block cipher): en34122015.
+* GOST R 34.13-2015 (cipher modes of operation): en34132015.
+* GOST R 34.11-2012 (Streebog) (hash function): en34112012.
+* GOST R 34.10 (digital signature): en3410.
+* VKO 34.10-2001 (common key derivation): enVKO.
+* GOST 28147-89 (Magma) (block cipher): en2814789.
+* GOST 28147-89 (cipher modes of operation)): en2814789modes.
 * Key meshing: enMeshing.
-* 34.11-94 (hash function): en341194.
+* GOST R 34.11-94 (hash function): en341194.
 @end menu
 
 You can send questions and suggestions either to
@@ -83,10 +84,11 @@ You can send questions and suggestions either to
 site's author: @emph{admin at cypherpunks dot ru}.
 
 @include en/34.12-2015.texi
+@include en/34.13-2015.texi
 @include en/34.11-2012.texi
 @include en/34.10.texi
 @include en/vko.texi
 @include en/28147-89.texi
-@include en/34.13-2015.texi
+@include en/28147-89-modes.texi
 @include en/meshing.texi
 @include en/34.11-94.texi
index 6bf3c5fc785bd1b84b759433b3ea08ee2d3d06d7..ff3292b050ddbd819869eb73461fb3e597784798 100644 (file)
@@ -3,7 +3,7 @@
 
 There is no key meshing western algorithm analogue. That algorithm
 changes cipherkey each kilobyte of data processed. It is used together
-with @ref{en2814789, Magma} and is defined in
+with @ref{en2814789, GOST 28147-89} and is defined in
 @url{https://tools.ietf.org/html/rfc4357.html, RFC 4357}. CryptoPro
 developers tell that it is intended to resist side-channel attacks.
 
@@ -12,4 +12,4 @@ over the key and initialization vector.
 
 It has already showed usefulness: there is @url{https://sweet32.info/,
 Sweet32} attack on all 64-bit blockciphers, that is not applicable to
-Magma with key meshing used.
+when key meshing used.
diff --git a/ru/28147-89-modes.texi b/ru/28147-89-modes.texi
new file mode 100644 (file)
index 0000000..a7baae2
--- /dev/null
@@ -0,0 +1,29 @@
+@node ru2814789modes
+@section ГОСТ 28147-89 режимы шифрования
+
+@table @asis
+@item Что за стандарт
+    Режимы шифрования и аутентификации
+@item Какие режимы описаны
+    @itemize
+        @item ECB (простая замена)
+        @item CFB (гаммирование с обратной связью
+        @item CTR (гаммирование)
+        @item MAC (выработка имитовставки)
+    @end itemize
+@item RFC
+    @url{https://tools.ietf.org/html/rfc5830.html, 5830}
+@end table
+
+@strong{Особенности}:
+@itemize
+@item Использовать 28147-89 MAC режим категорически нельзя:
+    @itemize
+        @item Шифр Магма используется в 16-раундовом варианте (вместо 32).
+        @item Аутентифицируемый текст не имеет ни padding, ни передачи длины
+        данных, таким образом, @code{MAC(0xDEAD) = MAC(0xDEAD00)}.
+    @end itemize
+@item Режим счётчика в этом стандарте для каждой 32-битной половинки блока
+увеличивает счётчик на значение фиксированной константы. Это отличается
+от более простых реализаций счётчика.
+@end itemize
index b5148f2a482eb9e1aee6ccfdf3c750148869fa92..fe67239682e7402013aa67c92d385757f9ffa950 100644 (file)
@@ -1,5 +1,5 @@
 @node ru2814789
-@section Ð\9cагма (Ð\93Ð\9eСТ 28147-89)
+@section Ð\93Ð\9eСТ 28147-89 (Ð\9cагма)
 
 @table @asis
 @item Что за алгоритм
     @item Реализации алгоритма, использующие разные таблицы, не
     совместимы между собой.
     @end itemize
-@item Название "Магма" введено в стандарте @ref{ru34122015, Кузнечика},
-который также описывает и этот блочный шифр.
 @item Из-за маленького размера блока необходимо быть аккуратным при его
 использовании и часто менять ключи.
+@item Название "Магма" введено в стандарте @ref{ru34122015, Кузнечика}.
+Магма идентичен ГОСТ 28147-89, за исключением фиксированной таблицы замены.
 @end itemize
 
 @anchor{2814789Impl}
index de6cce3613668f98d63ee29387f3ef1b1865f4a1..7efbb1f0bd3eb782b729d68d9793b8062a9e5502 100644 (file)
@@ -25,9 +25,9 @@
 
 @strong{Особенности}:
 @itemize
-@item Ð\92нÑ\83Ñ\82Ñ\80и Ñ\81ебÑ\8f Ð¸Ñ\81полÑ\8cзÑ\83еÑ\82 Ð±Ð»Ð¾Ñ\87нÑ\8bй Ñ\88иÑ\84Ñ\80 @ref{ru2814789, Ð\9cагма}.
+@item Ð\92нÑ\83Ñ\82Ñ\80и Ñ\81ебÑ\8f Ð¸Ñ\81полÑ\8cзÑ\83еÑ\82 Ð±Ð»Ð¾Ñ\87нÑ\8bй Ñ\88иÑ\84Ñ\80 @ref{ru2814789, Ð\93Ð\9eСТ 28147-89}.
 @item Для этой хэш-функции необходимо задавать используемые таблицы
-заменÑ\8b Ð\9cагмÑ\8b.
+заменÑ\8b Ð±Ð»Ð¾Ñ\87ного Ñ\88иÑ\84Ñ\80а.
 @item Стандарт не определяет в каком виде должен быть представлен
 результат -- поэтому есть несовместимые между собой реализации в который
 хэш представлен в виде little-endian или big-endian значения.
index fcca2bb221c83ae21ea0c0e90015c918822a0f60..a86af5827842067692d1f3b1e471833e86e1bb13 100644 (file)
@@ -28,6 +28,7 @@
 @url{https://eprint.iacr.org/2016/071.pdf, удалось узнать}. Однако нет
 доказательств что это негативно сказалось на криптографической стойкости
 алгоритма.
+@item Документ стандарта также задаёт шифр @ref{ru2814789, Магма}.
 @end itemize
 
 @anchor{34122015Impl}
index 16e9ef153a08f1fbd186f4814e6c729fdc115b9d..2a91d95bdca24063422685a46da656c1409f20ea 100644 (file)
@@ -1,42 +1,24 @@
 @node ru34132015
-@section Ð ÐµÐ¶Ð¸Ð¼Ñ\8b Ñ\88иÑ\84Ñ\80ованиÑ\8f Ð±Ð»Ð¾Ñ\87нÑ\8bÑ\85 Ñ\88иÑ\84Ñ\80ов
+@section Ð\93Ð\9eСТ Ð  34.13-2015 Ñ\80ежимÑ\8b Ñ\88иÑ\84Ñ\80ованиÑ\8f
 
-@ref{ru2814789, ГОСТ 28147-89} определял следующие режимы шифрования и
-аутентификации для блочного шифра Магма:
-@itemize
+@table @asis
+@item Что за стандарт
+    Режимы шифрования и аутентификации
+@item Какие режимы описаны
+    @itemize
     @item ECB (простая замена)
-    @item CFB (гаммирование с обратной связью
+    @item CBC (простая замена с зацеплением)
+    @item OFB (гаммирование с обратной связью по выходу)
+    @item CFB (гаммирование с обратной связью по шифротексту)
     @item CTR (гаммирование)
     @item MAC (выработка имитовставки)
-@end itemize
-
-@strong{Особенности}:
-@itemize
-@item Использовать 28147-89 MAC режим категорически нельзя:
-    @itemize
-        @item Шифр Магма используется в 16-раундовом варианте (вместо 32).
-        @item Аутентифицируемый текст не имеет ни padding, ни передачи длины
-        данных, таким образом, @code{MAC(0xDEAD) = MAC(0xDEAD00)}.
     @end itemize
-@item Режим счётчика в этом стандарте для каждой 32-битной половинки блока
-увеличивает счётчик на значение фиксированной константы. Это отличается
-от более простых реализаций счётчика.
-@end itemize
-
-Современный @strong{ГОСТ Р 34.13-2015} стандарт определяет следующие
-режимы шифрования и аутентификации:
-@itemize
-@item ECB (простая замена)
-@item CBC (простая замена с зацеплением)
-@item OFB (гаммирование с обратной связью по выходу)
-@item CFB (гаммирование с обратной связью по шифротексту)
-@item CTR (гаммирование)
-@item MAC (выработка имитовставки)
-@end itemize
+@end table
 
 @strong{Особенности}:
 @itemize
+@item Пришёл на смену @ref{ru2814789modes, ГОСТ 28147-89 режимам}.
 @item Реализация режима счётчика стандартна.
-@item Ð ÐµÐ°Ð»Ð¸Ð·Ð°Ñ\86иÑ\8f MAC Ð² Ñ\8dÑ\82ом Ñ\81Ñ\82андаÑ\80Ñ\82е Ð¸Ð´ÐµÐ½Ñ\82иÑ\87на
-@url{https://en.wikipedia.org/wiki/CMAC, CMAC} и его использование безопасно.
+@item Ð ÐµÐ°Ð»Ð¸Ð·Ð°Ñ\86иÑ\8f MAC Ð¸Ð´ÐµÐ½Ñ\82иÑ\87на @url{https://en.wikipedia.org/wiki/CMAC, CMAC}
+и его использование безопасно.
 @end itemize
index 85516ecfc54a8e438e4f5137044760dfe3f80544..62a89f06a0113ceffde53cae2a75968b1307c050 100644 (file)
@@ -24,7 +24,7 @@
     @tab
     @itemize
     @item @ref{ru34122015, Кузнечик} (ГОСТ Р 34.12-2015)
-    @item @ref{ru2814789, Ð\9cагма} (ГОСТ 28147-89)
+    @item @ref{ru2814789, Ð\93Ð\9eСТ 28147-89 (Ð\9cагма)} (ГОСТ 28147-89)
     @end itemize
 
 @item
 @end multitable
 
 @menu
-* Кузнечик (блочный шифр): ru34122015.
-* Стрибог (хэш-функция): ru34112012.
-* 34.10 (ЭЦП): ru3410.
-* ВКО (согласование ключей): ruVKO.
-* Магма (блочный шифр): ru2814789.
-* Режимы шифрования: ru34132015.
+* ГОСТ Р 34.12-2015 (Кузнечик) (блочный шифр): ru34122015.
+* ГОСТ Р 34.13-2015 (режимы шифрования): ru34132015.
+* ГОСТ Р 34.11-2012 (Стрибог) (хэш-функция): ru34112012.
+* ГОСТ Р 34.10 (ЭЦП): ru3410.
+* ВКО 34.10-2001 (согласование ключей): ruVKO.
+* ГОСТ 28147-89 (Магма) (блочный шифр): ru2814789.
+* ГОСТ 28147-89 (режимы шифрования): ru2814789modes.
 * Key meshing (запутывание ключа): ruMeshing.
-* 34.11-94 (хэш-функция): ru341194.
+* ГОСТ Р 34.11-94 (хэш-функция): ru341194.
 @end menu
 
 Вопросы и предложения вы можете отправить в
 либо автору сайта: @emph{admin at cypherpunks dot ru}.
 
 @include ru/34.12-2015.texi
+@include ru/34.13-2015.texi
 @include ru/34.11-2012.texi
 @include ru/34.10.texi
 @include ru/vko.texi
 @include ru/28147-89.texi
-@include ru/34.13-2015.texi
+@include ru/28147-89-modes.texi
 @include ru/meshing.texi
 @include ru/34.11-94.texi
index 51053ed1fdaf8b68320a5270ae99f84b2e69e483..90cce0ef349af77ecf477ed3c531e6a54e0ee6cc 100644 (file)
@@ -3,7 +3,7 @@
 
 Алгоритм запутывания ключа (key meshing) не имеет аналогов в Западных
 алгоритмах. Его суть: делать смену ключа каждый килобайт зашифрованных
-даннÑ\8bÑ\85. Ð\9fÑ\80именÑ\8fеÑ\82Ñ\81Ñ\8f Ñ\81овмеÑ\81Ñ\82но Ñ\81 @ref{ru2814789, Ð\9cагмой} и описан в
+даннÑ\8bÑ\85. Ð\9fÑ\80именÑ\8fеÑ\82Ñ\81Ñ\8f Ñ\81овмеÑ\81Ñ\82но Ñ\81 @ref{ru2814789, Ð\93Ð\9eСТ 28147-89} и описан в
 @url{https://tools.ietf.org/html/rfc4357.html, RFC 4357}. По заверению
 разработчиков из КриптоПро, он служит для усложнения проведения атак по
 побочным каналам.
@@ -13,4 +13,4 @@
 
 На практике он себя уже проявил: есть @url{https://sweet32.info/, Sweet32}
 атака на все 64-битные блочные шифры, которая при использовании алгоритма
-запутывания ключа уже неприменима к Магме.
+запутывания ключа уже не применима.