密码编码学与网络安全(第五版)答案
密码编码学与网络安全答案
密码编码学与网络安全答案1. 密码编码学的基本概念及作用密码编码学是一门研究如何加密和解密信息的学科。
其主要目的是确保通信的机密性和完整性,以保护敏感信息免受未经授权的访问和篡改。
2. 传统密码编码技术传统密码编码技术包括凯撒密码、培根密码、维吉尼亚密码等。
这些方法通过改变字符的顺序、替换字符或替换字符的位置来隐藏信息。
3. 对称密码与非对称密码对称密码使用相同的密钥来加密和解密信息,速度快但安全性较低。
非对称密码使用公钥和私钥来加密和解密信息,安全性高但速度较慢。
4. 散列函数及其应用散列函数将输入数据转换为固定长度的哈希值,唯一性高且不可逆。
散列函数常用于验证数据的完整性和一致性。
5. 数字签名的原理与应用数字签名是在信息上加上签名以证明其不可抵赖性和完整性的技术。
它使用私钥来加密信息,公钥用于解密验证,以确保信息未被篡改。
6. SSL/TLS协议与网络安全SSL/TLS是一种用于保护网络通信的安全协议。
它使用非对称密码和对称密码相结合的方法,确保数据传输安全并验证服务器的身份。
7. 零知识证明与加密算法零知识证明是一种证明知识而不泄露具体内容的协议。
它使用加密算法和数学定理来验证某方的声明是否正确,而不需要提供实际证据。
8. 隐私保护与数据加密隐私保护是网络安全的重要方面之一。
数据加密技术可以对敏感数据进行保护,确保只有授权的人可以访问和使用这些数据。
9. 数据备份与恢复策略数据备份是网络安全的重要措施之一。
通过定期备份数据,可以在数据丢失或损坏时恢复数据,并确保业务连续性。
10. 网络安全威胁与应对措施网络安全威胁包括网络攻击、恶意软件、社交工程等。
应对措施包括使用防火墙、安全软件、加强员工培训等来保护网络安全。
计算机网络安全基础第五版课后答案
计算机网络安全基础第五版课后答案1-1计算机网络向用户可以提供哪些服务?答:计算机网络向用户提供的最重要的功能有两个,连通性和共享。
1-2试简述分组交换的特点答:分组交换实质上是在“存储―一转发”基础上发展起来的。
它兼有电路交换和报文交换的优点。
分组交换在线路上采用动态复用技术传送按一定长度分割为许多小段的数据—一分组。
每个分组标识后,在一条物理线路上采用动态复用的技术,同时传送多个数据分组。
把来自用户发端的数据暂存在交换机的存储器内,接着在网内转发。
到达接收端,再去掉分组头将各数据字段按顺序重新装配成完整的报文。
分组交换比电路交换的电路利用率高,比报文交换的传输时延小,交互性好。
1-3试从多个方面比较电路交换、报文交换和分组交换的主要优缺点。
答:(1)电路交换电路交换就是计算机终端之间通信时,一方发起呼叫,独占一条物理线路。
当交换机完成接续,对方收到发起端的信号,双方即可进行通信。
在整个通信过程中双方一直占用该电路。
它的特点是实时性强,时延小,交换设备成本较低。
但同时也带来线路利用率低,电路接续时间长,通信效率低,不同类型终端用户之间不能通信等缺点。
电路交换比较适用于信息量大、长报文,经常使用的固定用户之间的通信。
(2)报文交换将用户的报文存储在交换机的存储器中。
当所需要的输出电路空闲时,再将该报文发向接收交换机或终端,它以“存储―—转发”方式在网内传输数据。
报文交换的优点是中继电路利用率高,可以多个用户同时在一条线路上传送,可实现不同速率、不同规程的终端间互通。
但它的缺点也是显而易见的。
以报文为单位进行存储转发,网络传输时延大,且占用大量的交换机内存和外存,不能满足对实时性要求高的用户。
报文交换适用于传输的报文较短、实时性要求较低的网络用户之间的通信,如公用电报网。
(3)分组交换分组交换实质上是在“存储―一转发”基础上发展起来的。
它兼有电路交换和报文交换的优点。
分组交换在线路上采用动态复用技术传送按一定长度分割为许多小段的数据―一分组。
密码编码学和网络安全(第五版)答案解析
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。
计算机网络安全基础(第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参考模型并没有。
密码学第五版部分课后答案
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 在多罗的怪诞小说中,有一个故事是这样的:地主彼得遇到了下图所示的消息,他找到了密钥,是一段整数:7876565434321123434565678788787656543432112343456567878878765654343211234a.破译这段消息。
提示:最大的整数是什么?b.如果只知道算法而不知道密钥,这种加密方案的安全性怎么样?c.如果只知道密钥而不知道算法,这种加密方案的安全性又怎么样?解:A.根据提示,将密文排成每行8字母的矩阵,密钥代表矩阵中每行应取的字母,依次取相应字母即可得明文。
外文版第五版作业_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.列出并简要定义基于攻击者所知道信息的密码分析攻击类型。
惟密文攻击:只知道要解密的密文。
这种攻击一般是试遍所有可能的密钥的穷举攻击,如果密钥空间非常大,这种方法就不太实际。
因此攻击者必须依赖于对密文本身的分析,这一般要运用各种统计方法。
密码编码学与网络安全答案
密码编码学与网络安全答案密码编码学是一门研究如何保护密码和信息安全的学科。
在网络安全中,密码编码学起着至关重要的作用。
下面我将就密码编码学与网络安全的关系进行探讨。
首先,密码编码学是网络安全的基础。
在网络通信中,要确保信息的机密性和完整性,就需要使用密码技术进行加密和解密。
密码编码学提供了各种加密算法,如对称加密算法和非对称加密算法,以及哈希函数等。
这些算法可以对通信数据进行加密,保护数据的机密性。
同时,密码编码学还可以使用数字签名和数字证书来验证通信双方的身份和数据的完整性。
这些技术都是网络安全的关键组成部分,没有密码编码学的支持,网络安全将无法实现。
其次,密码编码学能够防止黑客入侵和信息泄露。
在网络安全中,黑客入侵是常见的威胁之一。
黑客可以通过各种手段获取用户的密码和敏感信息,从而侵犯用户的隐私和安全。
密码编码学可以通过加密算法保护用户的密码,使黑客无法轻易获取用户的真实密码。
此外,密码编码学还可以使用数字证书和数字签名技术,防止黑客进行身份伪造和数据篡改,从而保护网络中的数据安全。
最后,密码编码学可以促进网络安全的研究和发展。
网络安全是一个不断变化和发展的领域,新的威胁和攻击手段不断出现。
密码编码学不仅提供了有效的加密算法和认证技术,还为解决网络安全问题提供了一种思维模式和解决方法。
研究密码编码学可以帮助人们深入理解网络安全的原理和技术,提高对网络安全风险的识别和应对能力,促进网络安全技术的研究和发展。
综上所述,密码编码学对于网络安全具有重要的意义。
它不仅为网络通信提供了保护安全的手段,还能够防止黑客入侵和信息泄露,并促进网络安全的研究和发展。
在日益复杂和多样化的网络安全威胁面前,密码编码学的作用将愈发重要。
为了提高网络安全水平,我们应该加强对密码编码学的学习和应用,不断完善网络安全技术体系,确保网络的稳定和安全运行。
《密码编码学与网络安全》复习题答案资料
《密码编码学与网络安全》复习题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.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.安全性很好。
密码编码学与网络安全课后习题答案全
密码编码学与网络安全(全)1.1 什么是OSI安全体系结构OSI安全体系结构是一个架构,它为规定安全(de)要求和表征满足那些要求(de)途径提供了系统(de)方式.该文件定义了安全攻击、安全机理和安全服务,以及这些范畴之间(de)关系.1.2 被动安全威胁和主动安全威胁之间(de)差别是什么被动威胁必须与窃听、或监控、传输发生关系.电子邮件、文件(de)传送以及用户/服务器(de)交流都是可进行监控(de)传输(de)例子.主动攻击包括对被传输(de)数据加以修改,以及试图获得对计算机系统未经授权(de)访问.1.4验证:保证通信实体之一,它声称是.访问控制:防止未经授权使用(de)资源(即,谁可以拥有对资源(de)访问,访问在什么条件下可能发生,那些被允许访问(de)资源做这个服务控制).数据保密:保护数据免受未经授权(de)披露.数据完整性:保证接收到(de)数据是完全作为经授权(de)实体(即包含任何修改,插入,删除或重播)发送.不可否认性:提供保护反对否认曾参加全部或部分通信通信中所涉及(de)实体之一.可用性服务:系统属性或访问和经授权(de)系统实体(de)需求,可用(de)系统资源,根据系统(即系统是可用(de),如果它提供服务,根据系统设计,只要用户要求(de)性能指标它们).第二章1.什么是对称密码(de)本质成分明文、加密算法、密钥、密文、解密算法.4.分组密码和流密码(de)区别是什么流密码是加密(de)数字数据流(de)一个位或一次一个字节.块密码是明文块被视为一个整体,用来产生一个相同长度(de)密文块......分组密码每次处理输入(de)一组分组,相应(de)输出一组元素.流密码则是连续地处理输入元素,每次输出一个元素.6.列出并简要定义基于攻击者所知道信息(de)密码分析攻击类型.惟密文攻击:只知道要解密(de)密文.这种攻击一般是试遍所有可能(de)密钥(de)穷举攻击,如果密钥空间非常大,这种方法就不太实际.因此攻击者必须依赖于对密文本身(de)分析,这一般要运用各种统计方法.已知明文攻击:分析者可能得到一个或多个明文消息,以及它们(de)密文.有了这些信息,分析者能够在已知明文加密方式(de)基础上推导出某些关键词.选择明文攻击:如果分析者有办法选择明文加密,那么他将特意选去那些最有可能恢复出密钥(de)数据.第三章思考题3.2分组密码和溜密码(de)差别是什么流密码是加密(de)数字数据流(de)一个位或一次一个字节.块密码是明文块被视为一个整体,用来产生一个相同长度(de)密文块.3.5混淆和扩散(de)差别是什么明文(de)统计结构中(de)扩散,成密文(de)远射统计消退.这是通过有每个明文两位数(de)影响许多密文数字,这相当于说,每个密文数字被许多明文数字影响(de)价值.混乱旨在使密文和加密密钥(de)尽可能复杂,再次挫败企图发现(de)关键值(de)统计之间(de)关系.因此,即使攻击者可以得到一些手柄上(de)密文,在其中(de)关键是使用(de)方式产生(de)密文是如此复杂,使其很难推断(de)关键统计.这是通过使用一个复杂(de)替换算法.3.8 解释什么是雪崩效应雪崩效应是任何加密算法等明文或关键(de)一个小(de)变化产生显着(de)变化,在密文(de)财产.3.9差分分析与线性分析(de)区别是什么差分密码分析是一项技术,特别是异差模式(de)选择明文被加密.差异所产生(de)密文(de)模式提供信息,可以用来确定加密密钥.线性密码分析(de)基础上寻找线性近似描述块密码进行转换.第四章习题4.19 (1)3239 (2)GCD(40902,24240)=34≠1,所以是没有乘法逆.3. 5504.23 a. 9x2 + 7x + 7 b. 5x3 + 7x2 + 2x + 64,24(1)可约:(X + 1)(X2 + X +1)2.不可约(de).如果你能分解多项式(de)一个因素将x或(X + 1),这会给你一个根为x =0或x= 1.这个多项式(de)0和1(de)替代,它显然没有根.(3)可约:(X +1)44.25 a. 1 b. 1 c. x + 1 d. x + 78第五章思考题5.10简述什么是轮密钥加变换5.11简述密钥扩展算法AES密钥扩展算法(de)4字(16字节)(de)密钥作为输入,并产生了44个字(156字节)(de)线性阵列.扩张是指由5.2节中(de)伪代码.5.12字节代替和字代替有何不同SubBytes国家,每个字节映射到一个新(de)字节使用(de)S-盒.子字输入字,每个字节映射到一个新(de)字节使用(de)S-盒.第六章思考题6.1 什么是三重加密三重加密,明文块进行加密,通过加密算法;结果,然后再通过相同(de)加密算法通过;第二次加密(de)结果是通过第三次通过相同(de)加密算法.通常情况下,第二阶段使用,而不是加密算法(de)解密算法.6.2什么是中间相遇攻击这是对双重加密算法中使用(de)攻击,并要求一个已知(de)(明文,密文)对.在本质上,明文加密产生一个中间值(de)双重加密,密文进行解密,以产生双重加密(de)中介值.查表技术,可以用这样(de)方式极大地改善蛮力尝试对所有键.6.3 在三重加密中用到多少个密钥第九章思考题9.1公钥密码体制(de)主要成分是什么明文:这是可读(de)消息或数据,将输入作为输入(de)算法.加密算法:加密算法,明文执行不同(de)转换.公钥和私钥:这是一对已被选中,这样如果一个用于加密,另一个是用于解密(de)密钥.作为输入提供(de)公共或私人密钥加密算法进行精确转换取决于.密文:这是炒消息作为输出.它依赖于明文和密钥.对于一个给定(de)消息,两个不同(de)密钥会产生两种不同(de)密文.解密算法:该算法接受密文匹配(de)关键,并产生原始明文.9.2 公钥和私钥(de)作用是什么用户(de)私钥是保密(de),只知道给用户.用户(de)公共密钥提供给他人使用.可以用私钥加密,可以由任何人与公共密钥验证签名.或公共密钥可以用于加密信息,只能由拥有私钥解密.9.5 什么事单向函数一个单向函数是一个映射到域范围等,每一个函数值(de)条件,而计算(de)逆函数(de)计算是容易(de),具有独特(de)逆是不可行(de):9.6 什么事单向陷门函数一个陷门单向函数是容易计算,在一个方向和计算,在其他方向,除非某些附加信息被称为不可行.逆与其他信息可以在多项式时间内计算.习题9.2 a. n = 33; (n) = 20; d = 3; C = 26.b. n = 55; (n) = 40; d = 27; C = 14.c. n = 77; (n) = 60; d = 53; C = 57.d. n = 143; (n) = 120; d = 11; C = 106.e. n = 527; (n) = 480; d = 343; C = 128. For decryption, we have128343 mod 527 = 128256 12864 12816 1284 1282 1281 mod527= 35 256 35 101 47 128 = 2 mod 527= 2 mod 2579.3 5第十章习题10.1 a. Y A = 75 mod 71= 51b. Y B = 712 mod 71= 4c. K = 45 mod 71= 3010.2 a. (11) = 10210 = 1024 = 1 mod 11If you check 2n for n < 10, you will find that none of the values is1 mod 11.b. 6, because 26 mod 11 = 9c. K = 36 mod 11= 3第十一章思考题11.1 安全hash函数需要具体哪些特征伪装:插入到网络欺诈来源(de)消息.这包括对手是声称来自授权(de)实体创造(de)消息.此外,还包括收到消息或邮件收件人以外(de)人放货欺诈确认.内容修改:更改消息(de)内容,包括插入,删除,换位,和修改.修改序列:各方之间(de)信息,包括插入,删除和重新排序(de)序列(de)任何修改.定时修改:延误或重播消息.在一个面向连接(de)应用程序,整个会话或消息序列可能是以前(de)一些有效(de)会话,或序列中(de)个人信息可能会推迟或重播重播.在连接(de)应用程序,个人信息(例如,数据报)可以延迟或重放.11.2抗弱碰撞和抗强碰撞之间(de)区别是什么11.4 高位在前格式和低位在前格式(de)区别是什么。
密码编码学与网络安全_课后习题答案(全).doc
密码编码学与网络安全(全)1.1 什么是 OSI 安全体系结构?OSI 安全体系结构是一个架构,它为规定安全的要求和表征满足那些要求的途径提供了系统的方式。
该文件定义了安全攻击、安全机理和安全服务,以及这些范畴之间的关系。
1.2 被动安全威胁和主动安全威胁之间的差别是什么?被动威胁必须与窃听、或监控、传输发生关系。
电子邮件、文件的传送以及用户 /服务器的交流都是可进行监控的传输的例子。
主动攻击包括对被传输的数据加以修改,以及试图获得对计算机系统未经授权的访问。
1.4 验证:保证通信实体之一,它声称是。
访问控制:防止未经授权使用的资源(即,谁可以拥有对资源的访问,访问在什么条件下可能发生,那些被允许访问的资源做这个服务控制)。
数据保密:保护数据免受未经授权的披露。
数据完整性:保证接收到的数据是完全作为经授权的实体(即包含任何修改,插入,删除或重播)发送。
不可否认性:提供保护反对否认曾参加全部或部分通信通信中所涉及的实体之一。
可用性服务:系统属性或访问和经授权的系统实体的需求,可用的系统资源,根据系统(即系统是可用的,如果它提供服务,根据系统设计,只要用户要求的性能指标它们)。
第二章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的长度和传输的频度,以便了解所交换的数据的某种性质。
计算机网络(第五版)谢希仁 课后答案第七章
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的长度和传输的频度,以便了解所交换的数据的某种性质。
密码编码学与网络安全第五版
密码编码学与网络安全第五版《密码编码学与网络安全》是一本全面介绍密码学和网络安全的经典教材。
本书分为11章,涵盖了密码学的基础知识、对称加密算法、公钥加密算法、哈希函数、数字签名、安全协议、网络安全等内容。
在密码学的基础知识章节中,书中介绍了密码学的基本概念、加密和解密的基本原理、安全性要求和攻击模型等内容。
同时,还介绍了一些常用的密码学术语和符号,为后续章节的学习做好铺垫。
对称加密算法是密码学中最简单和最早可实现的算法之一。
在本书的对称加密算法章节中,作者介绍了几种经典的对称加密算法,包括凯撒密码、DES和AES等。
对于每种算法,作者都详细介绍了其原理、算法流程以及安全性分析等内容。
公钥加密算法是密码学中的另一项重要技术。
在本书的公钥加密算法章节中,作者介绍了RSA和椭圆曲线密码算法等常用的公钥加密算法。
对于每种算法,作者都详细介绍了其原理、算法流程以及安全性分析等内容。
哈希函数是密码学中常用的一种算法。
在本书的哈希函数章节中,作者介绍了一些常用的哈希函数,如MD5和SHA-1等。
对于每种哈希函数,作者都介绍了其原理、算法流程以及安全性分析等内容。
数字签名是密码学中的一项重要技术,用于保证消息的完整性和身份认证。
在本书的数字签名章节中,作者介绍了数字签名的基本原理、几种常用的数字签名算法,如RSA和DSA等。
作者还介绍了数字证书的概念和使用方法,以及证书机构的信任模型等内容。
安全协议是网络安全中的重要组成部分。
在本书的安全协议章节中,作者介绍了一些常用的安全协议,如SSL/TLS协议和IPSec协议等。
对于每种协议,作者都详细介绍了其原理、实现方法以及安全性分析等内容。
最后,本书还介绍了一些与网络安全相关的内容,如网络攻击和防御、入侵检测和防范、网络安全政策和法律等。
同时,作者还介绍了一些常见的网络攻击技术,如拒绝服务攻击和中间人攻击等。
《密码编码学与网络安全》是一本非常经典的教材,内容全面,深入浅出。
密码编码学与网络安全(第五版) 向金海 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个 可简单地依次去测试 、强力搜索、穷举攻击 基于字母频率的破译方法 所破译的明文需要识别
密码编码学与网络安全(第五版)答案
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 performancespecifications 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, 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 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 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.C HAPTER 2C LASSICAL E NCRYPTION T ECHNIQUESR2.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.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 and 26 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 54 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 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. UZTBDLGZPNNWLGTGTUEROVLDBDUHFPERHWQSRZb.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.Then convert the letters into the corresponding alphabetic positions:The calculations proceed two letters at a time. The first pair: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.19 a.b.2.20your package ready Friday 21st room three Please destroy this immediately.2.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)3.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.C HAPTER 3B LOCKC IPHERS AND THE D ATAE NCRYPTION S TANDARD3.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 ways t' 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, approximately 37% 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 fro m 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. BecauseIP 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 Feistelcipher 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.3.13a.The equality in the hint can be shown by listing all 1-bit possibilities:We also need the equality A ⊕ B = A' ⊕ B', which is easily seen to be true. Now, 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):2113355-1025554-0214434-1123334-0012343-2021453-0202435-0110454- 1031975-1176107-2423401-7632789-7452553-0858846-6836043-9495226- 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 and thenzeros 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 canXOR 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 there are 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.C HAPTER 4F INITE F IELDS4.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.2 Here are the addition and multiplication tablesa. Yes. The identity element is 0, and the inverses of 0, 1, 2 are respectively 0, 2, 1.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.(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 can definethe mod operator as: a mod n = a–n⨯⎣a/n⎦.a. 5 mod 3 = 5 – 3 ⎣5/3⎦ = 2。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Chapter 1: Introduction (5)Chapter 2: Classical Encryption Techniques (7)Chapter 3: Block Ciphers and the Date Encryption Standard (13)Chapter 4: Finite Fields (21)Chapter 5: Advanced Encryption Standard (28)Chapter 6: More on Symmetric Ciphers (33)Chapter 7: Confidentiality Using Symmetric Encryption (38)Chapter 8: Introduction to Number Theory (42)Chapter 9: Public-Key Cryptography and RSA (46)Chapter 10: Key Management; Other Public-Key Cryptosystems (55)Chapter 11: Message Authentication and Hash Functions (59)Chapter 12: Hash and MAC Algorithms (62)Chapter 13: Digital Signatures and Authentication Protocols (66)Chapter 14: Authentication Applications (71)Chapter 15: Electronic Mail Security (73)Chapter 16: IP Security (76)Chapter 17: Web Security (80)Chapter 18: Intruders (83)Chapter 19: Malicious Software (87)Chapter 20: Firewalls (89)A NSWERS TO Q UESTIONS1.1The OSI Security Architecture is a framework that provides a systematic way of definingthe requirements for security and characterizing the approaches to satisfying thoserequirements. The document defines security attacks, mechanisms, and services, and the relationships among these categories.1.2 Passive attacks have to do with eavesdropping on, or monitoring, transmissions.Electronic mail, file transfers, and client/server exchanges are examples oftransmissions that can be monitored. Active attacks include the modification of transmitted data and attempts to gain unauthorized access to computer systems.1.3 Passive attacks: release of message contents and traffic analysis. Active attacks:masquerade, replay, modification of messages, and denial of service.1.4 Authentication: The assurance that the communicating entity is the one that it claims to be.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 performancespecifications 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.C HAPTER 2C LASSICAL E NCRYPTION T ECHNIQUESR2.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.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 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 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 54 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 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. UZTBDLGZPNNWLGTGTUEROVLDBDUHFPERHWQSRZb.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.Then convert the letters into the corresponding alphabetic positions:The calculations proceed two letters at a time. The first pair: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.19 a.b.2.20your package ready Friday 21st room three Please destroy this immediately.2.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)3.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 thevalue 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 blockwith 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.3.13a.The equality in the hint can be shown by listing all 1-bit possibilities:We also need the equality A ⊕ B = A' ⊕ B', which is easily seen to be true. Now, 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):2113355-1025554-0214434-1123334-0012343-2021453-0202435-0110454- 1031975-1176107-2423401-7632789-7452553-0858846-6836043-9495226-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 of each 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.C HAPTER 4F INITE F IELDS。