HOME

TheInfoList



OR:

In
cryptography Cryptography, or cryptology (from grc, , translit=kryptós "hidden, secret"; and ''graphein'', "to write", or ''-logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of adve ...
, an interpolation attack is a type of
cryptanalytic attack Cryptanalysis (from the Greek ''kryptós'', "hidden", and ''analýein'', "to analyze") refers to the process of analyzing information systems in order to understand hidden aspects of the systems. Cryptanalysis is used to breach cryptographic sec ...
against
block cipher In cryptography, a block cipher is a deterministic algorithm operating on fixed-length groups of bits, called ''blocks''. Block ciphers are specified cryptographic primitive, elementary components in the design of many cryptographic protocols and ...
s. After the two attacks,
differential cryptanalysis Differential cryptanalysis is a general form of cryptanalysis applicable primarily to block ciphers, but also to stream ciphers and cryptographic hash functions. In the broadest sense, it is the study of how differences in information input can af ...
and
linear cryptanalysis In cryptography, linear cryptanalysis is a general form of cryptanalysis based on finding affine approximations to the action of a cipher. Attacks have been developed for block ciphers and stream ciphers. Linear cryptanalysis is one of the two ...
, were presented on block ciphers, some new
block ciphers In cryptography, a block cipher is a deterministic algorithm operating on fixed-length groups of bits, called ''blocks''. Block ciphers are specified elementary components in the design of many cryptographic protocols and are widely used to encry ...
were introduced, which were proven secure against differential and linear attacks. Among these there were some iterated block ciphers such as the
KN-Cipher In cryptography, KN-Cipher is a block cipher created by Kaisa Nyberg and Lars Knudsen in 1995. One of the first ciphers designed to be provably secure against ordinary differential cryptanalysis, KN-Cipher was later broken using higher order diff ...
and the
SHARK Sharks are a group of elasmobranch fish characterized by a cartilaginous skeleton, five to seven gill slits on the sides of the head, and pectoral fins that are not fused to the head. Modern sharks are classified within the clade Selachi ...
cipher. However, Thomas Jakobsen and Lars Knudsen showed in the late 1990s that these ciphers were easy to break by introducing a new attack called the interpolation attack. In the attack, an algebraic function is used to represent an
S-box In cryptography, an S-box (substitution-box) is a basic component of symmetric key algorithms which performs substitution. In block ciphers, they are typically used to obscure the relationship between the key and the ciphertext, thus ensuring Shan ...
. This may be a simple
quadratic In mathematics, the term quadratic describes something that pertains to squares, to the operation of squaring, to terms of the second degree, or equations or formulas that involve such terms. ''Quadratus'' is Latin for ''square''. Mathematics ...
, or a
polynomial In mathematics, a polynomial is an expression consisting of indeterminates (also called variables) and coefficients, that involves only the operations of addition, subtraction, multiplication, and positive-integer powers of variables. An ex ...
or
rational function In mathematics, a rational function is any function that can be defined by a rational fraction, which is an algebraic fraction such that both the numerator and the denominator are polynomials. The coefficients of the polynomials need not be ...
over a
Galois field In mathematics, a finite field or Galois field (so-named in honor of Évariste Galois) is a field that contains a finite number of elements. As with any field, a finite field is a set on which the operations of multiplication, addition, subt ...
. Its coefficients can be determined by standard
Lagrange interpolation In numerical analysis, the Lagrange interpolating polynomial is the unique polynomial of lowest degree that interpolates a given set of data. Given a data set of coordinate pairs (x_j, y_j) with 0 \leq j \leq k, the x_j are called ''nodes'' an ...
techniques, using known plaintexts as data points. Alternatively, chosen plaintexts can be used to simplify the equations and optimize the attack. In its simplest version an interpolation attack expresses the ciphertext as a polynomial of the plaintext. If the polynomial has a relative low number of unknown coefficients, then with a collection of plaintext/ciphertext (p/c) pairs, the polynomial can be reconstructed. With the polynomial reconstructed the attacker then has a representation of the encryption, without exact knowledge of the secret key. The interpolation attack can also be used to recover the secret key. It is easiest to describe the method with an example.


Example

Let an iterated cipher be given by : c_i=(c_\oplus k_i)^3, where c_0 is the plaintext, c_i the output of the i^ round, k_i the secret i^ round key (derived from the secret key K by some
key schedule In cryptography, the so-called product ciphers are a certain kind of cipher, where the (de-)ciphering of data is typically done as an iteration of ''rounds''. The setup for each round is generally the same, except for round-specific fixed val ...
), and for a r-round iterated cipher, c_r is the ciphertext. Consider the 2-round cipher. Let x denote the message, and c denote the ciphertext. Then the output of round 1 becomes :c_1=(x+ k_1)^3=(x^2+ k_1^2)(x + k_1)=x^3+ k_1^2x+ x^2k_1+ k_1^3, and the output of round 2 becomes : c_2=c=(c_1+ k_2)^3=(x^3+ k_1^2x+ x^2k_1+ k_1^3+ k_2)^3 : =x^9+ x^8k_1+ x^6k_2+ x^4k_1^2k_2+ x^3k_2^2+ x^2(k_1k_2^2+k_1^4k_2) + x(k_1^2k_2^2+k_1^8)+ k_1^3k_2^2+ k_1^9+ k_2^3, Expressing the ciphertext as a polynomial of the plaintext yields :p(x)=a_1x^9+ a_2x^8+ a_3x^6+ a_4x^4+ a_5x^3+ a_6x^2+ a_7x+ a_8, where the a_i's are key dependent constants. Using as many plaintext/ciphertext pairs as the number of unknown coefficients in the polynomial p(x), then we can construct the polynomial. This can for example be done by Lagrange Interpolation (see
Lagrange polynomial In numerical analysis, the Lagrange interpolating polynomial is the unique polynomial of lowest degree that interpolates a given set of data. Given a data set of coordinate pairs (x_j, y_j) with 0 \leq j \leq k, the x_j are called ''nodes'' an ...
). When the unknown coefficients have been determined, then we have a representation p(x) of the encryption, without knowledge of the secret key K.


