移位加密法The Shift Cipher

移位加密法 The Shift Cipher

        將每一個英文字都加上一個 Key 的值
        加密:eK(x) = (x+K) mod 26
        解密: dK(y) = (y-K) mod 26
 eg.

        K = 11
        原文: student
        密文: DEFOPZE

Plaintext
s
t
u
d
e
n
t
18
19
20
3
4
13
19
+K
3
4
5
14
15
25
4
Ciphertext
D
E
F
O
P
Z
E


沒有留言:

張貼留言