与顺序无关的密码 [英] Order-independent ciphers

查看:259
本文介绍了与顺序无关的密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否存在加密和解密顺序是任意的加密方法?



也就是说,如果有两个键(或键盘对) K1,K2 ,消息 M ,并且获得密码 C ,例如 C = M * K1 * K2 (其中 * 表示加密),则消息 M 可以以下列每种方式检索:1) M = C * K1 * K2 ,2) M = C * K2 * K1 (这里 * 表示解密)。



显然, XOR 是一个普通的候选人。

使用任何强的块密码(例如AES),并在输出反馈模式计数器模式



由于OFB和CTR本质上只是与加密伪随机流异或,所以它将具有您寻找的属性。只要确保您的K1和K2是独立的。



此外,由于OFB和CTR是NIST-批准模式,只要您正确实施它们并使用强大的基础块密码,它们将是加密强。


Is there exist a ciphering approach such that encrypting and decrypting order is arbitrary? Like using two padlocks on the same lock loop.

That is, if there are two keys (or keypairs) K1, K2, message M, and the cryptogram C is obtained as (for example) C=M*K1*K2 (where * denotes ciphering), then the message M can be retrieved in each of the following ways: 1) M=C*K1*K2, 2) M=C*K2*K1 (here * denotes deciphering).

Obviously, XOR is a trivial candidate. Do any cryptographically strong examples exist?

解决方案

Take any strong block cipher (e.g. AES) and run it in Output Feedback Mode or Counter Mode.

Since OFB and CTR are essentially just XOR with a cryptographic pseudo-random stream, this will have the property you seek. Just make sure your K1 and K2 are independent.

Also, since OFB and CTR are NIST-approved (and widely-used) block cipher modes, they will be "cryptographically strong" as long as you implement them correctly and use a strong underlying block cipher.

这篇关于与顺序无关的密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