没有合适的资源?快使用搜索试试~ 我知道了~
首页《密码学原理与实践》第三版 部分章节的部分习题答案
资源详情
资源评论
资源推荐
Homework of Cryptography
Tony Zhu
December 20, 2010
1 Classical Cryptography
1.21
(c) Affine Cipher
Solution: Since in the affine cryptosystem only φ(26) × 26 = 312 cases for key
K = (a, b), list all the cases brutally with the help of computer and scan quickly, I
found only one case seems meaningful:
ocanadaterredenosaieuxtonfrontestceintdefleuronsglorieuxcartonbrassaitporterlepeeils
aitporterlacroixtonhistoireestuneepopeedesplusbrillan tsexploitsettavaleurdefoitrem-
peeprotegeranosfoyersetnosdroits
After breaking the long sentence, I found it should be the French version of
Canada national anthem:
O Canada
Terre de nos a
¨
ıeux
Ton front est ceint de fleurons glorieux!
Car ton bras sait porter l’
´
ep
´
ee
Il sait porter la croix!
Ton histoire est une
´
epop
´
ee
Des plus brillants exploits
Et ta valeur, de foi tremp
´
ee
Prot
´
egera nos foyers et nos droits
1.22
1
Proof. (a) Obviously in the case p
1
≥ p
2
≥ 0, q
1
≥ q
2
≥ 0, the sum p
1
q
1
+ p
2
q
2
is maximized.
Suppose S =
P
n
i=1
p
i
q
0
i
is maximized, and if there exists i > j such that q
0
i
< q
0
j
,
permute the positions of the two numbers and, according to the statement of last
paragraph, we get S
0
=
P
0≤h≤n
h,i, j
p
h
q
0
h
+ p
i
q
0
j
+ p
j
q
0
i
> S , contradicts. So the only
arrangement for S is q
0
1
≥ . . . ≥ q
0
n
. v
2 Shannon’s Theory
2.2
Proof. P = C = K = {1, . . . , n}. ∀x ∈ P, ∀y ∈ C
Pr[Y = y] =
X
k∈K
Pr[K = k]Pr[x = d
k
(y)] = 1/n
so
Pr[x|y] =
Pr[x]Pr[y|x]
Pr[y]
=
Pr[x]
1
n
1
n
= Pr[x]
that is this Latin Square Cryptosystem achieves perfect secrecy provided that ev-
ery key is used with equal probability. v
2.3
Proof. Similarly as (2.2). v
2.5
Proof. According to Theorem 2.4, this cryptosystem provides perfect secrecy iff
every key is used with equal probability 1/|K |, and for every x ∈ P and y ∈ C ,
there is unique key k ∈ K , such that y = e
k
(x).
2
Due to perfect secrecy, we have
Pr[x|y] = Pr[x]
=⇒
Pr[x]Pr[y|x]
Pr[y]
= Pr[x]
=⇒ Pr[y] = Pr[y|x ] = Pr
e
k
(x)=y
[K = k] = 1/|K |.
that is every ciphertext is equally probable. v
2.11
Proof. (Perfect secrecy ⇒ H(P|C)=H(P)).
H(P|C) = −
X
y∈C
X
x∈P
Pr[y]Pr[x|y] log
2
Pr[x|y]
= −
X
y∈C
X
x∈P
Pr[y]Pr[x] log
2
Pr[x]
= H(P)
X
y∈C
Pr[y]
= H(P).
(H(P|C) = H(P) ⇒ Perfect secrecy).
According to Theorem 2.7,
H(P, C) ≤ H(P) + H(C)
with equality iff P and C are independent random variables.
so
H(P|C) = H(P)
=⇒ H(P, C) = H(P) + H(C)
=⇒ P and C are independent random variables
=⇒ ∀x ∈ P, ∀y ∈ C, Pr[x|y] = Pr[x],
that is the cryptosystem achieves perfect secrecy. v
2.12
3
Proof. We have
H(K, P, C) = H(P|K, C) + H(K, C) = H(K, C),
so
H(K, P, C) ≥ H(P, C)
=⇒ H(K, C) ≥ H(P, C)
=⇒ H(K|C) = H(K, C) − H(C) ≥ H(P, C) − H(C) = H(P|C).
v
2.13
Solution: H(P) =
1
2
+
1
3
log
2
3 +
1
6
log
2
6 ≈ 1.45915.
H(K) = log
2
3 ≈ 1.58496.
Pr[1] = 2/9
Pr[2] = 5/18
Pr[3] = 1/3
Pr[4] = 1/6
H(C) ≈ 1.95469.
H(K|C) = H(K) + H(P) − H(C) ≈ 1.08942.
Pr[K
1
|1] = 3/4 Pr[K
2
|1] = 0 Pr[K
3
|1] = 1/4
Pr[K
1
|2] = 2/5 Pr[K
2
|2] = 3/5 Pr[K
3
|2] = 0
Pr[K
1
|3] = 1/6 Pr[K
2
|3] = 1/3 Pr[K
3
|3] = 1/2
Pr[K
1
|4] = 0 Pr[K
2
|4] = 1/3 Pr[K
3
|4] = 2/3
H(P|C) ≈ 1.08942.
2.14
Solution: H(K) = log
2
216, H(P) = log
2
26, H(C) = log
2
26,
H(K|C) = H(K) + H(P) − H(C) = log
2
216 ≈ 7.75489.
It is easy to evaluate:
H(K|P, C) = log
2
12 ≈ 3.58496.
4
2.19
Proof. A key in the product cipher S
1
×S
2
has the form (s
1
, s
2
), where s
1
, s
2
∈ Z
26
,
e
(s
1
, s
2
)
(x) = x + (s
1
+ s
2
).
But this is precisely the definition of a key in the Shift Cipher. Further, the proba-
bility of a key in S
1
× S
2
equals
25
P
i=0
1
26
p
i
=
1
26
25
P
i=0
=
1
26
, which is also the probability
of a key in the Shift Cipher. Thus S
1
× S
2
is the Shift Cipher. v
2.20
Proof. (a) Similarly as (2.19).
(b) The number of keys in S
3
equals 26
lcm(m
1
, m
2
)
. Form the following fact we
can see that the keys in S
1
× S
2
are lesser when m
1
. 0 (mod m
2
).
Notice
m
2
< m
1
, m
1
. 0 (mod m
2
)
=⇒ m
1
+ m
2
< 2m
1
≤
m
2
gcd(m
1
, m
2
)
m
2
= l, where l , lcm(m
1
, m
2
)
the equation below, which essentially gives the representation of the keys of prod-
uct cryptosystem S
1
×S
2
, would’t always has a solution (K
1
, K
2
) = (x
1
, . . . , x
m
1
, y
1
, . . . , y
m
2
) ∈
K
1
× K
2
, for any selected key K = (z
1
, . . . , z
l
) ∈ K
3
,
I
m
1
I
m
2
I
m
2
.
.
.
.
.
.
I
m
2
I
m
1
I
m
2
x
1
.
.
.
x
m
1
y
1
.
.
.
y
m
2
=
z
1
.
.
.
.
.
.
z
l
,
because the coefficient matrix’s column number is less than the row number. Con-
clusively, there must exist key K ∈ K
3
that not in K
1
× K
2
. v
3 The RSA Cryptosystem and Factoring Integers
5.2
5
剩余20页未读,继续阅读
llkkop
- 粉丝: 3
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- stc12c5a60s2 例程
- Android通过全局变量传递数据
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论28