密码学原理与实践1

密码学原理与实践学习

$$
\mathcal{P}为明文(plaintext)\
\mathcal{C}或者\mathcal{\Large{e}}为密文(ciphertext)\
\mathcal{K}为密钥(key)\
$$

移位密码

在移位密码的集合中
$$
\mathcal P +\mathcal K = \mathcal C\
即(\mathcal{P+K}) mod m等于\mathcal C mod m\
左右减 \mathcal K\
\mathcal{P = C - K}\
这样就可以解释当\mathcal K作为密钥,加密\mathcal P得到的\mathcal C可以减\mathcal K再modm可以得到\mathcal P\
$$

代换密码