vigenere cipher for example, choose a word “gold” for a key. and, add “goldgoldgold….” to...

10
Vigenere Cipher For example, choose a word “GOLD” for a key. And, add “GOLDGOLDGOLD….” to your plaintext Plaintext: t o o m u c h h y p e Key : GOLDGOLDGOLD _____+ ___________________ ZCZPAQSKEDP 1

Upload: abigail-chase

Post on 05-Jan-2016

214 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Vigenere Cipher For example, choose a word “GOLD” for a key. And, add “GOLDGOLDGOLD….” to your plaintext Plaintext: t o o m u c h h y p e Key : GOLDGOLDGOLD

1

Vigenere Cipher

• For example, choose a word “GOLD” for a key.

• And, add “GOLDGOLDGOLD….” to your plaintext

Plaintext: t o o m u c h h y p eKey : GOLDGOLDGOLD_____+___________________ ZCZPAQSKEDP

Page 2: Vigenere Cipher For example, choose a word “GOLD” for a key. And, add “GOLDGOLDGOLD….” to your plaintext Plaintext: t o o m u c h h y p e Key : GOLDGOLDGOLD

2

Breaking the Vigenere Cipher

• Key: finding the length of the key. • Kasiski Attack: For example, suppose “ZXY”

occurs in the cyphertext at • 17th place, 137th place, 217th place, 265th

place, …• Then, the length of the key may divide• 137-17=120, 217-137=80, 265-217=48, …• So, the length of the key| g.c.d.(120, 80, 48,

…)=8• There are also statistical methods.

Page 3: Vigenere Cipher For example, choose a word “GOLD” for a key. And, add “GOLDGOLDGOLD….” to your plaintext Plaintext: t o o m u c h h y p e Key : GOLDGOLDGOLD

Strengthening Vigenere Cipher

To strengthen a Vigenere cipher, you may use Latin squares for addition table.

Latin square exampleA Latin square of order q is an qq array

whose entries are taken from an alphabet of q symbols such that each symbol occurs exactly once in each row and column.

A Latin square can be used to define a new “addition table.”

Page 4: Vigenere Cipher For example, choose a word “GOLD” for a key. And, add “GOLDGOLDGOLD….” to your plaintext Plaintext: t o o m u c h h y p e Key : GOLDGOLDGOLD

Stream Cipher

We have learned one-time pad, Vigenere cipher, and so on. If we use a Latin square for the addition table, then it’s a little more general cipher, which is called “a stream cipher.”

Page 5: Vigenere Cipher For example, choose a word “GOLD” for a key. And, add “GOLDGOLDGOLD….” to your plaintext Plaintext: t o o m u c h h y p e Key : GOLDGOLDGOLD

Improving the key of the Vigenere cipher

A simple improvement: encipher twice using two different keys k1 and k2.

For example, encrypt a message once with the key FOXES and again with the key WOLVES

Then, the actual key isFOXESFOXESFOXESFOXES…WOLVESWOLVESWOLVES….+______________________BCIZWXKLPNJGTSDASPAGQJBWOTZSIK

Page 6: Vigenere Cipher For example, choose a word “GOLD” for a key. And, add “GOLDGOLDGOLD….” to your plaintext Plaintext: t o o m u c h h y p e Key : GOLDGOLDGOLD

You see that the length of the key is l.c.d. (5, 6)=30.

You can encrypt many times more with keys with different lengths. Re-encrypting with a word of length 7 (example: JAGUARS)-> the new key of period 210

Page 7: Vigenere Cipher For example, choose a word “GOLD” for a key. And, add “GOLDGOLDGOLD….” to your plaintext Plaintext: t o o m u c h h y p e Key : GOLDGOLDGOLD

FISH

So, if you keep doing this for keys with lengths then the length of the key is l.c.d. (). And it quickly becomes very large.

In this way, you would think that you can make the Vigenere cipher very safe.

This idea was exploited in the Second World War German cipher codenamed “Fish”, so-called because it used the Siemens T52 machine known as Sagefisch

Page 8: Vigenere Cipher For example, choose a word “GOLD” for a key. And, add “GOLDGOLDGOLD….” to your plaintext Plaintext: t o o m u c h h y p e Key : GOLDGOLDGOLD

It was a Vigenere cipher with keys of lengths 41, 31, 29, 26 , 23, 43, 47, 51, 53,…. And the period of the keystring was their product (they are all prime to each other) 16033955073056318658.

Apparently the British intelligence service could break it. So, no cipher is truly safe.

Page 9: Vigenere Cipher For example, choose a word “GOLD” for a key. And, add “GOLDGOLDGOLD….” to your plaintext Plaintext: t o o m u c h h y p e Key : GOLDGOLDGOLD

Pseudorandom numbers

What is “random”? According to Kolmogorov,

A sequence is random if it cannot be generated by an algorithm with a description much shorter than the sequence itself.

An alternative is to try to generate a sequence that has some desirable features of a random string.

Which we call “pseudo-random”

Page 10: Vigenere Cipher For example, choose a word “GOLD” for a key. And, add “GOLDGOLDGOLD….” to your plaintext Plaintext: t o o m u c h h y p e Key : GOLDGOLDGOLD

One such way is “linear shift register”Example:0010->0100->1001->…And put them all together001001…