Multilinear Galois Mode (MGM)
CryptoPro+7 (495) 995-48-20svs@cryptopro.ruTC 26nozdrunov_vi@tc26.ruTC 26shishkin_va@tc26.ruCryptoProgriboedova.e.s@gmail.com
General
Network Working Groupauthenticated encryption, mode of operation, AEAD
Multilinear Galois Mode (MGM) is an authenticated encryption with associated data (AEAD) block
cipher mode based on EtM principle. MGM is defined for use with 64-bit and 128-bit block ciphers.
MGM has been standardized in Russia. It is used as an AEAD mode for the GOST block cipher algorithms
in many protocols, e.g. TLS 1.3 and IPsec. This document provides a reference for MGM to enable review
of the mechanisms in use and to make MGM available for use with any block cipher.
Multilinear Galois Mode (MGM) is an authenticated encryption with associated data (AEAD) block
cipher mode based on EtM principle. MGM is defined for use with 64-bit and 128-bit block ciphers.
The MGM design principles can easily be applied to other block sizes.
MGM has been standardized in Russia . It is used as an AEAD mode for the GOST block cipher algorithms
in many protocols, e.g. TLS 1.3 and IPsec. This document provides a reference for MGM to enable review
of the mechanisms in use and to make MGM available for use with any block cipher.
This document does not have IETF consensus and does not imply IETF support for MGM.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT",
"RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted
as described in BCP 14 when, and only when,
they appear in all capitals, as shown here.
This document uses the following terms and definitions for the sets and operations
on the elements of these sets:
the set of all bit strings of a finite length (hereinafter
referred to as strings), including the empty string;
substrings and string components are enumerated from right to left
starting from zero;
the set of all bit strings of length s, where s is a non-negative integer. For s = 0, the V_0 consists
of a single empty string;
the bit length of the bit string X (if X is an empty string, then |X| = 0);
concatenation of strings X and Y both belonging to V*, i.e., a string from V_{|X|+|Y|}, where the left substring
from V_{|X|} is equal to X, and the right substring from V_{|Y|} is equal to Y;
the string in V_s that consists of s 'a' bits;
exclusive-or of the two bit strings of the same length;
ring of residues modulo 2^s;
the transformation that maps the string X = (x_{s-1}, ... , x_0) in V_s into the string
MSB_i(X) = (x_{s-1}, ... , x_{s-i}) in V_i, i <= s, (most significant bits);
the transformation that maps the string X = (x_{s-1}, ... , x_0) in V_s, s > 0,
into the integer Int_s(X) = 2^{s-1} * x_{s-1} + ... + 2 * x_1 + x_0
(the interpretation of the bit string as an integer);
the transformation inverse to the mapping Int_s (the interpretation of an integer as a bit string);
the block cipher permutation under the key K in V_k;
the bit length of the block cipher key;
the block size of the block cipher (in bits);
the transformation that maps a string X in V_s, 0 <= s <= 2^{n/2} - 1,
into the string len(X) = Vec_{n/2}(|X|) in V_{n/2}, where n is the block size of the used block cipher;
the addition operation in Z_{2^{n/2}}, where n is the block size of the used block cipher;
the transformation that maps two strings X = (x_{n-1}, ... , x_0) in V_n and Y = (y_{n-1}, ... , y_0) in V_n into the string
Z = X (x) Y = (z_{n-1}, ... , z_0) in V_n; the string Z corresponds to the polynomial
Z(w) = z_{n-1} * w^{n-1} + ... + z_1 * w + z_0 which is a result of the polynomials X(w) = x_{n-1} * w^{n-1} + ... + x_1 * w + x_0
and Y(w) = y_{n-1} * w^{n-1} + ... + y_1 * w + y_0 multiplication in the field GF(2^n), where n is the block size of the used block cipher;
if n = 64, then the field polynomial is equal to f(w) = w^64 + w^4 + w^3 + w + 1; if n = 128,
then the field polynomial is equal to f(w) = w^128 + w^7 + w^2 + w + 1;
the transformation that maps a string L || R, where L, R in V_{n/2}, into the string incr_l(L || R) = Vec_{n/2}(Int_{n/2}(L) [+] 1) || R;
the transformation that maps a string L || R, where L, R in V_{n/2}, into the string incr_r(L || R) = L || Vec_{n/2}(Int_{n/2}(R) [+] 1).
An additional parameter that defines the functioning of Multilinear Galois Mode (MGM) is the
bit length S of the authentication tag, 32 <= S <= n. The value of S MUST be fixed for a particular protocol.
The choice of the value S involves a trade-off between message expansion and the forgery probability.
The MGM encryption and tag generation procedure takes the following parameters as inputs:
Encryption key K in V_k.
Initial counter nonce ICN in V_{n-1}.
Associated authenticated data A, 0 <= |A| < 2^{n/2}. If |A| > 0,
then A = A_1 || ... || A*_h, A_j in V_n, for j = 1, ... , h - 1, A*_h in V_t, 1 <= t <= n. If |A| = 0,
then by definition A*_h is empty, and the h and t parameters are set as follows: h = 0, t = n.
The associated data is authenticated but is not encrypted.
Plaintext P, 0 <= |P| < 2^{n/2}. If |P| > 0, then P = P_1 || ... || P*_q, P_i in
V_n, for i = 1, ... , q - 1, P*_q in V_u, 1 <= u <= n. If |P| = 0, then by definition P*_q is empty, and the q and u parameters
are set as follows: q = 0, u = n.
The MGM encryption and tag generation procedure outputs the following parameters:
Initial counter nonce ICN.Associated authenticated data A.Ciphertext C in V_{|P|}.Authentication tag T in V_S.
The MGM encryption and tag generation procedure consists of the following steps:
The ICN value for each message that is encrypted under
the given key K must be chosen in a unique manner.
Users who do not wish to encrypt plaintext can provide a string P of zero length. Users who do not wish to authenticate
associated data can provide a string A of zero length. The length of the associated data A and of the plaintext P MUST be such that 0 < |A| + |P| < 2^{n/2}.
The MGM decryption and tag verification procedure takes the following parameters as inputs:
The encryption key K in V_k.The initial counter nonce ICN in V_{n-1}.The associated authenticated data A, 0 <= |A| < 2^{n/2}. A = A_1 || ... || A*_h, A_j in V_n, for j = 1, ... , h - 1, A*_h in V_t, 1 <= t <= n. If |A| = 0,
then by definition A*_h is empty, and the h and t parameters are set as follows: h = 0, t = n.
The associated data is authenticated but is not encrypted.The ciphertext C, 0 <= |C| < 2^{n/2}. C = C_1 || ... || C*_q, C_i in V_n, for i = 1, ... , q - 1, C*_q in V_u, 1 <= u <= n. If |C| = 0, then by definition C*_q is empty, and the q and u parameters
are set as follows: q = 0, u = n. The authenticated tag T in V_S.
The MGM decryption and tag verification procedure outputs FAIL or the following parameters:
Associated authenticated data A.Plaintext P in V_{|C|}.
The MGM decryption and tag verification procedure consists of the following steps:
The length of the associated data A and of the ciphertext C MUST be such that 0 < |A| + |C| < 2^{n/2}.
The MGM was originally proposed in .
From the operational point of view the MGM is designed to be parallelizable, inverse free, online and
to provide availability of precomputations.
Parallelizability of the MGM is achieved due to its counter-type structure and the usage of the multilinear
function for authentication. Indeed, both encryption blocks E_K(Y_i) and authentication blocks H_i are produced
in the counter mode manner, and the multilinear function determined by H_i is parallelizable in itself.
Additionally, the counter-type structure of the mode provides the inverse free property.
The online property means the possibility to process message even if it is not completely received (so its length
is unknown). To provide this property the MGM uses blocks E_K(Y_i) and H_i which are produced basing on
two independent source blocks Y_i and Z_i.
Availability of precomputations for the MGM means the possibility to calculate H_i and E_K(Y_i) even before
data is retrieved. It is holds due to again the usage of counters for calculating them.
The security properties of the MGM are based on the following:
Different functions generating the counter values:
The functions incr_r and incr_l are chosen to minimize
intersection (if it happens) of counter values Y_i and Z_i.
Encryption of the multilinear function output:
It allows to resist attacks based on padding
and linear properties (see for details).
Multilinear function for authentication:
It allows to resist the small subgroup attacks .
Encryption of the nonces (0^1 || ICN) and (1^1 || ICN):
The use of this encryption minimizes the number of plaintext/ciphertext pairs
of blocks known to an adversary. It allows to resist attacks that need substantial amount of such
material (e.g., linear and differential cryptanalysis, side-channel attacks).
It is crucial to the security of MGM to use unique ICN values. Using the same ICN values for two different messages encrypted with the same key eliminates the security properties of this mode.
Security analysis for MGM with E_K being a random permutation was performed in . More precisely, the bounds for confidentiality advantage (CA) and integrity advantage (IA)
(for details see ) were obtained. According to these results, for an adversary making at most q encryption queries with the total length of plaintexts
and associated data of at most s blocks and allowed to output a forgery with the summary length of ciphertext and associated data of at most l blocks:
CA <= ( 3( s + 4q )^2 )/ 2^n,
IA <= ( 3( s + 4q + l + 3 )^2 )/ 2^n + 2/2^S,
where n is the block size and S is the authentication tag size.
These bounds can be used as guidelines on how to calculate confidentiality and integrity limits (for details also see ).
This document does not require any IANA actions.
Parallel and double block cipher mode of operation (PD-mode) for authenticated encryption
Nozdrunov, V.
Information technology. Cryptographic data security. Block ciphers
Federal Agency on Technical Regulating and Metrology
Authentication weaknesses in GCM
Ferguson, N.
Information technology. Cryptographic data security. Authenticated encryption block cipher operation modes
Federal Agency on Technical Regulating and Metrology
Cycling Attacks on GCM, GHASH and Other Polynomial MACs and Hashes
Saarinen, O.
Security of Multilinear Galois Mode (MGM).
Akhmetzyanova, L., Alekseev, E., Karpunin, G. and V. Nozdrunov
Test vectors for the Kuznyechik block cipher (n = 128, k = 256) defined in (the English version can be found in ).
Test vectors for the Magma block cipher (n = 64, k = 256) defined in (the English version can be found in ).
Evgeny Alekseev
CryptoPro
alekseev@cryptopro.ru
Alexandra Babueva
CryptoPro
babueva@cryptopro.ru
Lilia Akhmetzyanova
CryptoPro
lah@cryptopro.ru
Grigory Marshalko
TC 26
marshalko_gb@tc26.ru
Vladimir Rudskoy
TC 26
rudskoy_vi@tc26.ru
Alexey Nesterenko
National Research University Higher School of Economics
anesterenko@hse.ru
Lidia Nikiforova
CryptoPro
nikiforova@cryptopro.ru