【编码】OTP加密以及基于群运算的One Time Element加密

1.基于群运算的

(链接:https://www.zhihu.com/question/25088082/answer)

下面用个例子来说明在一些设定下,One Time Element满足完善保密性(perfect security)吧.
令这个群为 \mathbb{Z}_p^{*}, 其中p为素数,则此群含有p-1个不同元素。
加密算法为 C=m \cdot g^{x}\mod p,
其中C是密文,m是明文,且m是1到p-1之间的整数。
g为此群的生成元(generator)。x是密钥,x以平均概率从 \mathbb{Z}_{p}\backslash\{0\}随机取值, 也就是说x是1到p-1的任意整数。
根据香农定理。因为:
1. 密钥空间K大小为p-1,因为x是1到p-1的任意整数。x的分布为平均分布。
2. 明文空间M大小为p-1,因为m只有p-1个不同的值。
3. 对于每个m, 能且只能算出来一个C,因此密文空间C的大小也是p-1。此外,确定m和c,可以算出唯一一个满足条件的x。
所以此加密方式是完善保密的(perfect secure)
===========分割线=======================
下面对被反复问到的一个问题作答:
OTE是不是 OTP?
答:不是。
原因:操作的集合不同,操作符不同。
OTP的定义见维基百科 en.m.wikipedia.org/wiki
In this technique, a plaintext is paired with random, secret key (or pad). Then, each bit or character of the plaintext is encrypted by combining it with the corresponding bit or character from the pad usingmodular addition. If the key is truly random, and at least as long as the plaintext, and never reused in whole or in part, and kept completely secret, then the resulting ciphertext will be impossible to decrypt or break.
其中清楚提到OTP的操作对象是bit,操作符是modular addition, 二进制下就是XOR.
评论里我也提到过,从香农定理出发,只需要找到一个含有从两个不同的自身元素到另一个自身元素、封闭的二元运算符的代数结构,以及对此操作符定义出来的逆元也在这个结构内,就可以构建perfect secure的加密方案。不是每个这种方案都有名字的。
另外,证明ElGama安全性的过程中, 用到的是OTE,不是OTP, 或者陈述为challenge中的密文和攻击者之前收到的明文-密文对无关,所以优势为0。

猜你喜欢

转载自blog.csdn.net/weixin_39878297/article/details/80476142