Existence

Considering an m-bit block cipher, then there are 2^m possible plaintexts, and therefore 2^m distinct p/c pairs. Let there be n unknown coefficients in p(x). Since we require as many p/c pairs as the number of unknown coefficients in the polynomial, then an interpolation attack exist only if n\leq 2^m.


Time complexity

Assume that the time to construct the polynomial p(x) using p/c pairs are small, in comparison to the time to encrypt the required plaintexts. Let there be n unknown coefficients in p(x). Then the time complexity for this attack is n, requiring n known distinct p/c pairs.


Interpolation attack by Meet-In-The-Middle

Often this method is more efficient. Here is how it is done. Given an r round iterated cipher with block length m, let z be the output of the cipher after s rounds with s. We will express the value of z as a polynomial of the plaintext x, and as a polynomial of the ciphertext c. Let g(x)\in GF(2^m) /math> be the expression of z via x, and let h(c)\in GF(2^m) /math> be the expression of z via c. The polynomial g(x) is obtain by computing forward using the iterated formula of the cipher until round s, and the polynomial h(c) is obtain by computing backwards from the iterated formula of the cipher starting from round r until round s+1. So it should hold that :g(x)=h(c), and if both g and h are polynomials with a low number of coefficients, then we can solve the equation for the unknown coefficients.


Time complexity

Assume that g(x) can be expressed by p coefficients, and h(c) can be expressed by q coefficients. Then we would need p+q known distinct p/c pairs to solve the equation by setting it up as a matrix equation. However, this matrix equation is solvable up to a multiplication and an addition. So to make sure that we get a unique and non-zero solution, we set the coefficient corresponding to the highest degree to one, and the constant term to zero. Therefore, p+q-2 known distinct p/c pairs are required. So the time complexity for this attack is p+q-2, requiring p+q-2 known distinct p/c pairs. By the Meet-In-The-Middle approach the total number of coefficients is usually smaller than using the normal method. This makes the method more efficient, since less p/c pairs are required.


Key-recovery

