2 Vigenre Cipher Vigenre Cipher l caesar ciphers

  • Slides: 10
Download presentation

2. Vigenère Cipher 最简单的多字母替换密码(Vigenère Cipher ) l ——多重 caesar ciphers l 密钥是多字母长度 K =

2. Vigenère Cipher 最简单的多字母替换密码(Vigenère Cipher ) l ——多重 caesar ciphers l 密钥是多字母长度 K = k 1 k 2. . . kd l 数学表示: l Encryption is done using l l l Decryption is done using l l Eki(a): a -> a + ki (mod 26) Dki(a): a -> a - ki (mod 26)

3. Vigenère Example write the plaintext out l under it write the keyword repeated

3. Vigenère Example write the plaintext out l under it write the keyword repeated l then using each key letter in turn as a caesar cipher key l encrypt the corresponding plaintext letter l Plaintext THISPROCESSCANALSOBEEXPRESSED l Keyword CIPHERCIPHERCIPHE l Plaintext VPXZTIQKTZWTCVPSWFDMTETIGAHLH l

3. Vigenère Example l l l C -> CDEFGHIJKLMNOPQRSTUVWXYZAB I -> IJKLMNOPQRSTUVWXYZABCDEFGH P ->

3. Vigenère Example l l l C -> CDEFGHIJKLMNOPQRSTUVWXYZAB I -> IJKLMNOPQRSTUVWXYZABCDEFGH P -> PQRSTUVWXYZABCDEFGHIJKLMNO H -> HIJKLMNOPQRSTUVWXYZABCDEFG E -> EFGHIJKLMNOPQRSTUVWXYZABCD R -> RSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ to map the above plaintext letters. 'T' uses key 'C' maps to 'V' 'H' uses key 'I' maps to 'P' 'I' uses key 'P' maps to 'X' etc

4. Beauford Cipher l 类似 Vigenère密码,但顺序相反 l 数学描述: l Encryption is done using l

4. Beauford Cipher l 类似 Vigenère密码,但顺序相反 l 数学描述: l Encryption is done using l l Eki(p): p -> ki - p (mod 26) Decryption is done using l Dki(c): c -> ki - c (mod 26) eg. if using a single key letter of 'd' have translation alphabet l Plain: ABCDEFGHIJKLMNOPQRSTUVWXYZ l Cipher: DCBAZYXWVUTSRQPONMLKJIHGFE l

5. Variant-Beauford Cipher 类似 Vigenère密码,但是移位向左 l 实际上是Vigenère 逆密码 (decrypts it) l 数学表示: l Encryption

5. Variant-Beauford Cipher 类似 Vigenère密码,但是移位向左 l 实际上是Vigenère 逆密码 (decrypts it) l 数学表示: l Encryption is done using l l l Eki(a): a -> a - ki (mod 26) Decryption is done using l Dki(a): a -> a + ki (mod 26) eg. Variant-Beauford key 'c' (shift left 2 places) l same as Vigenère key 'y' (shift right 24 places) l

6. Autokey Cipher 更多的字母替换表可以提高密码的安全性 l Vigenère 提出了自动密钥密码( autokey cipher ) l 密钥字作为消息的前缀组成密钥 l knowing

6. Autokey Cipher 更多的字母替换表可以提高密码的安全性 l Vigenère 提出了自动密钥密码( autokey cipher ) l 密钥字作为消息的前缀组成密钥 l knowing keyword can recover the first few letters l then use these in turn on the rest of the message l eg. given key "DECEPTIVE" and message "WE ARE DISCOVERED SAVE YOURSELF" l key: DECEPTIVEWEAREDISCOVEREDSAV l plaintext: WEAREDISCOVEREDSAVEYOURSELF l ciphertext: ZICVTWQNGKZEIIGASXSTSLVVWLA l

Problems with autokey ciphers l l l l Autorkey cipher 看起来好象比较安全 实际上仍然有语言特征 characteristics are

Problems with autokey ciphers l l l l Autorkey cipher 看起来好象比较安全 实际上仍然有语言特征 characteristics are used by the key as the message ie. a key of 'E' will be used more often than a 'T' etc hence an 'E' encrypted with a key of 'E' occurs with probability (0. 1275)2 = 0. 01663, about twice as often as a 'T' encrypted with a key of 'T' given sufficient ciphertext this can be broken if a truly random key as long as the message is used, the cipher will be secure called a Vernam Cipher or One-Time pad, we meet this later