- 1、本文档共10页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
斯坦福密码课程04.4-using-block-annotated
Using block ciphers
Modes of operation:many time key (CBC)
Online Cryptography Course Dan Boneh
Example applications:
1. File systems: Same AES key used to encrypt many files.
2. IPsec: Same AES key used to encrypt many packets.
Construction 1: CBC with random IV
Let (E,D) be a PRP. ECBC(k,m): choose random IV∈X and do:
E(k,)
E(k,)
E(k,)
m[0]
m[1]
m[2]
m[3]
IV
E(k,)
c[0]
c[1]
c[2]
c[3]
IV
ciphertext
Decryption circuit
In symbols: c[0] = E(k, IV⨁m[0] ) ⇒ m[0] = D(k, c[0]) ⨁ IV
CBC: CPA Analysis
CBC Theorem: For any L0, If E is a secure PRP over (K,X) then ECBC is a sem. sec. under CPA over (K, XL, XL+1).
In particular, for a q-query adversary A attacking ECBC there exists a PRP adversary B s.t.:
AdvCPA [A, ECBC] 2AdvPRP[B, E] + 2 q2 L2 / |X|
Note: CBC is only secure as long as q2L2 |X|
An example
q = # messages encrypted with k , L = length of max message
Suppose we want AdvCPA [A, ECBC] ≤ 1/232 ⇐ q2 L2 /|X| 1/ 232
AES: |X| = 2128 ⇒ q L 248
So, after 248 AES blocks, must change key
3DES: |X| = 264 ⇒ q L 216
AdvCPA [A, ECBC] 2PRP Adv[B, E] + 2 q2 L2 / |X|
Warning: an attack on CBC with rand. IV
CBC where attacker can predict the IV is not CPA-secure !!
Suppose given c ⟵ ECBC(k,m) can predict IV for next message
Chal.
Adv.
kK
m0=IV⨁IV1 , m1 ≠ m0
output 0
if c[1] = c1[1]
predict IV
Bug in SSL/TLS 1.0: IV for record #i is last CT block of record #(i-1)
c [ IV, E(k, m1⨁IV) ]
Construction 1’: nonce-based CBC
Cipher block chaining with unique nonce: key = (k,k1)
E(k,)
E(k,)
E(k,)
m[0]
m[1]
m[2]
m[3]
E(k,)
c[0]
c[1]
c[2]
c[3]
nonce
ciphertext
nonce
unique nonce means: (key, n) pair is used for only one message
An example Crypto API (OpenSSL)
void AES_cbc_encrypt(
const unsigned char *in,
unsigned char *out,
size_t length,
const AES_KEY *key,
unsigned char *ivec,
您可能关注的文档
最近下载
- 第18章中国传媒业的新生态、新业态《网络与新媒体概论》教学课件.ppt VIP
- 三相桥式可控整流电路设计..doc
- 第17章互联网与网民素养《网络与新媒体概论》教学课件.ppt VIP
- 第14章互联网与精准营销《网络与新媒体概论》教学课件.ppt VIP
- 《典型灾害应急实训》课程大纲(本科).docx VIP
- 第12章互联网与社会思潮《网络与新媒体概论》教学课件.ppt VIP
- 护士N2晋级N3述职报告PPT.pptx
- 《人力资源规划HRP》课件.pptx VIP
- 第9章互联网与民主政治建设《网络与新媒体概论》教学课件.pptx VIP
- (新版)高级考评员职业技能鉴定考试题库(含答案).docx
文档评论(0)