Lec 7: Ch 3(Stream Cipher Systems) ... 3.1 RUNNING-KEY CIPHER

advertisement
Lec 7: Ch 3(Stream Cipher Systems)
……
Computer & Data Security
3.1 RUNNING-KEY CIPHER
If we choose a key with its length as long as the plaintext message, then
the cipher is called running-key cipher. A text of a book can be used as a key
sequence in a substitution cipher based on shifted alphabets
(i.e.
non-periodic Vigenere). Running key might be expected to be unbreakable
because it has non-periodic key; but the key has redundancy due to nonrandomness of its characters.
Example: Giving a key K selected from a textbook and a message M:
M:
T H E T R E A S U R E I S B U R I E D....
K:
T H E S E C O N D C I P H E R I S A N....
EK (M): M O I L V G O F X T M X Z F L A A E Q....
If the key has redundancy, the cipher may be breakable using friend Nan's
method. Fried Nan's approach is based on the observation that a large
proportion of letters in the cipher text will correspond to encipherments , where
both, the plaintext and key letters fall in the high frequency category.
3.2 VERNAM CIPHER:
The implementation of one-time раd cipher is in vented by Gilbert
Vernam in 1917; he designed a cryptographic device based on 32-character
Baudot code for new teletype writer developed at AT&T. Each character is
represented as a combination of five marks and spaces corresponding to 1 and
0. A Vernam idea is to run a second synchronized non repeating random
sequence of key character punched on paper tape during transmission which
would cause each Baudot (0 or 1) on the message tape to be Xored with its
corresponding value on the key tape. Each plain text is added
(mod 2) to the
key stream, and generates a cipher text bit stream.
C = Ek(m) =C1 , C2 , C3, …..
Where Ci = (mi +kj) mod 2
36
Lec 7: Ch 3(Stream Cipher Systems)
……
Computer & Data Security
Vernam cipher is efficiently implemented in microelectronics by taking the
(exlusive_or) (XOR).
Ci =Mi
ki
Mi =Ci
ki
XOR Truth table:
X1
X2
XOR
0
0
0
1
0
1
0
1
1
0
0
0
Example:
M=A: 11000
K=D: 10010
E (M): 01010
If Vernam key is repeated then the cipher is equal to a running-key Cipher
with a text as a key. There were two immediate problems; first both a party
has to possess identical copies of key tape, secondly, repeated use carried the
danger of working out the period of repetition cycle.
3.3 ONE-TIME PAD CIPHER:
Army cryptologist Major Joseph Mauborgne who carried out a research
into Vemam's system, he suggested an endless tape contain sequence of
random characters which is used as a key stream, and used one time and one
time only. If a peace of this key is used to encrypt a message, then there is not
37
Lec 7: Ch 3(Stream Cipher Systems)
……
Computer & Data Security
enough information to break the cipher. Such a cipher called one-time pad
cipher, because the key is not repeated (i.e. it is not periodic). If plaintext
message M consist of m1 m2 m3... ..............md , then a piece of one-time key
k1 k2 k3............... ...kd will be used to encrypt this message.
C =Ek (M)
where Ci = (mi +ki) mod n
The main drawback of the cipher is that; it requires a long and random
key sequence, which should be available for both parties. Figure 3-1 illustrates
One-time pad system.
Random sequence K1 K2….. Kn
Mixer
Cryptogram C1C2…Cn
Message m1m2... mn
Figure (3-1) One Time Pad System.
Reusing one-time pad can lead to a catastrophe. Suppose, a two
plaintext M1 and M2 are encrypted modulo 26 with the same random key K as
shown in the following .
M1 S E L L S I L V E R
M2 B U Y C O C A I N E
18 4 11 11 18 8 11 21 4 17
1 20 24 2 14 2 0 8 13 4
K
11 6 20 4 1 5 6 9 5 20
K
C1
3 10 5 15 2 13 17 4 9 11
C2 12 0 18 6 24 7 6 17 18 24
D K F P C N R E J L
MA S G Y H G R S Y
38
11 6 20 4 1 5 6 9 5
20
Lec 7: Ch 3(Stream Cipher Systems)
……
Computer & Data Security
C1i = M1i + Ki mod 26
C2i = M2i + Ki mod 26
If both cipher text C1 and C2 are intercepted, cryptanalyst may create a
third cipher text C3 from C1 and C2: C3i = C1i - C2i mod 26
Now we can decrypt C3 by: M1 = C3 + M2 mod 26
C1
D K F P C N R E J L
3 10 5 15 2 13 17 4 9 11
C2
M A S G
Y H G R S Y
12 0 18 6 24 7
C3
6 17 18 24
17 10 13 9 4 6 11 13 17 13
R K N J E G L N R N
M2
B U Y C O C A I
N
E
1 20 24 2 14 2 0 8 13 4
M1
18 4 11 11 18 8 11 21 4 17
S E L
L S I
L V
E
R
As mentioned above One-Time-Pad system (OTP) is a perfect secrecy
cryptographic system, and indeed there are some applications in today's world,
primarily for Ultra-Secure low bandwidth channels. Hot line between the
United State and the former Soviet Union was (is it still active!) rumored to be
encrypted with a One-Time-Pad (OTP). Unfortunately most practical
applications can not use OTP for many reasons, among them, key distribution
and storage problems. Since the famous paper of Shannon in 1947 till now, a
tremendous work has been done to build (or more precisely to simulate) a
perfect secrecy cryptographic system.
39
Download