0%

Serious Cryptography

Serious Cryptography

Jean Philippe Aumasson

Vigenère Cipher

The first step to breaking it is to figure out the key’s length.

The second step to breaking it is to determine the actual key using a method called frequency analysis, which exploit the uneven distribution of letters in languages. For example, in English, E is the most common letter.

How Ciphers Work

We can try to abstract out the workings of a cipher, first by identifying its two main components: a permutation and a mode of operation. A permutation is a function that transforms an item (a letter or a group of bits) such that each item has a unique inverse(for example, the Caesar cipher’s three-letter shift).A mode of operation is an algorithm that uses a permutation to process messages of arbitrary size.

The Permutation

Most classical ciphers work by replacing each letter with another letter– in other words, bu performing a substitution.

With a permutation, each letter has exactly one inverse.

In order to be secure, a cipher’s permutation should satisfy three criteria:

  • The permutation should be determined by the key. so as to keep the permutation secret as long as the key is secret.

  • Different keys should result in different permutations.

  • The permutation should look random.

We’ll call a permutation that satisfies these criteria a secure permutation. But as you’ll see next, a secure permutation is necessary but not sufficient on its own for building a secure cipher. A cipher will also need a mode o operation to support message of any length.

The Mode of Operation

To build a secure cipher, you must combine a secure permutation with a secure mode. Ideally, this combination prevents attackers from learning anything about a message other than its length.

Why Classical Ciphers Are Insecure

Classical ciphers are doomed to be insecure because they’re limited to operations you can do in your head or on a piece of paper. They lack the computational power of a computer and are easily broken by simple commuter program. Let’s see the fundamental reason why that simplicity makes them insecure in today’s world.

Remember that a ciphers’ permutation should look random in order to be secure. of course the best way to look random is to be random- that is . to select every permutation randomly from the set of all permutations. And there are many permutations to choose from. In the case of 26-letter English alphabet, there are approximately

2^88^ permutations

​ $26! ≈ 2^{88}$

This number is huge: it’s of the same order of magnitude as the number of atoms in human body. But classical ciphers can only use a small fraction of those permutations-namely, those that need only simple operations(such as shifts) and that have a short description(like a short algorithm or a small look-up table). The problem is that a secure permutation can’t accommodate both of these limitations.

Perfect Encryption: The One-Time Pad

the one-time pad is the most secure cipher. In fact, it guarantees perfect secrecy: even if an attacker has unlimited computing power, it’s impossible to learn anything about the plaintext except for its length

Encrypting with the One-Time Pad

​ $C = P \oplus K$

where C, P and K are bit strings of the same length

$C_{1} \oplus C_{2} = ( P_{1} \oplus K ) \oplus ( P_{2} \oplus K ) = P_{1} \oplus P_{2} \oplus K \oplus K = P_{1} \oplus P_{2}$