# 第四讲古典替换密码

Document Sample

```					第四讲 古典替换密码
1。多字母表替换密码 (Polyalphabetic ciphers)
   增强密码安全性的方法是使用多字母替换密码
   hence the name polyalphabetic ciphers
   使得密码分析更困难，因为有较多的密码表去
猜测
   打乱了字母出现的频率
   用一个密钥决定对每个字母使用什么字母变换
表
   密钥的第I个字母指定第I个字母表ith letter of
key specifies ith alphabet to use
   依次使用每个字母表use each alphabet in turn
   repeat from start after end of key is reached

2. Vigenère Cipher

 最简单的多字母替换密码（Vigenère Cipher ）
 ——多重 caesar ciphers
 密钥是多字母长度 K = k1 k2 ... kd

 数学表示：
 Encryption is done using
   Eki(a): a -> a + ki (mod 26)
   Decryption is done using
   Dki(a): a -> a - ki (mod 26)

3. Vigenère Example

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

   C -> CDEFGHIJKLMNOPQRSTUVWXYZAB
   I -> IJKLMNOPQRSTUVWXYZABCDEFGH
   P -> PQRSTUVWXYZABCDEFGHIJKLMNO
   H -> HIJKLMNOPQRSTUVWXYZABCDEFG
   E -> EFGHIJKLMNOPQRSTUVWXYZABCD
   R -> RSTUVWXYZABCDEFGHIJKLMNOPQ
   ABCDEFGHIJKLMNOPQRSTUVWXYZ
   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
   类似 Vigenère密码，但顺序相反

   数学描述:

   Encryption is done using
   Eki(p): p -> ki - p (mod 26)

   Decryption is done using
   Dki(c): c -> ki - c (mod 26)

   eg. if using a single key letter of 'd' have translation alphabet
    Plain: ABCDEFGHIJKLMNOPQRSTUVWXYZ
   Cipher: DCBAZYXWVUTSRQPONMLKJIHGFE
5. Variant-Beauford Cipher
   类似 Vigenère密码，但是移位向左
   实际上是Vigenère 逆密码 (decrypts it)
   数学表示：
   Encryption is done using
   Eki(a): a -> a - ki (mod 26)
   Decryption is done using
   Dki(a): a -> a + ki (mod 26)

   eg. Variant-Beauford key 'c' (shift left 2 places)
   same as Vigenère key 'y' (shift right 24 places)
6. Autokey Cipher
   更多的字母替换表可以提高密码的安全性
   Vigenère 提出了自动密钥密码（ autokey cipher ）
   密钥字作为消息的前缀组成密钥

   knowing keyword can recover the first few letters
   then use these in turn on the rest of the message

 eg. given key "DECEPTIVE" and message "WE ARE
DISCOVERED SAVE YOURSELF"
 key:
DECEPTIVEWEAREDISCOVEREDSAV
 plaintext:
WEAREDISCOVEREDSAVEYOURSELF
 ciphertext: ZICVTWQNGKZEIIGASXSTSLVVWLA
Problems with autokey ciphers
   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

```
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
 views: 3 posted: 9/10/2012 language: Unknown pages: 10