密码编码学与网络安全(第五版)答案
密码编码学与网络安全课后习题答案全
密码编码学与网络安全课后习题答案全YUKI was compiled on the morning of December 16, 2020密码编码学与网络安全(全)1.1 什么是OSI安全体系结构?OSI安全体系结构是一个架构,它为规定安全的要求和表征满足那些要求的途径提供了系统的方式。
该文件定义了安全攻击、安全机理和安全服务,以及这些范畴之间的关系。
1.2 被动安全威胁和主动安全威胁之间的差别是什么?被动威胁必须与窃听、或监控、传输发生关系。
电子邮件、文件的传送以及用户/服务器的交流都是可进行监控的传输的例子。
主动攻击包括对被传输的数据加以修改,以及试图获得对计算机系统未经授权的访问。
1.4验证:保证通信实体之一,它声称是。
访问控制:防止未经授权使用的资源(即,谁可以拥有对资源的访问,访问在什么条件下可能发生,那些被允许访问的资源做这个服务控制)。
数据保密:保护数据免受未经授权的披露。
数据完整性:保证接收到的数据是完全作为经授权的实体(即包含任何修改,插入,删除或重播)发送。
不可否认性:提供保护反对否认曾参加全部或部分通信通信中所涉及的实体之一。
可用性服务:系统属性或访问和经授权的系统实体的需求,可用的系统资源,根据系统(即系统是可用的,如果它提供服务,根据系统设计,只要用户要求的性能指标它们)。
第二章1.什么是对称密码的本质成分?明文、加密算法、密钥、密文、解密算法。
4.分组密码和流密码的区别是什么?流密码是加密的数字数据流的一个位或一次一个字节。
块密码是明文块被视为一个整体,用来产生一个相同长度的密文块......分组密码每次处理输入的一组分组,相应的输出一组元素。
流密码则是连续地处理输入元素,每次输出一个元素。
6.列出并简要定义基于攻击者所知道信息的密码分析攻击类型。
惟密文攻击:只知道要解密的密文。
这种攻击一般是试遍所有可能的密钥的穷举攻击,如果密钥空间非常大,这种方法就不太实际。
因此攻击者必须依赖于对密文本身的分析,这一般要运用各种统计方法。
密码编码学和网络安全(第五版)答案解析
Access control: The prevention of unauthorized use of a resource (i.e., this service controls who can have access to a resource, under what conditions access can occur, and what those accessing the resource are allowed to do).Data confidentiality: The protection of data from unauthorized disclosure.Data integrity: The assurance that data received are exactly as sent by an authorized entity (i.e., contain no modification, insertion, deletion, or replay).Nonrepudiation: Provides protection against denial by one of the entities involved in a communication of having participated in all or part of the communication.Availability service: The property of a system or a system resource being accessible and usable upon demand by an authorized system entity, according to performance specifications for the system (i.e., a system is available if it provides services according to the system design whenever users request them).1.5 See Table 1.3.2.1 Plaintext, encryption algorithm, secret key, ciphertext, decryptionalgorithm.2.2 Permutation and substitution.2.3 One key for symmetric ciphers, two keys for asymmetric ciphers.2.4 A stream cipher is one that encrypts a digital data stream one bit or one byteat a time. A block cipher is one in which a block of plaintext is treated as a whole and used to produce a ciphertext block of equal length.2.5 Cryptanalysis and brute force.2.6 Ciphertext only . One possible attack under these circumstances is thebrute-force approach of trying all possible keys. If the key space is very large, this becomes impractical. Thus, the opponent must rely on an analysis of the ciphertext itself, generally applying various statistical tests to it. Known plaintext. The analyst may be able to capture one or more plaintext messages as well as their encryptions. With this knowledge, the analyst may be able to deduce the key on the basis of the way in which the known plaintext is transformed. Chosen plaintext. If the analyst is able to choose the messages to encrypt, the analyst may deliberately pick patterns that can be expected to reveal the structure of the key.2.7 An encryption scheme is unconditionally secure if the ciphertext generatedby the scheme does not contain enough information to determine uniquely the corresponding plaintext, no matter how much ciphertext is available. An encryption scheme is said to be computationally secure if: (1) the cost of breaking the cipher exceeds the value of the encrypted information, and (2) the time required to break the cipher exceeds the useful lifetime of the information.C HAPTER 2C LASSICAL E NCRYPTION T ECHNIQUESR2.8 The Caesar cipher involves replacing each letter of the alphabet with theletter standing k places further down the alphabet, for k in the range 1 through25.2.9 A monoalphabetic substitution cipher maps a plaintext alphabet to a ciphertextalphabet, so that each letter of the plaintext alphabet maps to a single unique letter of the ciphertext alphabet.2.10 The Playfair algorithm is based on the use of a 5 5 matrix of lettersconstructed using a keyword. Plaintext is encrypted two letters at a time using this matrix.2.11 A polyalphabetic substitution cipher uses a separate monoalphabeticsubstitution cipher for each successive letter of plaintext, depending on a key.2.12 1. There is the practical problem of making large quantities of random keys.Any heavily used system might require millions of random characters on a regular basis. Supplying truly random characters in this volume is asignificant task.2. Even more daunting is the problem of key distribution and protection. Forevery message to be sent, a key of equal length is needed by both sender and receiver. Thus, a mammoth key distribution problem exists.2.13 A transposition cipher involves a permutation of the plaintext letters.2.14 Steganography involves concealing the existence of a message.A NSWERS TO P ROBLEMS2.1 a. No. A change in the value of b shifts the relationship between plaintextletters and ciphertext letters to the left or right uniformly, so that if the mapping is one-to-one it remains one-to-one.b. 2, 4, 6, 8, 10, 12, 13, 14, 16, 18, 20, 22, 24. Any value of a larger than25 is equivalent to a mod 26.c. The values of a and 26 must have no common positive integer factor otherthan 1. This is equivalent to saying that a and 26 are relatively prime, or that the greatest common divisor of a and 26 is 1. To see this, first note that E(a, p) = E(a, q) (0 ≤ p≤ q< 26) if and only if a(p–q) is divisible by 26. 1. Suppose that a and 26 are relatively prime. Then, a(p–q) is not divisible by 26, because there is no way to reduce the fractiona/26 and (p–q) is less than 26. 2. Suppose that a and 26 have a common factor k> 1. Then E(a, p) = E(a, q), if q = p + m/k≠ p.2.2 There are 12 allowable values of a (1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23,25). There are 26 allowable values of b, from 0 through 25). Thus the totalnumber of distinct affine Caesar ciphers is 12 26 = 312.2.3 Assume that the most frequent plaintext letter is e and the second most frequentletter is t. Note that the numerical values are e = 4; B = 1; t = 19; U = 20.Then we have the following equations:1 = (4a + b) mod 2620 = (19a + b) mod 26Thus, 19 = 15a mod 26. By trial and error, we solve: a = 3.Then 1 = (12 + b) mod 26. By observation, b = 15.2.4 A good glass in the Bishop's hostel in the Devil's seat—twenty-one degreesand 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. (from The Gold Bug, by Edgar Allan Poe)2.5 a. The first letter t corresponds to A, the second letter h corresponds toB, e is C, s is D, and so on. Second and subsequent occurrences of a letter in the key sentence are ignored. The resultciphertext: SIDKHKDM AF HCRKIABIE SHIMC KD LFEAILAplaintext: basilisk to leviathan blake is contactb. It is a monalphabetic cipher and so easily breakable.c. The last sentence may not contain all the letters of the alphabet. If thefirst sentence is used, the second and subsequent sentences may also be used until all 26 letters are encountered.2.6The cipher refers to the words in the page of a book. The first entry, 534,refers to page 534. The second entry, C2, refers to column two. The remaining numbers are words in that column. The names DOUGLAS and BIRLSTONE are simply words that do not appear on that page. Elementary! (from The Valley of Fear, by Sir Arthur Conan Doyle)2.7 a.2 8 10 7 9 63 14 5C R Y P T O G A H I4 2 8 1056 37 1 9ISRNG BUTLF RRAFR LIDLP FTIYO NVSEE TBEHI HTETAEYHAT TUCME HRGTA IOENT TUSRU IEADR FOETO LHMETNTEDS IFWRO HUTEL EITDSb. The two matrices are used in reverse order. First, the ciphertext is laidout in columns in the second matrix, taking into account the order dictated by the second memory word. Then, the contents of the second matrix are read left to right, top to bottom and laid out in columns in the first matrix, taking into account the order dictated by the first memory word. Theplaintext is then read left to right, top to bottom.c. Although this is a weak method, it may have use with time-sensitiveinformation and an adversary without immediate access to good cryptanalysis(e.g., tactical use). Plus it doesn't require anything more than paper andpencil, and can be easily remembered.2.8 SPUTNIK2.9 PT BOAT ONE OWE NINE LOST IN ACTION IN BLACKETT STRAIT TWO MILES SW MERESU COVEX CREW OF TWELVE X REQUEST ANY INFORMATION。
密码编码学与网络安全 部分答案 第二章
3.8A因为有用二进制表示为: 0000 1011 0000 0010 0110 01111001 1011 0100 1001 1010 0101 第一轮的子密钥为: 0 B 0 2 6 7 9 B 4 9 A 5b. L0, R0是64位的明文则有L0 = 1100 1100 0000 0000 1100 1100 1111 1111R0 = 1111 0000 1010 1010 1111 0000 1010 1010c. 将R0扩展为48 bits:E(R0) = 01110 100001 010101 010101 011110 100001 010101 010101d. A = 011100 010001 011100 110010 111000 010101 110011 110000e. S100(1110) = S10(14) = 0 (base 10) = 0000 (base 2)S201(1000) = S21(8) = 12 (base 10) = 1100 (base 2)S300(1110) = S30(14) = 2 (base 10) = 0010 (base 2)S410(1001) = S42(9) = 1 (base 10) = 0001 (base 2)S510(1100) = S52(12) = 6 (base 10) = 0110 (base 2)S601(1010) = S61(10) = 13 (base 10) = 1101 (base 2)S711(1001) = S73(9) = 5 (base 10) = 0101 (base 2)S810(1000) = S82(8) = 0 (base 10) = 0000 (base 2)f. B = 0000 1100 0010 0001 0110 1101 0101 0000g. P(B) = 1001 0010 0001 1100 0010 0000 1001 1100h. R1 = 0101 1110 0001 1100 1110 1100 0110 0011i.L1 = R0. 密文的内容为L1和R1串联3.10a.从内到外的计算过程T16(L15|| R15) = L16|| R16T17(L16|| R16) = R16|| L16IP [IP–1 (R16|| L16)] = R16|| L16TD1(R16|| L16) = R15|| L15b.T16(L15|| R15) = L16|| R16IP [IP–1 (L16|| R16)] = L16|| R16TD1(R16 || L16) = R16|| L16⊕ f(R16, K16)≠ L15|| R151≤I≤128,字符串c1{0,1}128字符串,其第i位为1其余各位都为0获取这128密文解密。
密码编码学与网络安全(第五版) 向金海 10-数字签名
2019/8/9
华中农业大学信息学院
19
Digital Signature Algorithm (DSA)
2019/8/9
华中农业大学信息学院
20
DSA 密钥的生成
全局公钥 (p, q, g):
选择q, 位长为160 bit 选择一个大的素数 p = 2L
其中 L= 512 to 1024 bits 且L 是64的倍数 q 是 (p-1)的素因子
验证签名者、签名的日期和时间 认证消息内容 可由第三方仲裁,以解决争执
因此,数字签名具有认证功能
2019/8/9
华中农业大学信息学院
3
数字签名应满足的条件
签名值必须依赖于所签的消息 必须使用对于发送者唯一的信息
以防止伪造和否认 产生签名比较容易 识别和验证签名比较容易 伪造数字签名在计算上是不可行的。包括
计算签名对: r = ( gk ( mod p ) ) (mod q) s = ( k-1.H( M ) + x.r) (mod q)
和消息M一同发送签名值( r, s )
2019/8/9
华中农业大学信息学院
22
DSA 数字签名的验证
已经收到消息M 和签名值 (r,s) 为了验证签名, 接收者计算:
华中农业大学信息学院
25
小结
数字签名
RSA数字签名 Elgamal数字签名 Schnorr数字签名
DSA及其DSS
2019/8/9
华中农业大学信息学院
26
第13章作业
习题:第13.7
2019/8/9
华中农业大学信息学院
27
V2 m mod p 2100 mod 467 189
外文版第五版作业_zhang
所以有 :(A B)' = A' B 同时有:A B = A' B' 考虑在图 3.5 中的两个 XOR 运算。一次在 f 函数中 S 盒之前;一次在 f 函数输出之后。 在第一个 XOR 运算的两个输入都是原来的逆,根据 A B = A' B' 所以输出和不取逆的情况相同。 在第二个 XOR 运算的输入中一个是原来的逆,一个是本身,根据(A B)' = A' B 所以输出结果是原来的逆。这样 Ri 是原来的逆,同时 Li = Ri-1 也是原来的逆 所以结论成立。即如果 Y = E[K, X] 则 Y' = E[K', X']。 b.密钥搜索空间为 255 分析:选择明文攻击,给定一个 X,得到:Y = E[K, X] and Y = E[K, X'] 1 2 现在进行穷举攻击,给定一个密钥 T,计算 E[T, X],如果结果是 Y1 ,T 就是密钥。 否则计算 E[K, X'],如果结果是(Y2)',则 这样搜索空间减少了一倍。 第四章 有限域 习题: 1–1 = 1, 2–1 = 3, 3–1 = 2, 4–1 = 4 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. 35 4.19 a. 3239 b. gcd(40902, 24240) = 34 ≠ 1, 因而没有乘法逆元 c. 550 4.13 4.15 第五章 高级加密标准
桂林电子科技大学计算机科学与工程学院――张瑞霞
密码编码学与网络安全课后习题答案全修订稿
密码编码学与网络安全课后习题答案全Document number【SA80SAB-SAA9SYT-SAATC-SA6UT-SA18】密码编码学与网络安全(全)什么是OSI安全体系结构?OSI安全体系结构是一个架构,它为规定安全的要求和表征满足那些要求的途径提供了系统的方式。
该文件定义了安全攻击、安全机理和安全服务,以及这些范畴之间的关系。
被动安全威胁和主动安全威胁之间的差别是什么?被动威胁必须与窃听、或监控、传输发生关系。
电子邮件、文件的传送以及用户/服务器的交流都是可进行监控的传输的例子。
主动攻击包括对被传输的数据加以修改,以及试图获得对计算机系统未经授权的访问。
验证:保证通信实体之一,它声称是。
访问控制:防止未经授权使用的资源(即,谁可以拥有对资源的访问,访问在什么条件下可能发生,那些被允许访问的资源做这个服务控制)。
数据保密:保护数据免受未经授权的披露。
数据完整性:保证接收到的数据是完全作为经授权的实体(即包含任何修改,插入,删除或重播)发送。
不可否认性:提供保护反对否认曾参加全部或部分通信通信中所涉及的实体之一。
可用性服务:系统属性或访问和经授权的系统实体的需求,可用的系统资源,根据系统(即系统是可用的,如果它提供服务,根据系统设计,只要用户要求的性能指标它们)。
第二章1.什么是对称密码的本质成分?明文、加密算法、密钥、密文、解密算法。
4.分组密码和流密码的区别是什么?流密码是加密的数字数据流的一个位或一次一个字节。
块密码是明文块被视为一个整体,用来产生一个相同长度的密文块......分组密码每次处理输入的一组分组,相应的输出一组元素。
流密码则是连续地处理输入元素,每次输出一个元素。
6.列出并简要定义基于攻击者所知道信息的密码分析攻击类型。
惟密文攻击:只知道要解密的密文。
这种攻击一般是试遍所有可能的密钥的穷举攻击,如果密钥空间非常大,这种方法就不太实际。
因此攻击者必须依赖于对密文本身的分析,这一般要运用各种统计方法。
计算机网络(第五版)谢希仁 课后答案第七章
7-01 计算机网络都面临哪几种威胁?主动攻击和被动攻击的区别是什么?对于计算机网络的安全措施都有哪些?答:计算机网络面临以下的四种威胁:截获(interception),中断(interruption),篡改(modification),伪造(fabrication)。
网络安全的威胁可以分为两大类:即被动攻击和主动攻击。
主动攻击是指攻击者对某个连接中通过的PDU进行各种处理。
如有选择地更改、删除、延迟这些PDU。
甚至还可将合成的或伪造的PDU送入到一个连接中去。
主动攻击又可进一步划分为三种,即更改报文流;拒绝报文服务;伪造连接初始化。
被动攻击是指观察和分析某一个协议数据单元PDU而不干扰信息流。
即使这些数据对攻击者来说是不易理解的,它也可通过观察PDU的协议控制信息部分,了解正在通信的协议实体的地址和身份,研究PDU的长度和传输的频度,以便了解所交换的数据的性质。
这种被动攻击又称为通信量分析。
还有一种特殊的主动攻击就是恶意程序的攻击。
恶意程序种类繁多,对网络安全威胁较大的主要有以下几种:计算机病毒;计算机蠕虫;特洛伊木马;逻辑炸弹。
对付被动攻击可采用各种数据加密动技术,而对付主动攻击,则需加密技术与适当的鉴别技术结合。
7-02 试解释以下名词:(1)重放攻击;(2)拒绝服务;(3)访问控制;(4)流量分析;(5)恶意程序。
答:(1)重放攻击:所谓重放攻击(replay attack)就是攻击者发送一个目的主机已接收过的包,来达到欺骗系统的目的,主要用于身份认证过程。
(2)拒绝服务:DoS(Denial of Service)指攻击者向因特网上的服务器不停地发送大量分组,使因特网或服务器无法提供正常服务。
(3)访问控制:(access control)也叫做存取控制或接入控制。
必须对接入网络的权限加以控制,并规定每个用户的接入权限。
(4)流量分析:通过观察PDU的协议控制信息部分,了解正在通信的协议实体的地址和身份,研究PDU的长度和传输的频度,以便了解所交换的数据的某种性质。
《密码编码学与网络安全》复习题答案资料
《密码编码学与网络安全》复习题1.信息安全(计算机安全)目标是什么?机密性(confidentiality):防止未经授权的信息泄漏完整性(integrity):防止未经授权的信息篡改可用性(avialbility):防止未经授权的信息和资源截留抗抵赖性、不可否认性、问责性、可说明性、可审查性(accountability):真实性(authenticity):验证用户身份2.理解计算安全性(即one-time pad的理论安全性)使用与消息一样长且无重复的随机密钥来加密信息,即对每个明文每次采用不同的代换表不可攻破,因为任何明文和任何密文间的映射都是随机的,密钥只使用一次3.传统密码算法的两种基本运算是什么?代换和置换前者是将明文中的每个元素映射成另外一个元素;后者是将明文中的元素重新排列。
4.流密码和分组密码区别是什么?各有什么优缺点?分组密码每次处理一个输入分组,对应输出一个分组;流密码是连续地处理输入元素,每次输出一个元素流密码Stream: 每次加密数据流的一位或者一个字节。
连续处理输入分组,一次输出一个元素,速度较快。
5.利用playfair密码加密明文bookstore,密钥词是(HARPSICOD),所得的密文是什么?I/JD RG LR QD HGHARPS bo ok st or ex I/JD DG PU GO GVI/JCODBEFGKLMNQTUVWXYZ6.用密钥词cat实现vigenere密码,加密明文vigenere coper,所得的密文是什么?XIZGNXTEVQPXTKey: catca t ca tcatcatcatPlaintext: vigenere coperChipertext: XIZGNXTE VQPXT7.假定有一个密钥2431的列置换密码,则明文can you understand的密文是多少?YNSDCODTNURNAUEAKey: 2 4 3 1Plaintext: c a n yo u u nd e r st a n dChipertext: YNSDCODTNURNAUEA8.什么是乘积密码?多步代换和置换,依次使用两个或两个以上的基本密码,所得结果的密码强度将强与所有单个密码的强度.9.混淆和扩散的区别是什么?扩散(Diffusion):明文的统计结构被扩散消失到密文的,使得明文和密文之间的统计关系尽量复杂.即让每个明文数字尽可能地影响多个密文数字混淆(confusion):使得密文的统计特性与密钥的取值之间的关系尽量复杂,阻止攻击者发现密钥10.Feistel密码中每轮发生了什么样的变化?将输入分组分成左右两部分。
密码编码学与网络安全原理与实践第五版课程设计
密码编码学与网络安全原理与实践第五版课程设计1. 简介本课程设计的主要目的是了解密码编码学的基本概念、加密算法、认证协议、数字签名等知识,同时介绍网络安全的基本原理与实践。
本文档将依次介绍本课程设计的目标、设计方案、实现过程和总结。
2. 目标本设计旨在使学生:•了解密码编码学的基本概念、加密算法、认证协议、数字签名等知识;•掌握网络安全的基本原理及其实践;•能够使用网络安全工具,进行网络攻防实战训练;•能够分析与评估实际应用场景下的安全性需求,并提出相应的解决方案。
3. 设计方案本课程设计分为三个部分:3.1 理论部分本部分将重点介绍密码编码学的基本概念和加密算法的原理,其中包括对称加密算法、非对称加密算法、哈希算法、数字签名等。
此外,还会涉及到认证协议、安全协议等相关知识。
3.2 实践部分本部分将通过实战演练,让学生了解实际应用场景下的网络安全防御与攻击。
通过模拟恶意攻击行为、使用各种安全工具、分析安全事件等方式,让学生掌握网络安全方面的攻防技能。
具体实践项目包括但不限于:•网络扫描与漏洞利用•DDos攻击与抵御•SQL注入与跨站攻击•无线安全攻防3.3 综合应用本部分将结合实际应用场景,给出一个完整的安全方案实现。
包括系统安全设计、网络安全配置、安全策略制定、安全性评估以及安全性监测。
学生将分组完成实际的方案设计与实现。
4. 实现过程在本课程设计实践过程中,我们将采用以下方式:4.1 远程教学本课程设计采取远程教学方式进行。
我们将使用网络会议、远程控制等方式,进行课程的布置、实践演练督导、安全方案评审等。
4.2 自主实践本课程设计鼓励学生自主探索思路,利用开源安全工具、网络在线实验平台、网上资源等进行安全实践。
教师将提供指导以及实践项目设计,引导学生完成任务调查、设计、实现与评估。
4.3 课程评估本课程设计将采用多种形式进行评估,包括:•课程作业;•实践报告;•安全项目演示;•安全方案评审;•期末闭卷考试。
密码学第五版部分课后答案 (1)
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 在多罗的怪诞小说中,有一个故事是这样的:地主彼得遇到了下图所示的消息,他找到了密钥,是一段整数:11234a.破译这段消息。
提示:最大的整数是什么?b.如果只知道算法而不知道密钥,这种加密方案的安全性怎么样?c.如果只知道密钥而不知道算法,这种加密方案的安全性又怎么样?解:A.根据提示,将密文排成每行8字母的矩阵,密钥代表矩阵中每行应取的字母,依次取相应字母即可得明文。
明文为:He sitteth between the cherubims.The isles may be glad thereof.As the rivers in the South.B.安全性很好。
密码编码学与网络安全
密码编码学与网络安全密码编码学是信息安全领域的一个重要分支,它涉及到信息的加密、解密和认证等技术,是保护网络安全的重要手段之一。
在当今信息化社会中,网络安全问题日益突出,密码编码学的研究和应用显得尤为重要。
首先,密码编码学是网络安全的基础。
在网络通信过程中,信息的安全性是至关重要的。
密码编码学通过加密技术,可以将信息转化为一段看似无意义的密文,只有掌握了特定的密钥才能解密成原始的明文,从而保障了信息的安全传输。
同时,密码编码学还可以用于身份认证,确保通信双方的身份是合法的,防止冒充和伪造。
其次,密码编码学的发展与网络安全的挑战密不可分。
随着计算机和网络技术的迅速发展,网络攻击手段也日益多样化和复杂化。
传统的加密算法可能会面临被破解的风险,因此密码编码学需要不断创新,提出更加安全可靠的加密算法和协议。
同时,密码编码学还需要与其他安全技术结合,形成多层次、多维度的网络安全防护体系,以抵御各种潜在的威胁和攻击。
此外,密码编码学的研究还涉及到量子密码学、同态加密、多方安全计算等前沿领域,这些技术对于未来网络安全的发展具有重要意义。
量子密码学利用量子力学的特性进行加密,可以抵御传统计算机无法破解的攻击手段;同态加密可以在不暴露数据内容的情况下进行计算,保护了数据的隐私性;多方安全计算则可以实现多方参与计算而不泄露私密信息,为安全计算提供了新的可能性。
总的来说,密码编码学与网络安全是息息相关的,它不仅是信息安全的基础,也是网络安全的重要保障。
随着网络技术的不断发展,密码编码学也需要不断创新和完善,以适应日益复杂的网络安全环境。
只有不断提升密码编码学的技术水平,加强网络安全意识,才能更好地保护网络信息安全,推动网络安全事业向前发展。
密码编码学与网络安全_课后习题答案(全).doc
密码编码学与网络安全(全)1.1 什么是 OSI 安全体系结构?OSI 安全体系结构是一个架构,它为规定安全的要求和表征满足那些要求的途径提供了系统的方式。
该文件定义了安全攻击、安全机理和安全服务,以及这些范畴之间的关系。
1.2 被动安全威胁和主动安全威胁之间的差别是什么?被动威胁必须与窃听、或监控、传输发生关系。
电子邮件、文件的传送以及用户 /服务器的交流都是可进行监控的传输的例子。
主动攻击包括对被传输的数据加以修改,以及试图获得对计算机系统未经授权的访问。
1.4 验证:保证通信实体之一,它声称是。
访问控制:防止未经授权使用的资源(即,谁可以拥有对资源的访问,访问在什么条件下可能发生,那些被允许访问的资源做这个服务控制)。
数据保密:保护数据免受未经授权的披露。
数据完整性:保证接收到的数据是完全作为经授权的实体(即包含任何修改,插入,删除或重播)发送。
不可否认性:提供保护反对否认曾参加全部或部分通信通信中所涉及的实体之一。
可用性服务:系统属性或访问和经授权的系统实体的需求,可用的系统资源,根据系统(即系统是可用的,如果它提供服务,根据系统设计,只要用户要求的性能指标它们)。
第二章1.什么是对称密码的本质成分?明文、加密算法、密钥、密文、解密算法。
4.分组密码和流密码的区别是什么?流密码是加密的数字数据流的一个位或一次一个字节。
块密码是明文块被视为一个整体,用来产生一个相同长度的密文块 ......分组密码每次处理输入的一组分组,相应的输出一组元素。
流密码则是连续地处理输入元素,每次输出一个元素。
6.列出并简要定义基于攻击者所知道信息的密码分析攻击类型。
惟密文攻击:只知道要解密的密文。
这种攻击一般是试遍所有可能的密钥的穷举攻击,如果密钥空间非常大,这种方法就不太实际。
因此攻击者必须依赖于对密文本身的分析,这一般要运用各种统计方法。
已知明文攻击:分析者可能得到一个或多个明文消息,以及它们的密文。
有了这些信息,分析者能够在已知明文加密方式的基础上推导出某些关键词。
密码编码学与网络安全(第一二章作业)
密码学与信息安全作业(第一次)第一章思考題1.1OSI安全框架是什麽。
OSI安全框架即X.800,对安全人员来说,OSI安全框架是提供安全的一种组织方法。
OSI安全框架主要关注安全攻击,安全机制和安全服务。
安全攻击:任何危及信息安全系统的行为安全机制:用来检测,阻止攻击或者从攻击状态恢复到正常状态的过程(或通信服务或实现该过程的设备)安全服务:加强数据处理系统和信息传输的安全性的一种处理过程或通信服务。
其目的在于利用一种或多种安全机制进行反攻击。
备注:某些文献中,威胁和攻击差不多用来指相同的事情。
威胁:破坏安全的潜在可能,在环境,能力,行为或事件允许的情况下,他们会破坏安全,造成危害。
也就是说,威胁是脆弱性被利用而可能带来的危害。
攻击:对系统安全的攻击,它来源于一种具有智能的威胁,也就是说,有意违反安全服务和侵犯系统安全策略的(特别是在方法或技巧方面的)智能行为。
1.3列出并简短地定义被动和主动安全攻击的种类。
被动攻击:试图了解或利用系统的信息但不影响系统的资源,特性是对传输进行窃听和检测,目标是获得传输的信息,信息内容泄露和流量攻击就是两种被动攻击的方式,由于不涉及对数据的更改,所以很难察觉。
因此被动攻击的重点是预防而不是检测。
主动攻击:试图改变系统的资源或影响系统的运作。
主要包括对数据的修改和伪造数据流,主要有伪装,重播,消息修改和拒绝服务四类。
伪装是某实体假装别的实体,重播是指将获得的信息再次发送以产生非授权的效果。
消息修改是指修改和发消息的一部分或延迟消息的传输或改变消息的顺序以获得非授权效果。
拒绝服阻止或禁止对通信设施的正常使用或管理,这种攻击可能具有具体的目标。
主动攻击难以绝对预防但容易检测。
1.4列出并简短定义安全服务的种类。
安全服务:系统提供的对系统资源进行特殊保护的处理或通信服务,安全服务通过安全机制来实现安全策略。
X.800将这些服务分为5类共14个特定服务:1)认证:保证通信的实体是它所声称的实体。
计算机网络安全基础(第5版)习题参考答案.doc
计算机网络安全基础(第5版)习题参考答案第1章习题:1.举出使用分层协议的两条理由?1.通过分层,允许各种类型网络硬件和软件相互通信,每一层就像是与另一台计算机对等层通信;2.各层之间的问题相对独立,而且容易分开解决,无需过多的依赖外部信息;同时防止对某一层所作的改动影响到其他的层;3.通过网络组件的标准化,允许多个提供商进行开发。
2.有两个网络,它们都提供可靠的面向连接的服务。
一个提供可靠的字节流,另一个提供可靠的比特流。
请问二者是否相同?为什么?不相同。
在报文流中,网络保持对报文边界的跟踪;而在字节流中,网络不做这样的跟踪。
例如,一个进程向一条连接写了1024字节,稍后又写了另外1024字节。
那么接收方共读了2048字节。
对于报文流,接收方将得到两个报文,、每个报文1024字节。
而对于字节流,报文边界不被识别。
接收方把全部的2048字节当作一个整体,在此已经体现不出原先有两个不同的报文的事实。
3.举出OSI参考模型和TCP/IP参考模型的两个相同的方面和两个不同的方面。
OSI模型(开放式系统互连参考模型):这个模型把网络通信工作分为7层,他们从低到高分别是物理层、数据链路层、网络层、传输层、会话层、表示层和应用层。
第一层到第三层属于低三层,负责创建网络通信链路;第四层到第七层为高四层,具体负责端到端的数据通信。
每层完成一定的功能,每层都直接为其上层提供服务,并且所有层次都互相支持。
TCP/IP模型只有四个层次:应用层、传输层、网络层、网络接口层。
与OSI功能相比,应用层对应的是OSI的应用层、表示层、会话层;网络接口层对应着OSI的数据链路层和物理层。
两种模型的不同之处主要有:(1) TCP/IP在实现上力求简单高效,如IP层并没有实现可靠的连接,而是把它交给了TCP层实现,这样保证了IP层实现的简练性。
OSI参考模型在各层次的实现上有所重复。
(2) TCP/IP结构经历了十多年的实践考验,而OSI参考模型只是人们作为一种标准设计的;再则TCP/IP有广泛的应用实例支持,而OSI参考模型并没有。
密码编码学与网络安全(第五版) 向金海 02-古典密码算法-文档资料
I
J K L M N O P Q R S T U V W X Y Z A B C
*
21
恺撒密码 - 解密
方式一:公式计算
密文C = c1c2…cn 解码得明文: P = p1p2…pn
(加密)运算:Pi = ci - k (mod 26), i=1,2,…,n
*
22
恺撒密码-解密
方式二:查表(例k=3)
算法是基于密钥的:通信双方必须在某种安 全形式下获得密钥并必须保证密钥的安全
*
8
密码分析学
Cryptanalysis
密码破译
攻击的一般方法
密码分析学: cryptanalytic attack
穷举攻击: brute-force attack
*
9
基于密码分析的攻击
Cryptanalytic Attacks
*
27
单表代替密码分析
不是简单有序地字母移位 任意地打乱字母的顺序 每个明文字母映射到一个不同的随机密文 字母 密钥数目: 26!
*
28
单表代替密码分析
密钥空间: 26! > 4 x 1026
貌似安全,实则不然
语言特性
*
29
语言的冗余与密码分析
人类的语言是有冗余的 字母的使用频率是不同的 在英语中E使用的频率最高 有些字母使用较少 单字母、双字母、三字母组合统计
恺撒密码的密码分析
共有密钥25个 可简单地依次去测试 、强力搜索、穷举攻击 基于字母频率的破译方法 所破译的明文需要识别
密码编码学与网络安全-原理与实践 课后答案
密码学与网络安全 山东大学数学院的信息安全专业师资雄厚,前景广阔,具有密码理论、密码技术与网络安全 技术三个研究方向。有一大批博士、硕士及本科生活跃于本论坛。本版块适合从事密码学或网络 安全方面学习研究的朋友访问。
Third Edition WILLIAM STALLINGS
Copyright 2002: William Stallings -1-
TABLE OF CONTENTS
Chapter 2: Chapter 3: Chapter 4: Chapter 5: Chapter 6: Chapter 7: Chapter 8: Chapter 9: Chapter 10: Chapter 11: Chapter 12: Chapter 13: Chapter 14: Chapter 15: Chapter 16: Chapter 17: Chapter 18: Chapter 19: Chapter 20:
附录 A:本站电子书库藏书目录 :81/bbs/dispbbs.asp?boardID=18&ID=2285
附录 B:版权问题 数缘社区所有电子资源均来自网络,版权归原作者所有,本站不承担任何版权责任。
SOLUTIONS MANUAL
CRYPTOGRAPHY AND NETWORK SECURITY
W.ห้องสมุดไป่ตู้.
-3-
CHAPTER 2 CLASSICAL ENCRYPTION TECHNIQUES
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
2.1 Plaintext, encryption algorithm, secret key, ciphertext, decryption algorithm.2.2 Permutation and substitution.2.3 One key for symmetric ciphers, two keys for asymmetric ciphers.2.4 A stream cipher is one that encrypts a digital data stream one bit or one byte at atime. A block cipher is one in which a block of plaintext is treated as a whole and used to produce a ciphertext block of equal length.2.5 Cryptanalysis and brute force.2.6 Ciphertext only. One possible attack under these circumstances is the brute-forceapproach of trying all possible keys. If the key space is very large, this becomesimpractical. Thus, the opponent must rely on an analysis of the ciphertext itself, generally applying various statistical tests to it. Known plaintext. The analyst may be able to capture one or more plaintext messages as well as their encryptions.With this knowledge, the analyst may be able to deduce the key on the basis of the way in which the known plaintext is transformed. Chosen plaintext. If the analyst is able to choose the messages to encrypt, the analyst may deliberately pickpatterns that can be expected to reveal the structure of the key.2.7 An encryption scheme is unconditionally secure if the ciphertext generated by thescheme does not contain enough information to determine uniquely thecorresponding plaintext, no matter how much ciphertext is available. Anencryption scheme is said to be computationally secure if: (1) the cost of breaking the cipher exceeds the value of the encrypted information, and (2) the timerequired to break the cipher exceeds the useful lifetime of the information.2.8 The Caesar cipher involves replacing each letter of the alphabet with the letterstanding k places further down the alphabet, for k in the range 1 through 25.2.9 A monoalphabetic substitution cipher maps a plaintext alphabet to a ciphertextalphabet, so that each letter of the plaintext alphabet maps to a single unique letter of the ciphertext alphabet.2.10 The Playfair algorithm is based on the use of a 5 5 matrix of letters constructedusing a keyword. Plaintext is encrypted two letters at a time using this matrix.2.11 A polyalphabetic substitution cipher uses a separate monoalphabetic substitutioncipher for each successive letter of plaintext, depending on a key.2.12 1. There is the practical problem of making large quantities of random keys. Anyheavily used system might require millions of random characters on a regularbasis. Supplying truly random characters in this volume is a significant task.2. Even more daunting is the problem of key distribution and protection. For everymessage to be sent, a key of equal length is needed by both sender and receiver.Thus, a mammoth key distribution problem exists.2.13 A transposition cipher involves a permutation of the plaintext letters.2.14 Steganography involves concealing the existence of a message.2.1 a. No. A change in the value of b shifts the relationship between plaintext lettersand ciphertext letters to the left or right uniformly, so that if the mapping isone-to-one it remains one-to-one.文档来源为:从网络收集整理.word版本可编辑.欢迎下载支持.b. 2, 4, 6, 8, 10, 12, 13, 14, 16, 18, 20, 22, 24. Any value of a larger than 25 isequivalent to a mod 26.c. The values of a and 26 must have no common positive integer factor other than1. This is equivalent to saying that a and 26 are relatively prime, or that thegreatest common divisor of a and 26 is 1. To see this, first note that E(a, p) = E(a,q) (0 ≤ p≤ q < 26) if and only if a(p–q) is divisible by 26. 1. Suppose that a and26 are relatively prime. Then, a(p–q) is not divisible by 26, because there is noway to reduce the fraction a/26 and (p–q) is less than 26. 2. Suppose that a and26 have a common factor k > 1. Then E(a, p) = E(a, q), if q = p + m/k≠ p.2.2 There are 12 allowable values of a (1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25). There are 26allowable values of b, from 0 through 25). Thus the total number of distinct affine Caesar ciphers is 12 26 = 312.2.3 Assume that the most frequent plaintext letter is e and the second most frequentletter is t. Note that the numerical values are e = 4; B = 1; t = 19; U = 20. Then we have the following equations:1 = (4a + b) mod 2620 = (19a + b) mod 26Thus, 19 = 15a mod 26. By trial and error, we solve: a = 3.Then 1 = (12 + b) mod 26. By observation, b = 15.2.4 A good glass in the Bishop's hostel in the Devil's seat—twenty-one degrees andthirteen minutes—northeast and by north—main branch seventh limb eastside—shoot from the left eye of the death's head— a bee line from the tree through the shot fifty feet out. (from The Gold Bug, by Edgar Allan Poe)2.5 a.The first letter t corresponds to A, the second letter h corresponds to B, e is C, sis D, and so on. Second and subsequent occurrences of a letter in the keysentence are ignored. The resultciphertext: SIDKHKDM AF HCRKIABIE SHIMC KD LFEAILAplaintext: basilisk to leviathan blake is contactb.It is a monalphabetic cipher and so easily breakable.c.The last sentence may not contain all the letters of the alphabet. If the firstsentence is used, the second and subsequent sentences may also be used untilall 26 letters are encountered.2.6The cipher refers to the words in the page of a book. The first entry, 534, refers topage 534. The second entry, C2, refers to column two. The remaining numbers are words in that column. The names DOUGLAS and BIRLSTONE are simply words that do not appear on that page. Elementary! (from The Valley of Fear, by Sir Arthur Conan Doyle)2.7 a.2 8 10 7 9 63 14 5EYHAT TUCME HRGTA IOENT TUSRU IEADR FOETO LHMETNTEDS IFWRO HUTEL EITDSb.The two matrices are used in reverse order. First, the ciphertext is laid out incolumns in the second matrix, taking into account the order dictated by thesecond memory word. Then, the contents of the second matrix are read left toright, top to bottom and laid out in columns in the first matrix, taking intoaccount the order dictated by the first memory word. The plaintext is then read left to right, top to bottom.c.Although this is a weak method, it may have use with time-sensitiveinformation and an adversary without immediate access to good cryptanalysis(e.g., tactical use). Plus it doesn't require anything more than paper and pencil,and can be easily remembered.2.8 SPUTNIK2.9 PT BOAT ONE OWE NINE LOST IN ACTION IN BLACKETT STRAIT TWOMILES SW MERESU COVE X CREW OF TWELVE X REQUEST ANYINFORMATION2.10 a.b.2.11 a.b.UZTBDLGZPNNWLGTGTUEROVLDBDUHFPERHWQSRZc. A cyclic rotation of rows and/or columns leads to equivalent substitutions. Inthis case, the matrix for part a of this problem is obtained from the matrix ofProblem 2.10a, by rotating the columns by one step and the rows by three steps.2.12 a. 25! ≈ 284b. Given any 5x5 configuration, any of the four row rotations is equivalent, for atotal of five equivalent configurations. For each of these five configurations,any of the four column rotations is equivalent. So each configuration in factrepresents 25 equivalent configurations. Thus, the total number of unique keysis 25!/25 = 24!2.13 A mixed Caesar cipher. The amount of shift is determined by the keyword, whichdetermines the placement of letters in the matrix.2.14 a. Difficulties are things that show what men are.b. Irrationally held truths may be more harmful than reasoned errors.2.15 a. We need an even number of letters, so append a "q" to the end of the message.The first two ciphertext characters are alphabetic positions 7 and 22, whichcorrespond to GV. The complete ciphertext:GVUIGVKODZYPUHEKJHUZWFZFWSJSDZMUDZMYCJQMFWWUQRKRb. We first perform a matrix inversion. Note that the determinate of theencryption matrix is (9 ⨯ 7) – (4 ⨯ 5) = 43. Using the matrix inversion formulafrom the book:Here we used the fact that (43)–1 = 23 in Z26. Once the inverse matrix has beendetermined, decryption can proceed. Source: [LEWA00].2.16 Consider the matrix K with elements k ij to consist of the set of column vectors K j,where:andThe ciphertext of the following chosen plaintext n-grams reveals the columns of K:(B, A, A, …, A, A) ↔ K1(A, B, A, …, A, A) ↔ K2:(A, A, A, …, A, B) ↔ K n2.17 a.7 ⨯ 134b.7 ⨯ 134c.134d.10 ⨯ 134e.24⨯ 132f.24⨯(132– 1) ⨯ 13g. 37648h.23530i.1572482.18 key: legleglegleplaintext: explanationciphertext: PBVWETLXOZR2.21 y the message out in a matrix 8 letters across. Each integer in the key tellsyou which letter to choose in the corresponding row. Result:He sitteth between the cherubims. The isles may be gladthereof. As the rivers in the south.b.Quite secure. In each row there is one of eight possibilities. So if the ciphertextis 8n letters in length, then the number of possible plaintexts is 8n.c. Not very secure. Lord Peter figured it out. (from The Nine Tailors)C HAPTER 3B LOCKC IPHERS AND THE D ATAE NCRYPTION S TANDARD3.1 Most symmetric block encryption algorithms in current use are based on the Feistelblock cipher structure. Therefore, a study of the Feistel structure reveals theprinciples behind these more recent ciphers.3.2 A stream cipher is one that encrypts a digital data stream one bit or one byte at atime. A block cipher is one in which a block of plaintext is treated as a whole and used to produce a ciphertext block of equal length.3.3 If a small block size, such as n = 4, is used, then the system is equivalent to aclassical substitution cipher. For small n, such systems are vulnerable to a statistical analysis of the plaintext. For a large block size, the size of the key, which is on the order of n 2n, makes the system impractical.3.4 In a product cipher, two or more basic ciphers are performed in sequence in such away that the final result or product is cryptographically stronger than any of the component ciphers.3.5 In diffusion, the statistical structure of the plaintext is dissipated into long-rangestatistics of the ciphertext. This is achieved by having each plaintext digit affect the value of many ciphertext digits, which is equivalent to saying that each ciphertext digit is affected by many plaintext digits. Confusion seeks to make the relationship between the statistics of the ciphertext and the value of the encryption key ascomplex as possible, again to thwart attempts to discover the key. Thus, even if the attacker can get some handle on the statistics of the ciphertext, the way in which the key was used to produce that ciphertext is so complex as to make it difficult todeduce the key. This is achieved by the use of a complex substitution algorithm. 3.6 Block size: Larger block sizes mean greater security (all other things being equal)but reduced encryption/decryption speed. Key size: Larger key size means greater security but may decrease encryption/decryption speed. Number of rounds: The essence of the Feistel cipher is that a single round offers inadequate security but that multiple rounds offer increasing security. Subkey generation algorithm:Greater complexity in this algorithm should lead to greater difficulty ofcryptanalysis. Round function: Again, greater complexity generally means greater resistance to cryptanalysis. Fast software encryption/decryption: In many cases, encryption is embedded in applications or utility functions in such a way as topreclude a hardware implementation. Accordingly, the speed of execution of the algorithm becomes a concern. Ease of analysis: Although we would like to make our algorithm as difficult as possible to cryptanalyze, there is great benefit inmaking the algorithm easy to analyze. That is, if the algorithm can be concisely and clearly explained, it is easier to analyze that algorithm for cryptanalyticvulnerabilities and therefore develop a higher level of assurance as to its strength.3.7 The S-box is a substitution function that introduces nonlinearity and adds to thecomplexity of the transformation.3.8 The avalanche effect is a property of any encryption algorithm such that a smallchange in either the plaintext or the key produces a significant change in theciphertext.3.9 Differential cryptanalysis is a technique in which chosen plaintexts with particularXOR difference patterns are encrypted. The difference patterns of the resultingciphertext provide information that can be used to determine the encryption key.Linear cryptanalysis is based on finding linear approximations to describe thetransformations performed in a block cipher.3.1 a. For an n-bit block size are 2n possible different plaintext blocks and 2n possibledifferent ciphertext blocks. For both the plaintext and ciphertext, if we treat theblock as an unsigned integer, the values are in the range 0 through 2n– 1. For amapping to be reversible, each plaintext block must map into a uniqueciphertext block. Thus, to enumerate all possible reversible mappings, the block with value 0 can map into anyone of 2n possible ciphertext blocks. For anygiven mapping of the block with value 0, the block with value 1 can map intoany one of 2n– 1 possible ciphertext blocks, and so on. Thus, the total numberof reversible mappings is (2n)!.b. In theory, the key length could be log2(2n)! bits. For example, assign eachmapping a number, from 1 through (2n)! and maintain a table that shows themapping for each such number. Then, the key would only require log2(2n)! bits, but we would also require this huge table. A more straightforward way todefine the key is to have the key consist of the ciphertext value for eachplaintext block, listed in sequence for plaintext blocks 0 through 2n– 1. This iswhat is suggested by Table 3.1. In this case the key size is n 2n and the hugetable is not required.3.2 Because of the key schedule, the round functions used in rounds 9 through 16 aremirror images of the round functions used in rounds 1 through 8. From this fact we see that encryption and decryption are identical. We are given a ciphertext c.Let m' = c. Ask the encryption oracle to encrypt m'. The ciphertext returned by the oracle will be the decryption of c.3.3 a.We need only determine the probability that for the remaining N – t plaintextsP i, we have E[K, P i] ≠ E[K', P i]. But E[K, P i] = E[K', P i] for all the remaining P iwith probability 1 – 1/(N–t)!.b.Without loss of generality we may assume the E[K, P i] = P i since E K(•) is takenover all permutations. It then follows that we seek the probability that apermutation on N–t objects has exactly t' fixed points, which would be theadditional t' points of agreement between E(K, •) and E(K', •). But apermutation on N–t objects with t' fixed points is equal to the number of wayst' out of N–t objects can be fixed, while the remaining N–t–t' are not fixed.Then using Problem 3.4 we have thatPr(t' additional fixed points) = ⨯Pr(no fixed points in N – t – t' objects)=We see that this reduces to the solution to part (a) when t' = N–t.3.4Let be the set of permutations on [0, 1, . . ., 2n– 1], which is referredto as the symmetric group on 2n objects, and let N = 2n. For 0 ≤ i≤ N, let A i be all mappings for which π(i) = i. It follows that |A i| = (N– 1)! and= (N–k)!. The inclusion-exclusion principle states thatPr(no fixed points in π)=== 1 – 1 + 1/2! – 1/3! + . . . + (–1)N⨯ 1/N!= e–1 +Then since e–1≈ 0.368, we find that for even small values of N, approximately37% of permutations contain no fixed points.3.53.6 Main key K = 111…111 (56 bits)Round keys K1 = K2=…= K16 = 1111..111 (48 bits)Ciphertext C = 1111…111 (64 bits)Input to the first round of decryption =LD0RD0 = RE16LE16 = IP(C) = 1111...111 (64 bits)LD0 = RD0 = 1111...111 (32 bits)Output of the first round of decryption = LD1RD1LD1 = RD0= 1111…111 (32 bits)Thus, the bits no. 1 and 16 of the output are equal to ‘1’.RD1 = LD0⊕ F(RD0, K16)We are looking for bits no. 1 and 16 of RD1 (33 and 48 of the entire output).Based on the analysis of the permutation P, bit 1 of F(RD0, K16) comes from thefourth output of the S-box S4, and bit 16 of F(RD0, K16) comes from the second output of the S-box S3. These bits are XOR-ed with 1’s from the correspondingpositions of LD0.Inside of the function F,E(RD0) ≈ K16= 0000…000 (48 bits),and thus inputs to all eight S-boxes are equal to “000000”.Output from the S-box S4 = “0111”, and thus the fourth output is equal to ‘1’,Output from the S-box S3 = “1010”, and thus the second output is equal to ‘0’.From here, after the XOR, the bit no. 33 of the first round output is equal to ‘0’, and the bit no. 48 is equal to ‘1’.3.7 In the solution given below the following general properties of the XOR functionare used:A ⊕ 1 = A'(A ⊕ B)' = A' ⊕ B = A ⊕ B'A' ⊕ B' = A ⊕ BWhere A' = the bitwise complement of A.a. F (R n, K n+1) = 1We haveL n+1 = R n; R n+1 = L n⊕ F (R n, K n+1) = L n⊕ 1 = L n'ThusL n+2 = R n+1 = L n' ; R n+2 = L n+1 = R n'i.e., after each two rounds we obtain the bit complement of the original input,and every four rounds we obtain back the original input:L n+4 = L n+2' = L n ; R n+2 = R n+2' = R nTherefore,L16 = L0; R16 = R0An input to the inverse initial permutation is R16 L16.Therefore, the transformation computed by the modified DES can berepresented as follows:C = IP–1(SWAP(IP(M))), where SWAP is a permutation exchanging the positionof two halves of the input: SWAP(A, B) = (B, A).This function is linear (and thus also affine). Actually, this is a permutation, the product of three permutations IP, SWAP, and IP–1. This permutation ishowever different from the identity permutation.b. F (R n, K n+1) = R n'We haveL n+1 = R n; R n+1 = L n⊕ F(R n, K n+1) = L n⊕ R n'L n+2 = R n+1 = L n⊕ R n'R n+2 = L n+1⊕ F(R n+1, K n+2) = R n≈ (L n⊕ R n')' = R n⊕ L n⊕ R n'' = L nL n+3 = R n+2 = L nR n+3 = L n+2⊕ F (R n+2, K n+3) = (L n≈ R n') ⊕ L n' = R n' ⊕1 = R ni.e., after each three rounds we come back to the original input.L15 = L0; R15 = R0andL16 = R0(1)R16 = L0⊕ R0' (2)An input to the inverse initial permutation is R16 L16.A function described by (1) and (2) is affine, as bitwise complement is affine,and the other transformations are linear.The transformation computed by the modified DES can be represented asfollows:C = IP–1(FUN2(IP(M))), where FUN2(A, B) = (A ⊕ B', B).This function is affine as a product of three affine functions.In all cases decryption looks exactly the same as encryption.3.8 a. First, pass the 64-bit input through PC-1 (Table 3.4a) to produce a 56-bit result.Then perform a left circular shift separately on the two 28-bit halves. Finally,pass the 56-bit result through PC-2 (Table 3.4b) to produce the 48-bit K1.:in binary notation: 0000 1011 0000 0010 0110 01111001 1011 0100 1001 1010 0101in hexadecimal notation: 0 B 0 2 6 7 9 B 4 9 A 5b. L0, R0 are derived by passing the 64-plaintext through IP (Table 3.2a):L0 = 1100 1100 0000 0000 1100 1100 1111 1111R0 = 1111 0000 1010 1010 1111 0000 1010 1010c. The E table (Table 3.2c) expands R0 to 48 bits:E(R0) = 01110 100001 010101 010101 011110 100001 010101 010101d. A = 011100 010001 011100 110010 111000 010101 110011 110000e. (1110) = (14) = 0 (base 10) = 0000 (base 2)(1000) = (8) = 12 (base 10) = 1100 (base 2)(1110) = (14) = 2 (base 10) = 0010 (base 2)(1001) = (9) = 1 (base 10) = 0001 (base 2)(1100) = (12) = 6 (base 10) = 0110 (base 2)(1010) = (10) = 13 (base 10) = 1101 (base 2)(1001) = (9) = 5 (base 10) = 0101 (base 2)(1000) = (8) = 0 (base 10) = 0000 (base 2)f. B = 0000 1100 0010 0001 0110 1101 0101 0000g. Using Table 3.2d, P(B) = 1001 0010 0001 1100 0010 0000 1001 1100h. R1 = 0101 1110 0001 1100 1110 1100 0110 0011i. L1 = R0. The ciphertext is the concatenation of L1 and R1. Source: [MEYE82]3.9The reasoning for the Feistel cipher, as shown in Figure 3.6 applies in the case ofDES. We only have to show the effect of the IP and IP–1 functions. For encryption, the input to the final IP–1 is RE16|| LE16. The output of that stage is the ciphertext.On decryption, the first step is to take the ciphertext and pass it through IP. Because IP is the inverse of IP–1, the result of this operation is just RE16|| LE16, which isequivalent to LD0|| RD0. Then, we follow the same reasoning as with the Feistel cipher to reach a point where LE0 = RD16 and RE0 = LD16. Decryption is completed by passing LD0|| RD0 through IP–1. Again, because IP is the inverse of IP–1, passing the plaintext through IP as the first step of encryption yields LD0|| RD0, thusshowing that decryption is the inverse of encryption.3.10a.Let us work this from the inside out.T16(L15|| R15) = L16|| R16T17(L16|| R16) = R16|| L16IP [IP–1 (R16|| L16)] = R16|| L16TD1(R16|| L16) = R15|| L15b.T16(L15|| R15) = L16|| R16IP [IP–1 (L16|| R16)] = L16|| R16TD1(R16 || L16) = R16|| L16⊕ f(R16, K16)≠ L15|| R153.11PC-1 is essentially the same as IP with every eighth bit eliminated. This wouldenable a similar type of implementation. Beyond that, there does not appear to be any particular cryptographic significance.The equality in the hint can be shown by listing all 1-bit possibilities:A B A ⊕ B (A ⊕ B)' A' ⊕ B0 0 0 1 10 1 1 0 01 0 1 0 0文档来源为:从网络收集整理.word版本可编辑.欢迎下载支持.consider the two XOR operations in Figure 3.8. If the plaintext and key for anencryption are complemented, then the inputs to the first XOR are alsocomplemented. The output, then, is the same as for the uncomplementedinputs. Further down, we see that only one of the two inputs to the secondXOR is complemented, therefore, the output is the complement of the outputthat would be generated by uncomplemented inputs.b.In a chosen plaintext attack, if for chosen plaintext X, the analyst can obtain Y1= E[K, X] and Y2 = E[K, X'], then an exhaustive key search requires only 255rather than 256 encryptions. To see this, note that (Y2)' = E[K', X]. Now, pick atest value of the key T and perform E[T, X]. If the result is Y1, then we knowthat T is the correct key. If the result is (Y2)', then we know that T' is the correctkey. If neither result appears, then we have eliminated two possible keys withone encryption.3.14 The result can be demonstrated by tracing through the way in which the bits areused. An easy, but not necessary, way to see this is to number the 64 bits of the key as follows (read each vertical column of 2 digits as a number):211-021-001-020-103-242-745-683-The first bit of the key is identified as 21, the second as 10, the third as 13, and so on.The eight bits that are not used in the calculation are unnumbered. The numbers 01 through 28 and 30 through 57 are used. The reason for this assignment is to clarify the way in which the subkeys are chosen. With this assignment, the subkey for the first iteration contains 48 bits, 01 through 24 and 30 through 53, in their naturalnumerical order. It is easy at this point to see that the first 24 bits of each subkey will always be from the bits designated 01 through 28, and the second 24 bits ofeach subkey will always be from the bits designated 30 through 57.3.15 For 1 ≤ i ≤ 128, take c i∈ {0, 1}128 to be the string containing a 1 in position i andthen 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 c i’s which we can XOR together to obtain c. Let I(c) ⊆ {1, 2, . . . , 128} denote this subset.ObserveThus, we obtain the plaintext of c by computing . Let 0 be the all-zerostring. 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.3.16a. This adds nothing to the security of the algorithm. There is a one-to-onereversible relationship between the 10-bit key and the output of the P10function. If we consider the output of the P10 function as a new key, then thereare still 210 different unique keys.b. By the same reasoning as (a), this adds nothing to the security of the algorithm.3.17s = wxyz + wxy + wyz + wy + wz + yz + w + x + zt = wxz + wyz + wz + xz + yz + w + y3.18OK4.1 A group is a set of elements that is closed under a binary operation and that isassociative and that includes an identity element and an inverse element.4.2 A ring is a set of elements that is closed under two binary operations, addition andsubtraction, with the following: the addition operation is a group that iscommutative; the multiplication operation is associative and is distributive over the addition operation.4.3 A field is a ring in which the multiplication operation is commutative, has no zerodivisors, and includes an identity element and an inverse element.4.4 A nonzero b is a divisor of a if a = mb for some m, where a, b, and m are integers.That is, b is a divisor of a if there is no remainder on division.4.5 In modular arithmetic, all arithmetic operations are performed modulo someinteger.4.6 (1) Ordinary polynomial arithmetic, using the basic rules of algebra. (2) Polynomialarithmetic in which the arithmetic on the coefficients is performed over a finite field;that is, the coefficients are elements of the finite field. (3) Polynomial arithmetic in which the coefficients are elements of a finite field, and the polynomials are defined modulo a polynomial M(x) whose highest power is some integer n.4.1 a. n!b. We can do this by example. Consider the set S3. We have {3, 2, 1} • {1, 3, 2} = {2,3, 1}, but {1, 3, 2} • {3, 2, 1} = {3, 1, 2}.4.2a.b. No. The identity element is 1, but 0 has no inverse.4.3 S is a ring. We show using the axioms in Figure 4.1:(A1) Closure: The sum of any two elements in S is also in S.(A2) Associative: S is associative under addition, by observation.(A3) Identity element: a is the additive identity element for addition.C HAPTER 4F INITE F IELDS(A4) Inverse element: The additive inverses of a and b are b and a, respectively.(A5) Commutative: S is commutative under addition, by observation.(M1) Closure: The product of any two elements in S is also in S.(M2) Associative: S is associative under multiplication, by observation.(M3) Distributive laws: S is distributive with respect to the two operations, byobservation.4.4 The equation is the same. For integer a < 0, a will either be an integer multiple of nof fall between two consecutive multiples qn and (q + 1)n, where q < 0. Theremainder satisfies the condition 0 ≤ r≤ n.4.5 In this diagram, q is a negative integer.4.6 a. 2 b. 3 c. 4There are other correct answers.4.7 Section 4.2 defines the relationship: a = n⨯⎣a/n⎦ + (a mod n). Thus, we candefine the mod operator as: a mod n = a–n⨯⎣a/n⎦.a. 5 mod 3 = 5 – 3 ⎣5/3⎦ = 2b. 5 mod –3 = 5 – (–3) ⎣5/(–3)⎦ = –1c. –5 mod 3 = –5 – 3 ⎣(–5)/3⎦ = 1d. –5 mod –3 = –5 – (–3) ⎣(–5)/(–3)⎦ = –2This example is from [GRAH94]4.8 a = b4.9Recall Figure 4.2 and that any integer a can be written in the forma = qn + rwhere q is some integer and r one of the numbers0, 1, 2, . . ., n– 1Using the second definition, no two of the remainders in the above list arecongruent (mod n), because the difference between them is less than n andtherefore n does not divide that difference. Therefore, two numbers that are not congruent (mod n) must have different remainders. So we conclude that n divides (a–b) if and only if a and b are numbers that have the same remainder whendivided by n.4.10 1, 2, 4, 6, 16, 124.11a.This is the definition of congruence as used in Section 4.2.b.The first two statements meana –b = nk; b –c = nmso thata – c = (a – b) + (b – c) = n(k + m)4.12a.Let c = a mod n and d = b mod n. Thenc = a + kn;d = b + mn; c – d = (a – b) + (k – m)n.Therefore (c – d) = (a – b) mod ning the definitions of c and d from part (a),cd = ab + n(kb + ma + kmn)Therefore cd = (a ⨯ b) mod n4.13 1–1 = 1, 2–1 = 3, 3–1 = 2, 4–1 = 4。