密码学第五版部分课后答案

更新时间:2024-05-23 08:18:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

2.4 已知下面的密文由单表代换算法产生:

请将它破译。提示:

1、正如你所知,英文中最常见的字母是e。因此,密文第一个或第二个(或许第三个)出现频率最高的字符应该代表e。此外,e经常成对出现(如meet,fleet,speed,seen,been,agree,等等)。找出代表e的字符,并首先将它译出来。 2、英文中最常见的单词是“the”。利用这个事实猜出什么字母t和h。 3、根据已经得到的结果破译其他部分。

解:由题意分析:“8”出现次数最多,对应明文为“e”,“;48”代表的明文为“the”,“)”、“*”、“5”出现频率都比较高,分别对应“s”、“n”、“a”,由此破译出密文对应的明文为: A good glass in the Bishop’s hostel in the Devil’s seat-twenty-one degrees and thirteen minutes-northeast and by north-main branch seventh limb east side-shoot from the left eye of the death’s head-a bee line from the tree through the shot fifty feet out.

2.20 在多罗的怪诞小说中,有一个故事是这样的:地主彼得遇到了下图所示的消息,他找到了密钥,是一段整数:

7876565434321123434565678788787656543432112343456567878878765654343211234 a.破译这段消息。提示:最大的整数是什么?

b.如果只知道算法而不知道密钥,这种加密方案的安全性怎么样? c.如果只知道密钥而不知道算法,这种加密方案的安全性又怎么样? 解:

A.根据提示,将密文排成每行8字母的矩阵,密钥代表矩阵中每行应取的字母,依次取相应字母即可得明文。明文为:

He sitteth between the cherubims.The isles may be glad thereof.As the rivers in the South.

B.安全性很好。若密文的字母数为8n,则共有8种可能的密钥,不易攻破。

C.安全性较差。将字母总数与密钥总数相除,得每组8个字母,即可破译。

3.8 这个问题给出了用一轮DES加密的具体数字的例子。假设明文和密钥K有相同的位模式,即:

用十六进制表示:0 1 2 3 4 5 6 7 8 9 A B C D E F

用二进制表示: 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 a.推导第一轮的子密钥 解:

经过表3.4(b)PC-1置换,得: C0:1111000011001100101010100000 D0:1010101011001100111100000000 经过表3.4(d)左移,得:

C1’:1010000110011001010101000001 D1’:0101010110011001111000000001 经过表3.4(c)置换选择,得:

K1:0000 1011 0000 0010 0110 0111 1001 1011 0100 1001 1010 0101 用十进制表示为:0 B 0 2 6 7 9 B 4 9 A 5

b.推导L0,R0

解:经过表3.2(a)置换,得

L0 :1100 1100 0000 0000 1100 1100 1111 1111 R0 :1111 0000 1010 1010 1111 0000 1010 1010 c.扩展R0求E(R0)

解:根据表3.2(C)扩充置换,得:

E(R0) = 01110 100001 010101 010101 011110 100001 010101 010101 d.计算A=E(R0)?K1 解:根据a、c可得

A = 011100 010001 011100 110010 111000 010101 110011 110000

n

e.把(d)的48位结果分成6位(数据)的集合并求对应S盒代换的值 解:根据表3.3S盒代换得

(1110) = (1000) = (1110) = (1001) = (1100) = (1010) = (1001) = (1000) =

(14) =0 (10进制) =0000 (2进制) (8) =

12 (10进制)=1100 (2进制)

(14) =2 (10进制)=0010(2进制) (9) = 1(10进制) =0001(2进制) (12) =6 (10进制) =0110 (2进制) (10) =13 (10进制)=1101(2进制) (9) =

5 (10进制) =0101 (2进制)

(8) =0 (10进制) =0000 (2进制)

f.利用(e)的结论来求32位的结果B

解:B = 0000 1100 0010 0001 0110 1101 0101 0000

g.利用置换求P(B) 解:根据表3.2(d),得

P(B) = 1001 0010 0001 1100 0010 0000 1001 1100

