Algebraic Attacks on Clock-Controlled Stream Ciphers
Total Page:16
File Type:pdf, Size:1020Kb
Algebraic Attacks on Clock-Controlled Stream Ciphers by Sultan Zayid Mohammed Al-Hinai Bachelor of Science (In Physics) (Strathclyde University- Glasgow -Scotland) – 2000 Master of Science (In Information Security) (Royal Holloway University of London ) – 2002 Thesis submitted in accordance with the regulations for the Degree of Doctor of Philosophy Information Security Institute Faculty of Information Technology Queensland University of Technology November 6, 2007 Keywords Stream Ciphers, Linear Feedback Shift Registers, Non Linear Feedback Shift Registers, Regular Clock- ing, Irregular Clocking, Clock-Controlled, Algebraic Attacks, Fast Algebraic Attacks. i ii Abstract Stream ciphers are encryption algorithms used for ensuring the privacy of digital telecommunications. They have been widely used for encrypting military communications, satellite communications, pay TV encryption and for voice encryption of both fixed lined and wireless networks. The current multi year European project eSTREAM, which aims to select stream ciphers suitable for widespread adoptation, reflects the importance of this area of research. Stream ciphers consist of a keystream generator and an output function. Keystream generators produce a sequence that appears to be random, which is combined with the plaintext message using the output function. Most commonly, the output function is binary addition modulo two. Cryptanalysis of these ciphers focuses largely on analysis of the keystream generators and of relationships between the generator and the keystream it produces. Linear feedback shift registers are widely used components in building keystream generators, as the sequences they produce are well understood. Many types of attack have been proposed for breaking various LFSR based stream ciphers. A recent attack type is known as an algebraic attack. Algebraic attacks transform the problem of recovering the key into a problem of solving multivariate system of equations, which eventually recover the internal state bits or the key bits. This type of attack has been shown to be effective on a number of regularly clocked LFSR based stream ciphers. In this thesis, algebraic attacks are extended to a number of well known stream ciphers where at least one LFSR in the system is irregularly clocked. Applying algebriac attacks to these ciphers has only been discussed previously in the open literature for LILI-128. In this thesis, algebraic attacks are first applied to keystream generators using stop-and go clocking. Four ciphers belonging to this group are investigated: the Beth-Piper stop-and-go generator, the alter- nating step generator, the Gollmann cascade generator and the eSTREAM candidate: the Pomaranch cipher. It is shown that algebraic attacks are very effective on the first three of these ciphers. Although no effective algebraic attack was found for Pomaranch, the algebraic analysis lead to some interesting findings including weaknesses that may be exploited in future attacks. Algebraic attacks are then applied to keystream generators using (p; q) clocking. Two well known examples of such ciphers, the step1/step2 generator and the self decimated generator are investigated. Algebraic attacks are shown to be very powerful attack in recovering the internal state of these genera- tors. A more complex clocking mechanism than either stop-and-go or the (p; q) clocking keystream generators is known as mutual clock control. In mutual clock control generators, the LFSRs control the clocking of each other. Four well known stream ciphers belonging to this group are investigated with respect to algebraic attacks: the Bilateral-stop-and-go generator, A5/1 stream cipher, Alpha 1 stream cipher, and the more recent eSTREAM proposal, the MICKEY stream ciphers. Some theoretical iii results with regards to the complexity of algebraic attacks on these ciphers are presented. The algebraic analysis of these ciphers showed that generally, it is hard to generate the system of equations required for an algebraic attack on these ciphers. As the algebraic attack could not be applied directly on these ciphers, a different approach was used, namely guessing some bits of the internal state, in order to reduce the degree of the equations. Finally, an algebraic attack on Alpha 1 that requires only 128 bits of keystream to recover the 128 internal state bits is presented. An essential process associated with stream cipher proposals is key initialization. Many recently proposed stream ciphers use an algorithm to initialize the large internal state with a smaller key and possibly publicly known initialization vectors. The effect of key initialization on the performance of algebraic attacks is also investigated in this thesis. The relationships between the two have not been investigated before in the open literature. The investigation is conducted on Trivium and Grain-128, two eSTREAM ciphers. It is shown that the key initialization process has an effect on the success of algebraic attacks, unlike other conventional attacks. In particular, the key initialization process allows an attacker to firstly generate a small number of equations of low degree and then perform an algebraic attack using multiple keystreams. The effect of the number of iterations performed during key initialization is investigated. It is shown that both the number of iterations and the maximum number of initialization vectors to be used with one key should be carefully chosen. Some experimental results on Trivium and Grain-128 are then presented. Finally, the security with respect to algebraic attacks of the well known LILI family of stream ci- phers, including the unbroken LILI-II, is investigated. These are irregularly clock- controlled nonlinear filtered generators. While the structure is defined for the LILI family, a particular paramater choice defines a specific instance. Two well known such instances are LILI-128 and LILI-II. The security of these and other instances is investigated to identify which instances are vulnerable to algebraic attacks. The feasibility of recovering the key bits using algebraic attacks is then investigated for both LILI- 128 and LILI-II. Algebraic attacks which recover the internal state with less effort than exhaustive key search are possible for LILI-128 but not for LILI-II. Given the internal state at some point in time, the feasibility of recovering the key bits is also investigated, showing that the parameters used in the key initialization process, if poorly chosen, can lead to a key recovery using algebraic attacks. iv Contents Front Matter i Keywords . i Abstract . iii Table of Contents . v List of Figures . xi List of Tables . xiii Notation . xiv Declaration . xv Previously Published Material . xvii Acknowledgements . xix 1 Introduction 1 1.1 Overview of Stream Ciphers . 2 1.1.1 Measuring the Security Provided by Stream Ciphers . 2 1.1.2 The One Time Pad . 2 1.1.3 Keystream Generators for Stream Ciphers . 3 1.1.4 Background on LFSR Based Stream Ciphers . 4 1.1.5 Clock-Controlled Generators . 4 1.2 Introduction to Cryptanalysis . 7 1.3 Algebraic Attacks . 8 1.4 Key Initialization . 8 1.5 Aims and Objectives of Thesis . 10 1.6 Contributions and Achievements . 10 1.7 Outline of the Thesis . 10 2 Overview of Algebraic Attacks on LFSR based Stream Ciphers 13 2.1 Framework for Algebraic Attacks . 14 2.1.1 Equation Generation . 15 Linearly Updated Internal States . 15 Nonlinearly Updated Internal States . 18 2.1.2 Reducing the Degree of the Equations . 19 2.1.3 Methods for Solving Nonlinear Equations . 24 Linearization . 24 v Grobner¨ Bases . 27 Other Methods . 28 2.2 Fast Algebraic Attacks . 31 2.2.1 Precomputation Phase . 31 2.2.2 Realtime Phase . 32 2.3 Summary . 35 3 Keystream Generators using Stop-and-Go Clocking 37 3.1 Introduction . 37 3.2 Equation Generation for Stop-and-Go Generators . 38 3.3 Beth-Piper Stop-and-Go Generator . 39 3.3.1 Description of the Basic Beth-Piper Stop-and-Go Generator . 39 3.3.2 Algebraic Attack of the Basic Beth-Piper Stop-and-Go Generator . 39 3.3.3 The Strengthened Beth-Piper Stop-and-Go Generator . 41 3.3.4 Algebraic Attack on the Strengthened Beth-Piper Stop-and-Go Generator . 41 Reducing the Degree of the Equations . 41 3.3.5 Experimental Results . 42 3.3.6 Comparison with Previous Cryptanalysis . 43 3.3.7 Fast Algebraic Attack on Strengthened Beth-Piper Stop-and-Go Generator . 46 3.4 Alternating Step Generator . 47 3.4.1 Description . 47 3.4.2 Algebraic Attack on the Alternating Step Generator . 47 3.4.3 Experimental Results . 48 3.4.4 Comparison with Previous Cryptanalysis . 49 3.4.5 Modified Alternating Step Generator . 51 3.4.6 Alternative Algebraic Attacks on the Alternating Step Generator . 51 3.5 Cascade Generators . 52 3.6 Gollmann Cascade Generator . 53 3.6.1 Description . 53 3.6.2 Algebraic Attack on the Gollmann Cascade Generator . 53 Recovering the Initial State . 54 3.6.3 Experimental Results . 56 3.6.4 Comparison with Previous Cryptanalysis . 56 3.6.5 An Alternative Algebraic Attack . 58 3.6.6 Clock-Controlled Cascade Generator with Output Bits Taken from All Registers 59 3.7 Pomaranch . 60 3.7.1 Pomaranch Description . 60 3.7.2 Algebraic Analysis of Pomaranch . 62 Overcoming the Problem of the Degree Accumulation . 63 Algebraic Analysis of the Filter Function . 65 3.8 Summary . 65 vi 4 Keystream Generators using (p; q) Clocking 67 4.1 Introduction . 67 4.2 Step1/Step2 Generator . 68 4.2.1 Description . 68 4.2.2 Algebraic Attack on the Step1/Step2 Generator . 68 4.2.3 Experimental Results . 69 4.2.4 Comparison with Previous Cryptanalysis . 70 4.2.5 Alternative Algebraic Attack on the Step1/Step2 Generator . 72 4.3 Self-Decimated Generator . 73 4.3.1 Description . 73 4.3.2 Algebraic Attack on the Self-Decimated Generator . 73 4.3.3 Experimental Results . 74.