繁体   English   中英

带有Ceasar加密的OTP加密

[英]OTP encryption with ceasar encryption

为什么不使用OTP来加密多个消息,但是XOR之后的每次加密都会在CT上执行类似替代/凯撒密码的操作?

重复使用一次性键盘是不好的,因为它可以为您提供有关按键的信息。

p: a plaintext message to be encrypted: p_1 p_2 ... p_n
e_i: encryption of p_i with key k_i
otp: e_i = p_i^k_i for ii in 1..n

如果您对多条消息进行加密并将它们异或在一起,则会得到类似

e1_1^e2_1 = p1_1^k_1^k_1^p2_1

并且由于k_1^k_1取消,因此变为

e1_1^e2_1 = p1_1^p2_1

因此,您可以立即了解有关消息的信息,但是如果您碰巧知道有关输入的信息,那么您还将了解有关键的信息。

通过凯撒密码之类的东西,您可能会说

e2_1 = p2_1^(k_1+13) 

假设密钥和消息空间为26个字母的字母。 不幸的是,在收到2条消息后,您的密钥又被换回了,您又回到了以前的问题。 (还有其他大问题)

更一般而言,无论您做什么简单的事情,都会泄露有关消息的信息,通常是密钥。 一旦给他们足够的信息,攻击者通常可以建立一个大型的方程矩阵并使用线性代数来求解密钥。

但是,如果您将简单的事情付诸实践,并使其变得越来越复杂,最终到了

kn: the key for the nth message
kn = f(k,n) for some function k

这样, for n!= m , you've invented a stream cipher. People do use stream ciphers all the time; they are not as secure as OTP, but they are a core of internet security. The trick of course is figuring out a good function f(k,n) given f(k,m) for攻击者将无法了解有关f(k,n) given重要信息, you've invented a stream cipher. People do use stream ciphers all the time; they are not as secure as OTP, but they are a core of internet security. The trick of course is figuring out a good function , you've invented a stream cipher. People do use stream ciphers all the time; they are not as secure as OTP, but they are a core of internet security. The trick of course is figuring out a good function , you've invented a stream cipher. People do use stream ciphers all the time; they are not as secure as OTP, but they are a core of internet security. The trick of course is figuring out a good function f`。 描述如何做到这一点超出了这个问题的范围。 (此外,我实际上没有那种技能)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM