Pdf 801.15 K
Total Page:16
File Type:pdf, Size:1020Kb
The ISC Int'l Journal of Information Security July 2017, Volume 9, Number 2 (pp. 101{110) ISeCure http://www.isecure-journal.org On the Computational Complexity of Finding a Minimal Basis for the Guess and Determine Attack Shahram Khazaei 1, and Farokhlagha Moazami 2;∗ 1Sharif University of Technology, Department of Mathematical Sciences, Iran, Tehran 2Shahid Beheshti University, Cyberspace Research Institute, Iran, Tehran A R T I C L E I N F O. ABSTRACT Article history: Guess-and-determine attack is one of the general attacks on stream ciphers. Received: 6 March 2017 Revised: 13 June 2017 It is a common cryptanalysis tool for evaluating security of stream ciphers. Accepted: 10 July 2017 The effectiveness of this attack is based on the number of unknown bits Published Online: 12 July 2017 which will be guessed by the attacker to break the cryptosystem. In this Keywords: work, we present a relation between the minimum number of the guessed Guess-and-determine Attack, Computational Complexity, bits and uniquely restricted matching of a graph. This leads us to see that NP-complete, Fixed Parameter finding the minimum number of the guessed bits is NP-complete. Although Tractable, Uniquely Restricted Matching, Alternating Cycle Free fixed parameter tractability of the problem in term of minimum number of Matching, Perfect Matching, Jump the guessed bits remains an open question, we provide some related results. Number, Forcing Number. Moreover, we introduce some closely related graph concepts and problems including alternating cycle free matching, jump number and forcing number of a perfect matching. c 2017 ISC. All rights reserved. 1 Introduction ficient on modern w-bit processors where typically w = 8; 16; 32; 64. These ciphers can be described us- uess-and-determine (GD) attack is a general ing some equations over F2w . GD attack is a basic Gcryptanalysis technique for evaluating security of divide-and-conquer approach to solve the correspond- symmetric cryptosystems. In particular, GD attacks ing equation system. The attacker guesses the values have been a favourite tool for evaluating strength of some unknowns, and then recovers the remaining of many prominent stream ciphers during the past variables using the available relations. If the guessed decade. Examples include, the attacks on RC4 in [1], values are incorrect, the attacker reaches a contradic- on A5/1 in [2], on Snow family in [3{7] on Sober tion. However, if he is lucky and the guessed values family in [8{13], on Sosemanuk in [14{16], on Polar are correct, the remaining unknowns will be deter- Bear in [17, 18] and on Rabbit in [19]. mined. To mount the attack, all possible values for the set of guessed variables, known as basis, must be Any cryptosystem can essentially be described us- tried. Thus, the effectiveness of the attack is deter- ing a system of nonlinear equations. In many cases, mined by the size of the basis. the system is an over-defined set of equations over some finite field. In particular, many ciphers proposed In this paper, we consider a class of GD attacks on during the last decades have been designed to be ef- a system of m equations over Fq involving n unknown variables where m = poly(n) and q = O(1). We as- ∗ Corresponding author. sume that each equation in this system has the follow- Email addresses: [email protected] (S. Khazaei), ing property: if the equation depends on, let us say, t f [email protected] (F. Moazami) variables and t − 1 of them are known, then the last ISSN: 2008-2045 c 2017 ISC. All rights reserved. ISeCure 102 Computational Complexity of Finding a Minimal Basis for the Guess and ... | Khazaei and Moazami variable is uniquely and efficiently determined. This GD attack which leads to improved cryptanalytic at- is a typical property of equations derived for many tacks in practice. Finally, the paper is concluded in ciphers in practice. Assume that a basis of size k ex- Section 7. ists and the attacker knows one. To mount the actual attack, the attacker then needs to try all qk possible 2 Graph Preliminaries ways that the unknowns can be assigned. Since the We assume that the reader is familiar with basic graph correctness of each assignment can be efficiently veri- terminologies. Here we introduce some more advance fied, one can find all satisfying solutions essentially notions. Appendix A includes some illustrating exam- k in time O(q ), ignoring polynomial factors. ples. An isolated vertex is a vertex with degree zero. The naive approach to find a basis of size k, if one An empty graph has no edges, i.e., it consists of only n isolated vertices. A pendant vertex is a vertex with exists, is to examine all k subsets of size k of the set of all unknowns. Checking if a given subset is a basis degree one. A matching in a graph is a set of edges can be done in polynomial time. Therefore, this leads where no two edges share a common vertex. A vertex to the time complexity O(nkpoly(n)) for finding a is matched (or saturated) if it is an endpoint of one of basis of size k. the edges in the matching. A matching of a graph is called perfect if all vertices of the graph are matched. Finding a basis using the naive approach is already unfeasible even for moderate values such as n = Definition 2.1 (uniquely restricted matching). 64 and k = 10 since nk = 260 is considered hardly A matching M in a graph G is called a uniquely re- stricted matching if its matched vertices induce a sub- affordable for cryptanalysis purposes. Therefore, GD graph which has a unique (perfect) matching, namely attacks have often been designed ad-hoc based on the experience of cryptanalysts to find a basis of a small M itself (see Figure A.1a and A.1b). size. There are also some research [5{7] trying to find Definition 2.2 (alternating cycle with respect a (non-optimal) basis in a more systematic way using to a matching). Let M be a matching in graph some heuristics based on greedy algorithms. G. A cycle in G is called alternating with respect to M if its edges appear alternately in M and 1.1 Motivation and Contribution E(G)setminusM (see Figure A.1c). Definition 2.3 (alternating cycle free match- Although finding an optimal basis, i.e., a basis with ing). A matching M in a graph G is called alter- minimum size, has been understood to be a difficult nating cycle free if G has no alternating cycle with problem by cryptanalysts, to the best of our knowl- respect to M. edge, no attempt has been devoted to understand the Definition 2.4 (tree decomposition of a graph). computational complexity aspects of this problem. In A tree decomposition of a graph G is a pair (T; B), this paper, we consider a rigorous treatment of the where T is a tree and B = fB g is a collec- problem of finding a minimum-size basis and show i i2V (T ) tion of subsets of V called bags, such that (see Fig- that it is NP-complete. We also study the fixed pa- ure A.2): rameter tractability of the minimal basis problem in terms of the size of optimal basis size k; that is, if it • Every vertex of G is contained in at least one has an O(f(k)poly(n))-algorithm. This is very impor- bag Bi, tant both from a theoretical complexity point of view • For each edge of G, some bag Bi contains both and practical cryptanalysis since the naive approach its vertices, has a lower bound complexity Ω(nk). Although we • For all vertices i; j; k 2 V (T ), if j belongs to the are not able to prove the fixed parameter tractability unique path from i to k in T , then Bi \ Bk ⊂ of the problem in terms of k, we show that it is fixed Bj. parameter tractable in terms of the treewidth of a Definition 2.5 (treewidth of a graph). The graph which we associate to the problem. width of a tree decomposition (T; B) is one less than The remainder of this paper is organized as fol- its maximum bag size, i.e., maxi2V (T )jBi|−1. The lows. In Section 2, we introduce some graph concepts treewidth of a graph G is defined as the minimum that are used in the next sections. In Section 3, we width over all possible tree decompositions of G. give a precise definition of finding a minimal basis See [20, 21] for more details about treewidth and for GD attack and present an equivalent description tree decomposition. of the problem in graph theory terminology. Then in Section 4, we study computational complexity of the 3 Minimal Basis Problem finding a minimal basis. Section 5 relates our prob- lem to two other mathematical problems from graph In this section, we provide a formal definition of theory. In Section 6, we discuss some aspects of the the problem of finding a minimum-size basis of an ISeCure July 2017, Volume 9, Number 2 (pp. 101{110) 103 equation set with some special properties. We also has no basis of size one, but has some bases of size present an equivalent description of the problem in two, e.g., B = fx2; x3g. graph theory terminology which is easier to work with. We need to introduce some definitions. Our goal is to study the problem of finding a mini- mal basis of an invertible equations system.