Security Engineering. Ross Anderson

Чтение книги онлайн.

Читать онлайн книгу Security Engineering - Ross Anderson страница 83

Security Engineering - Ross  Anderson

Скачать книгу

may see for the Feistel cipher is psi left-parenthesis f comma g comma h comma period period period right-parenthesis where f, g, h, … are the successive round functions. Under this notation, the above cipher is psi left-parenthesis f 1 comma f 2 comma period period period f Subscript 2 k minus 1 Baseline comma f Subscript 2 k Baseline right-parenthesis. The basic result that enables us to decrypt a Feistel cipher – and indeed the whole point of his design – is that:

Schematic illustration of the Feistel cipher structure. psi Superscript negative 1 Baseline left-parenthesis f 1 comma f 2 comma period period period comma f Subscript 2 k minus 1 Baseline comma f Subscript 2 k Baseline right-parenthesis equals psi left-parenthesis f Subscript 2 k Baseline comma f Subscript 2 k minus 1 Baseline comma period period period comma f 2 comma f 1 right-parenthesis

      In other words, to decrypt, we just use the round functions in the reverse order. Thus the round functions f Subscript i do not have to be invertible, and the Feistel structure lets us turn any one-way function into a block cipher. This means that we are less constrained in trying to choose a round function with good diffusion and confusion properties, and which also satisfies any other design constraints such as code size, software speed or hardware gate count.

       5.4.3.1 The Luby-Rackoff result

      The key theoretical result on Feistel ciphers was proved by Mike Luby and Charlie Rackoff in 1988. They showed that if f Subscript i were random functions, then psi left-parenthesis f 1 comma f 2 comma f 3 right-parenthesis was indistinguishable from a random permutation under chosen-plaintext attack, and this result was soon extended to show that psi left-parenthesis f 1 comma f 2 comma f 3 comma f 4 right-parenthesis was indistinguishable under chosen plaintext/ciphertext attack – in other words, it was a pseudorandom permutation. (I omit a number of technicalities.)

      In engineering terms, the effect is that given a really good round function, four rounds of Feistel are enough. So if we have a hash function in which we have confidence, it is straightforward to construct a block cipher from it: use four rounds of keyed hash in a Feistel network.

       5.4.3.2 DES

      The DES algorithm is widely used in banking and other payment applications. The ‘killer app’ that got it widely deployed was ATM networks; from there it spread to prepayment meters, transport tickets and much else. In its classic form, it is a Feistel cipher, with a 64-bit block and 56-bit key. Its round function operates on 32-bit half blocks and consists of three operations:

       first, the block is expanded from 32 bits to 48;

       next, 48 bits of round key are mixed in using exclusive-or;

       the result is passed through a row of eight S-boxes, each of which takes a six-bit input and provides a four-bit output;

       finally, the bits of the output are permuted according to a fixed pattern.

      DES was introduced in 1974 and immediately caused controversy. The most telling criticism was that the key is too short. Someone who wants to find a 56 bit key using brute force, that is by trying all possible keys, will have a total exhaust time of 2 Superscript 56 encryptions and an average solution time of half that, namely 2 Superscript 55 encryptions. Whit Diffie and Martin Hellman argued in 1977 that a DES keysearch machine could be built with a million chips, each testing a million keys a second; as a million is about 2 Superscript 20, this would take on average 2 Superscript 15 seconds, or a bit over 9 hours, to find the key. They argued that such a machine could be built for $20 million in 1977 [557]. IBM, whose scientists invented DES, retorted that they would charge the US government $200 million to build such a machine. (In hindsight, both were right.)

      During the 1980’s, there were persistent rumors of DES keysearch machines being built by various intelligence agencies, but the first successful public keysearch attack took place in 1997. In a distributed effort organised over the net, 14,000 PCs took more than four months to find the key to a challenge. In 1998, the Electronic Frontier Foundation (EFF) built a DES keysearch machine called Deep Crack for under $250,000, which broke a DES challenge in 3 days. It contained 1,536 chips run at 40MHz, each chip containing 24 search units which each took 16 cycles to do a test decrypt. The search rate was thus 2.5 million test decryptions per second per search unit, or 60 million keys per second per chip. The design of the cracker is public and can be found at [619]. By 2006, Sandeep Kumar and colleagues at the universities of Bochum and Kiel built a machine using 120 FPGAs and costing $10,000, which could break DES in 7 days on average [1110]. A modern botnet with 100,000 machines would take a few hours. So the key length of single DES is now inadequate.

      Another criticism of DES was that, since IBM kept its design principles secret at the request of the US government, perhaps there was a ‘trapdoor’ which would give them easy access. However, the design principles were published in 1992 after differential cryptanalysis was invented and published [473]. The story was that IBM had discovered these techniques in 1972, and the US National Security Agency (NSA) even earlier. IBM kept the design details secret at the NSA's request. We'll discuss the political aspects of all this in 26.2.7.1.

      We now have a fairly thorough analysis of DES. The best known shortcut attack, that is, a cryptanalytic attack involving less computation than keysearch, is a linear attack using 2 Superscript 42 known texts. DES would be secure with more than 20 rounds, but for practical purposes its security is limited by

Скачать книгу