crypto-3

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

2011-3-16
Cryptography and Network Security - 2
20/51
Substitution Boxes S
Have eight S-boxes which map 6 to 4 bits Each S-box is actually 6 to 4 bit box
Feistel解密算法:以密文作为算法的输入,以相反的次序使用密钥Ki, Kn、Kn-1、...、K0.
2011-3-16 Cryptography and Network Security - 2 13/51
Feistel Cipher Encryption and Decryption
2011-3-16
假设明文为(p1,p2,p3,p4,p5,p6,p7,p8),其密文为 (c1,c2,c3,c4,c5,c6,c7,c8),密钥(k1,k2,k3,k4,k5,k6,k7,k8,k9,k10)未 知,则ci是pj和kj的多项式函数gi 加密算法可以表示成10个未知量的8个非线性等式,可能有多个 解,但是每一个都可以计算出来并用于分析 置换和加法是线性映射,S盒是非线性的。把(p0,0,p0,1,p0,2,p0,3) 写作(a,b,c,d),把(p1,0,p1,1,p1,2,p1,3)写作(w,x,y,z),它们的输出 是(q,r,s,t),S0的操作可以定义为: q = abcd + ab + ac + b + d r = abcd + abd + ab + ac + ad + a + c + 1(s,t由S1定义) 类似地,可以定义S1的方程。
?sbox问题?其设计标准没有公开但是迄今没有发现s盒存在致命弱点?计时攻击?计时攻击利用的事实是加密或解密算法对于不同的输入所花的时间有细微的差别?des能够很好地抵抗计时攻击差分密?差分密码分析攻击问题?des不能抵御差分分析?针对des的密码分析攻击主要利用了加密器的一些深层结构?搜集加密信息?最终设法恢复部分或全部子密钥的位?如果必要的话对其余部分再辅以穷举搜索?这些攻击实际上是统计分析包括?差分分析线性分析相关密钥攻击分析攻击问34des的安全强度2951cryptographyandnetworksecurity2201412935差分分析和线性分析?差分密码分析differentialcryptanalysis?历史1990年murphybiham和shamir首次提出用差分密码分析攻击分组密码和散列函数是第一种可以以少于255的复杂性对des进行破译的方法
2011-3-16
Cryptography and Network Security - 2
12/51
Feistel加密器设计原则 Feistel加密器设计原则
分组长度:分组越长则安全性越高,但加/解密速度越低, 分组长度为64位是一个合理的折衷 密钥长度:密钥越长越安全,但加/解密速度越低,64位 长的密钥已被证明是不安全的,128位是常用的长度 迭代次数:迭代越多越安全,通常为16次迭代 子密钥产生算法:越复杂则密码分析越困难 Round循环函数:越复杂则抗密码分析的能力越强 快速的软件加密/解密:算法的执行速度很重要 简化分析难度:算法简洁清楚,易于分析弱点,发现问题
19/51
Cipher分组加密 分组加密循环细节 Feistel Cipher分组加密循环细节
将明文分成左右两部分,如: Li = Ri–1 Ri = Li–1 xor F(Ri–1, Ki) 将32-bit右半部和48-bit子密钥做以下动作: 32-bit 48-bit : expands R to 48-bits using permutation E adds to subkey passes through 8 S-boxes to get 32-bit result finally permutes this using 32-bit perm P
Initial permutation of the key (PC1) which selects 56-bits in two 28-bit halves 16 stages consisting of:
9/51
Feistel密码 Feistel密码
Claude Shannon and Substitution-Permutation Ciphers 1949年,Claude Shannon 引进了substitution-permutation (S-P) networks的思想,即现代的乘积加密器modern substitutiontransposition product cipher,形成了现代分组加密的基础。S-P networks 是基于替代和置换这两个基本操作的。 提供了对明文信息处理所做的confusion和diffusion 。
2011-3-16
Cryptography and Network Security - 2
4/51
2011-3-16
Cryptography and Network Security - 2
5/51
简化DES DES的分析 简化DES的分析
对简化DES的穷举攻击是可行的,只有1024种密钥 密码分析(考虑已知明文攻击)
21/51
2011-3-16
Cryptography and Network Security - 2
22/51
2011-3-16
Cryptography and Network Security - 2
23/51
子密钥的产生
Forms subkeys used in each round Consists of:
Cryptography and Network Security - 2
14/51
3.3 数据加密标准
历史的回顾
IBM developed Lucifer cipher (1971)
• by team led by Horst Feistel • used 64-bit data blocks with 128-bit key
Chapter 3 Block Cipher and Data Encryption Standard
Fourth Edition by William Stallings
Cryptography and Network Security
第3章 分组密码与数据加密标准
分组密码的原理
流密码(Stream Cipher)和分组密码(Block Cipher)
Feistel密码结构的设计动机
分组密码对n比特的明文分组进行操作,产生一个n比特的密文分 组,共有2n个不同的明文分组,每一种都必须产生一个唯一的密 文分组,这种变换称为可逆的或非奇异的。
可逆映射 00 11 01 10 10 00 11 01 不可逆映射 00 11 01 10 10 01 11 01
10/51
2011-3-16
Cryptography and Network Security - 2
11/51
Feistel密码结构 Feistel密码结构
1973年,Horst Feistel提出 了基于可逆乘积加密器概念 的Feistel Cipher:
将输入分组分成左右两部分, 实施Shannon’s的substitutionpermutation network 概念 对左半部数据实施多回合的替 代操作(substitution) 对右半部数据和子密钥应用 round函数F,其输出与左一半 做异或 将这两部分进行互换 (permutation swapping)
Tuchman-Mayer redeveloped as a commercial cipher with input from NSA(National Security Agency, 国家安全局) and others, 56-bit key, easy to implement on single chip In 1973 NBS (National Bureau of Standards 国家标 准局) issued request for proposals for a national cipher standard IBM submitted(递交) their revised Lucifer which was eventually accepted as the DES
Shannon认为,为了对付基于统计分析的密码破译,必须对明文作 Shannon confusion(混乱)和diffusion(扩散)处理,以减少密文的统计特性,为统 计分析制造障碍。
diffusion – dissipates(驱除) statistical structure of plaintext over bulk of ciphertext,明文统计结构扩散消失到大批密文统计特性中,
2011-3-16
Cryptography and Network Security - 2
7/51
n = 4时的一个普通代换密码的结构 4时的一个普通代换密码的结构
2011-3-16
Cryptography and Network Security - 2
8/51
Hale Waihona Puke 2011-3-16Cryptography and Network Security - 2
outer bits 1 & 6 (row bits) select one rows inner bits 2-5 (col bits) are substituted result is 8 lots of 4 bits, or 32 bits
Row selection depends on both data & key
2011-3-16
Cryptography and Network Security - 2
6/51
3.2 分组密码原理
分组密码
大多数分组密码基于 Feistel Cipher Structure 分组加密器本质上就是一个巨大的替换器 64位的分组就有 264种输入 采用了乘积加密器的思想,即轮流使用替代和置换
2011-3-16
Cryptography and Network Security - 2
2/51
简化的DES 3.1 简化的DES
S-DES与DES有相似的性 质和结构,参数小得多, 适用于教学 S-DES加密算法输入为8 位明文组和10位密钥, 10 输出10位 10 加密算法包括5个函数: 初始置换IP,复杂函数 fk,简单置换函数SW, 再次fk, 逆置换函数IP-1
feature known as autoclaving (autokeying)
Example(S中的每个数占6位,第一位占2位,第 二位占4位)
S(18 09 12 3d 11 17 38 39) = 5fd25e03
2011-3-16
Cryptography and Network Security - 2
17/51
初始置换IP (Initial Permutation)和逆置换IP-1 初始置换IP Permutation)和逆置换IP 和逆置换
2011-3-16
Cryptography and Network Security - 2
18/51
2011-3-16
Cryptography and Network Security - 2
使明文和密文之间统计关系尽量复杂;
confusion – makes relationship between ciphertext and key as complex as possible,使密文和加密密钥之间的关系尽量复杂。
2011-3-16
Cryptography and Network Security - 2
DES加密
2011-3-16 Cryptography and Network Security - 2 15/51
2011-3-16
Cryptography and Network Security - 2
16/51
2011-3-16
Cryptography and Network Security - 2
2011-3-16
Cryptography and Network Security - 2
3/51
简化DES DES的加密和解密 简化DES的加密和解密
加密过程: ciphertext = IP-1(fK2(SW(fK1(IP(plaintext))))) where K1 = P8(Shift(P10(key))) K2 = P8(Shift(Shift(P10(key)))) 解密过程: plaintext = IP-1(fK1(SW(fK2(IP(ciphertext)))))
如果密文不仅与最初给定的算法和密钥有关,同 时也与明文位置有关(是所处位置的函数),则称为流密 码体制。加密以明文比特为单位,以伪随机序列与明 文序列模2加后,作为密文序列,一次一比特/字节。 如果经过加密所得到的密文仅与给定的密码算法 和密钥有关,与被处理的明文数据在整个明文中的位 置无关,则称为分组密码体制。通常以大于等于64位 的数据块为单位,加密得相同长度的密文。
相关文档
最新文档