h.计算R1=P(B)?L0

解:R1 = 0101 1110 0001 1100 1110 1100 0110 0011

i.写出密文

解:L1=R0,连接L1、R1可得密文为:MEYE82

3.12 16个密钥(K1、K2??K16)在DSE解密过程中是逆序使用的。因此,图3.5的右半部分不再正确。请模仿表3.4(d)为解密过程设计一个合适的密钥移位扩展方案。 解: 选代轮数 移位次数

3.10 (a) 解:

T16(L15 || R15) = L16 || R16

1 0 2 1 3 2 4 2 5 2 6 2 7 2 8 2 9 1 10 11 12 13 14 15 16 2 2 2 2 2 2 1

T17(L16 || R16) = R16 || L16 IP [IP–1 (R16 || L16)] = R16 || L16

TD1(R16 || L16) = L16 || R16 ? f(L16, K16)=R15 || L15 ? f(R15, K16)

? f(R15, K16)= R15 ||L15

(b)

解:

T16(L15 || R15) = L16 || R16

–1

IP [IP (L16 || R16)] = L16 || R16

|| L16) = R16 || L16 ? f(R16, K16)= L15 ? f(R15, K16)|| R15? TD1(R16

f(R16, K16)≠L15 || R15

3.15

For 1 ≤ i ≤ 128, take ci ? {0, 1}128 to be the string containing a 1 in position i and then zeros elsewhere. Obtain the decryption of these 128 ciphertexts. Let m1, m2, . . . , m128 be the corresponding plaintexts. Now, given any ciphertext c which does not consist of all zeros, there is a unique nonempty subset of the ci’s which we can XOR together to obtain c. Let I(c) ? {1, 2, . . . , 128} denote this subset. Observe

? ? c=?ci=?E(mi)=E? ?mi÷ i?I(c)i?I(c)i?I(c)è ?

Thus, we obtain the plaintext of c by computing

i?I(c)?mi. Let 0 be the all-zero

string. Note that 0 = 0 ? 0. From this we obtain E(0) = E(0 ? 0) = E(0)

? E(0) = 0. Thus, the plaintext of c = 0 is m = 0. Hence we can decrypt every c ? {0, 1}128. 4.15

a. gcd(24140, 16762) = gcd(16762, 7378) = gcd(7378, 2006) = gcd(2006, 1360) = gcd(1360, 646) = gcd (646, 68) = gcd(68, 34) = gcd(34, 0) = 34

b. gcd(4655, 12075) = gcd(12075, 4655) = gcd(4655, 2765) = gcd(2765, 1890) = gcd(1890, 875) = gcd (875, 140) = gcd(140, 35) = gcd(35, 0) =35

4.17 a. Euclid: gcd(2152, 764) = gcd(764, 624) = gcd(624, 140) = gcd(140, 64)

= gcd(64, 12) = gcd(12, 4) = gcd(4, 0) = 4

Stein: A1 = 2152, B1 = 764, C1 = 1;

A2 = 1076, B2 = 382, C2 = 2; A3 = 538, B3 = 191, C3 = 4; A4 = 269, B4 = 191, C4 = 4; A5 = 78, B5 = 191, C5 = 4; A6 = 39, B6= 191,C6 = 4; A7 = 152, B7 = 39, C7 = 4; A8 = 76, B8 = 39, C8 = 4; A9 = 38, B9 = 39, C9 = 4; A10 = 19, B10 = 39, C10 = 4; A11 = 20, B11 = 19, C11 = 4; A12 = 10, B12 = 19, C12 = 4; A13 = 5, B13 = 19, C13 = 4; A14 = 14, B14 = 5, C14 = 4; A15 = 7, B15 = 5, C15 = 4; A16 = 2, B16 = 5, C16 = 4; A17 = 1, B17 = 5, C17 = 4; A18 = 4, B18 = 1, C18 = 4;

A19 = 2, B19 = 1, C19 = 4; A20 = 1, B20 = 1, C20 = 4;

本文来源:https://www.bwwdw.com/article/bh57.html

Top