Sei sulla pagina 1di 3

DIGITAL ASSIGNMENT-1

AUTO KEY CIPHER

NAME: Himmaja reddy B.S

REG NO:15MIS0027

INTRODUCTION: The Autokey Cipher is a polyalphabetic substitution cipher. It is


closely related to the Vigenere cipher, but uses a different method of generating the key. It
was invented by Blaise de Vigenere in 1586, and is in general more secure than the Vigenere
cipher.

ENCRYPTION: Encryption using the Autokey Cipher is very similar to the Vigenère
Cipher, except in the creation of the keystream. The keystream is made by starting with the
keyword or keyphrase, and then appending to the end of this the plaintext itself.

KEY-KEY

PLAINTEXT – SECRETKEY

KEYSTREAM- KEYSECRET

ENCRYPTION:
S E CR E T KE Y

18 4 2 17 4 19 10 4 24

K E Y S E C R E T

10 4 24 18 4 2 17 4 19

C.T – For S&K---(18+10)mod 26=2----C

– For E&E---(4+4)mod 26=8--- -I

– For C&Y---(2+24)mod 26=0---- A

– For R&S---(17+18)mod 26=9---- J


– For E&E---(4+4)mod 26=8--- -I

– For T&C---(19+2)mod 26=21---- V

– For K&R---(10+17)mod 26=1----B

– For E&E---(4+4)mod 26=8--- -I

– For Y&T---(24+19)mod 26=17---R

C.T = CIAJIAVBIR

DECRYPTION:
P.T = (C.T – K) % 26

C.T = C I A J I V B I R

2 8 0 9 8 21 1 8 17

K E Y S E C R E T

10 4 24 18 4 2 17 4 19

P.T = (2-10)%26 = 18---- S

(8-4)%26 = 4---- E

(0-24)%26 = 2---- C

(9-8)%26 = 17---- R

(8-4)%26 = 4 -----E

(21-2)%26 = 19---- T

(1-17)%26 = 10---- K

(8-4)%26 = 4 ---- E

(7-19)%26 = 24---- Y
P.T = SECRET KEY

STRENGTHS: The Autokey Cipher is a much more secure way of generating the
keystream than the Vigenère Cipher, which is amazing since for over 200 years it was
believed that the Vigenère was unbreakable. The weakness of the Vigenère Cipher was the
repeating nature of the keystream, which allowed us to work out the length of the keyword
and thus perform frequency analysis on the different parts. The Autokey Cipher does not
suffer from this weakness, as the repeating nature of the keystream is not used. However,
even though it is more secure, it is still not impossible to break the Autokey Cipher.

WEAKNESS: On the other hand, this cipher is not very secure. when the attacker knows
some parts of the plaintext because the plaintext is part of the key.The weakness here is that it
is likely that some common words will have been used in the plaintext, and thus also in the
keystream. For example "the" is likely to appear in the keystream somewhere, and so by
trying this everywhere we can identify other bits of likely plaintext, and put these back in the
keystream, and so on.

Potrebbero piacerti anche