We can also use the interpolation attack to recover the secret key K. If we remove the last round of an r-round iterated cipher with block length m, the output of the cipher becomes \tilde=c_. Call the cipher the reduced cipher. The idea is to make a guess on the last round key k_r, such that we can decrypt one round to obtain the output \tilde of the reduced cipher. Then to verify the guess we use the interpolation attack on the reduced cipher either by the normal method or by the Meet-In-The-Middle method. Here is how it is done. By the normal method we express the output \tilde of the reduced cipher as a polynomial of the plaintext x. Call the polynomial p(x)\in GF(2^m) /math>. Then if we can express p(x) with n coefficients, then using n known distinct p/c pairs, we can construct the polynomial. To verify the guess of the last round key, then check with one extra p/c pair if it holds that :p(x)=\tilde. If yes, then with high probability the guess of the last round key was correct. If no, then make another guess of the key. By the Meet-In-The-Middle method we express the output z from round s as a polynomial of the plaintext x and as a polynomial of the output of the reduced cipher \tilde. Call the polynomials g(x) and h(\tilde), and let them be expressed by p and q coefficients, respectively. Then with q+p-2 known distinct p/c pairs we can find the coefficients. To verify the guess of the last round key, then check with one extra p/c pair if it holds that :g(x)=h(\tilde). If yes, then with high probability the guess of the last round key was correct. If no, then make another guess of the key. Once we have found the correct last round key, then we can continue in a similar fashion on the remaining round keys.


Time complexity

With a secret round key of length m, then there are 2^m different keys. Each with probability 1/2^m to be correct if chosen at random. Therefore, we will on average have to make 1/2\cdot 2^m guesses before finding the correct key. Hence, the normal method have average time complexity 2^(n+1), requiring n+1 known distinct c/p pairs, and the Meet-In-The-Middle method have average time complexity 2^(p+q-1), requiring p+q-1 known distinct c/p pairs.


Real world application

The Meet-in-the-middle attack can be used in a variant to attack S-boxes, which uses the inverse function, because with an m-bit S-box then S: f(x)=x^=x^ in GF(2^m). The block cipher
SHARK Sharks are a group of elasmobranch fish characterized by a cartilaginous skeleton, five to seven gill slits on the sides of the head, and pectoral fins that are not fused to the head. Modern sharks are classified within the clade Selachi ...
uses SP-network with S-box S:f(x)=x^. The cipher is resistant against differential and linear cryptanalysis after a small number of rounds. However it was broken in 1996 by Thomas Jakobsen and Lars Knudsen, using interpolation attack. Denote by SHARK(n,m,r) a version of SHARK with block size nm bits using n parallel m-bit S-boxes in r rounds. Jakobsen and Knudsen found that there exist an interpolation attack on SHARK(8,8,4) (64-bit block cipher) using about 2^ chosen plaintexts, and an interpolation attack on SHARK(8,16,7) (128-bit block cipher) using about 2^ chosen plaintexts. Also
Thomas Jakobsen Thomas Jakobsen is a mathematician, cryptographer, and computer programmer, formerly an assistant professor at the Technical University of Denmark (DTU) and head of research and development at IO Interactive. His notable work includes designing th ...
introduced a
probabilistic Probability is the branch of mathematics concerning numerical descriptions of how likely an event is to occur, or how likely it is that a proposition is true. The probability of an event is a number between 0 and 1, where, roughly speaking, ...
version of the interpolation attack using
Madhu Sudan Madhu Sudan (born 12 September 1966) is an Indian-American computer scientist. He has been a Gordon McKay Professor of Computer Science at the Harvard John A. Paulson School of Engineering and Applied Sciences since 2015. Career He received h ...
's algorithm for improved decoding of Reed-Solomon codes. This attack can work even when an algebraic relationship between plaintexts and ciphertexts holds for only a fraction of values.


References

* *
Video of presentation
at
Google Video Google Video was a free video hosting service launched by the multinational technology company Google on January 25, 2005. Similar to YouTube, this platform allowed video clips to be hosted on Google servers and embedded on to other web ...
—uses
Flash Flash, flashes, or FLASH may refer to: Arts, entertainment, and media Fictional aliases * Flash (DC Comics character), several DC Comics superheroes with super speed: ** Flash (Barry Allen) ** Flash (Jay Garrick) ** Wally West, the first Kid F ...
) * * * {{Cryptography navbox , block Cryptographic attacks