历史:

  • 1974年被IBM提出
  • 1977-1998,被美国政府当做最好的密码
  • 如今是不安全的(秘钥太短了)
    • 但是3次DES是安全的
  • ![[Pasted image 20240504131823.png]]
    ![[Pasted image 20240511161048.png]]

Q:我们如何建立这样的密码块

16个循环
![[Pasted image 20240504132812.png]]

feistel 网络

  • ![[Pasted image 20240511153113.png]]
    IP置换和逆IP置换
  • IP置换和密码学无关,只是技术问题
  • ![[Pasted image 20240504140344.png]]

f函数

  • ![[Pasted image 20240504141241.png]]
    • E盒(expansion——扩展)
      • ![[Pasted image 20240504141952.png]]
        • 有16个元素映射了两次
    • S盒
      • ![[Pasted image 20240504143035.png]]
      • ![[Pasted image 20240504143119.png]]
        • ![[Pasted image 20240504143325.png]]
        • 二进制转十进制然后查表得数,中间四位选列,前后两位选行

P排序

秘钥表

  • 有影响的秘钥为64-8=56,有八个无效
    • 没原因
  • ![[Pasted image 20240511155728.png]]

decrytion(解密)

  • 加密和解密一样
    • 只是反过来
    • ![[Pasted image 20240511163358.png]]
    • ![[Pasted image 20240511163409.png]]

安全

  • 密码分析攻击
    • 选择明文攻击
      • 需要2的47次方的明密文
        • 远小于原来的2的56次方,但也几乎不可能
    • 流密码攻击
      • 2的43次方
  • 蛮力攻击