现代密码学简述
现代密码学涉及确保完整性的机制、交换密钥的技术、验证用户的协议、电子拍卖和选举、数字现金等。
在不尝试提供完善定义的情况下,我们会说现代密码学涉及对保护数字信息、系统和分布式计算免受对抗性攻击的数学技术的研究。
对称加密(Private-key encryption)
- 共享密钥(“对称设置”)的两方希望在监视所有通信的对手在场的情况下秘密通信。——核心问题:安全地秘密共享秘钥。
- 将数据本地存储在可能受到威胁(被黑/被盗)的设备上。——核心问题:共享秘钥很简单,如何安全地存储或维护密钥。
加密语法
K——密钥空间
M——明文空间
C——密文空间
注:{0,1}*:所有有限长二进制字符串的集合
Gen——密钥生成算法(概率算法)
Enc——加密算法
Dec——解密算法
正确性:
柯克霍夫定理
The cipher method must not be required to be secret, and it must be able to fall into the hands of the enemy without inconvenience.
——加密的安全性取决于密钥的保密性而非算法的保密性。
古典密码
- 移位加密:凯撒密码,ROT13。密钥空间太小,无法抵抗穷举攻击。——Sufficient key-space principle
- 单表置换密码(Mono-alphabetic substitution cipher):无法隐藏明文的统计特性。
- 多表置换密码(The Vigenėre (poly-alphabetic) cipher):同样未隐藏明文统计特性。
现代密码学原则
基于可证明安全(规约性安全)provable security (aka. reductionist security).
- 提供安全目标和威胁模型的形式化定义。
- 明确声明所需假设。
- 提供方案构建在假设下满足定义的证明。
安全加密的定义(Security goal)
无论攻击者已经拥有任何信息,密文都不应泄露有关底层明文的额外信息。
Regardless of any information an attacker already has, a ciphertext should leak no additional information about the underlying plaintext.
——如何捕捉敌手的先验知识?
——不泄录信息的含义?
威胁模型(Threat model)/*只针对加密算法*/
唯密文攻击,已知明文攻击,选择明文攻击,选择密文攻击。
在其他条件都相同时,最强的是选择密文攻击,但基于较弱的假设,较弱的概念可能更容易/更有效。
the threat model needs to match the context in which the scheme is being deployed.
精确的假设
P vs NP问题
为证明安全性,需要“困难假设”。
Assumptions used in public-key cryptography require a lot of structure (factoring, pairing-based assumptions). Assumptions in secret-key cryptography are more ad-hoc.
证明安全性
Provable security VS real-world security