《交大網(wǎng)絡(luò)與信息安全第二次作業(yè).doc》由會(huì)員分享,可在線閱讀,更多相關(guān)《交大網(wǎng)絡(luò)與信息安全第二次作業(yè).doc(5頁(yè)珍藏版)》請(qǐng)?jiān)谘b配圖網(wǎng)上搜索。
1、網(wǎng)絡(luò)與信息安全第二次作業(yè)Assign 2 - InetSec 加密Assign 2 - InetSec CryptoSecret and Public Key Cryptography密鑰和公鑰的密碼技術(shù)1. How many DES keys, on the average, encrypt a particular plaintext block to a particular ciphertext block? Kaufman 3.3 (10 points)一般來(lái)說(shuō),把一段詳細(xì)的評(píng)述文字加密成一段加密文字,需要多少位DES 密碼?答:DSE一般采用56位長(zhǎng)度的Key,所以總共有256種可
2、能,這個(gè)數(shù)字大約是7.2X10的16次方。2. Suppose the DES mangler function mapped every 32-bit value to zero, regardless of the value of its input. What function would DES then compute?Kaufman 3.5 (10 points)假設(shè)這種DES切割函數(shù)就是不管輸入什么值每32位的值都映射成0,那么DES是什么函數(shù)又是怎么計(jì)算的呢?答:置換函數(shù) Li=Ki-1;Ri=Li+1*F(Ri-1,Ki)3. It is said that the ini
3、tial and final permutations of all 64 bits in DES operation donotenhance the cryptographic strength of the encryption algorithm. Could you provide an explanation without using sophisticated mathematics? (10 points)據(jù)說(shuō),64位前后交換位置這種DES方法不能提高加密算法的密碼強(qiáng)度。不使用復(fù)雜的數(shù)學(xué)理論你能提供一個(gè)解釋來(lái)說(shuō)明嗎?答:因?yàn)檩敵雠帕?(輸入排列)-1,每一個(gè)排列都是一個(gè)有次序
4、的Bryant-Tree排列,所以并沒(méi)有安全上的改善。4. Compute the number of 64-bit encryption operations performed for annbit plaintext using CBC,k-bit OFB andk-bit CFB. Count all encryption operations, not just operations performed on the plaintext itself. Take as an example,n= 1024 andk= 32.(10 points)計(jì)算64位的數(shù)字加密操作通過(guò)使用CBC
5、,k位OFB和k位CFB把它變成一個(gè)n位的評(píng)述文字。計(jì)算所有的加密操作,這些操作不僅僅運(yùn)行在這個(gè)評(píng)述文字本身。舉個(gè)例子n=1024和k =32。答:密文區(qū)段串接 (Cipher BlockChaining, CBC) 模式 k-位元密文反饋 (k-bits Cipher Feedback, CFB)模式加密運(yùn)算程序:SR1 = IV C1 = Fj (EK(SR1) P1 SRm = Sj(SRm-1) | Cm-1 ; m = 2, 3, 4, , N Cm = Fj (EK(SRm) Pm ; m = 2, 3, 4, ,N C=C1 | C2 | C3, , CN 解密運(yùn)算程序: SR1
6、 = IV P1 = Fj (DK(SR1) C1 SRm = Sj(SRm-1) | Cm-1 ; m = 2, 3, 4, , N Pm = Fj (DK(SRm) Cm ; m = 2, 3, 4, , N P =P1 | P2 | P3, , PN k-位元輸出反饋(k-bits Output Feedback, OFB) 模式 加密運(yùn)算乘程序: SR1 = IV O1 = Fj (EK(SR1) C1 = P1 O1 SRm = Sj (SRm-1) | Om-1 ; m = 2, 3, 4, , N Om = Fj (EK(SRm) ; m = 2, 3, 4, , N Cm =
7、Om Pm ; m = 2, 3, 4, , N C = C1 | C2 | C3, , CN 解密運(yùn)算程序: SR1 = IV O1 = Fj (DK(SR1) P1 = O1 C1 SRm = Sj (SRm-1) | Om-1 ; m = 2, 3, 4, , N Om = Fj (DK(SRm) ;m = 2, 3, 4, , N Pm = Om Cm ; m = 2, 3, 4, , N P = P1 | P2 | P3, , PN5. Consider the following method of encrypting a message using CBC mode. To e
8、ncrypt a message, one uses the algorithm for doing a CBC decryption. To decrypt a message, one uses the algorithm for doing a CBC encryption. Would this work? How secure is this alternative method in comparison with the normal CBC mode? (10 points)考慮以下這種方法,通過(guò)CBC模式加密一個(gè)消息。為了加密一個(gè)消息,可以使用一個(gè)CBC解碼算法。為了解密一個(gè)
9、消息,可以使用一個(gè)CBC加密算法。這是怎么實(shí)現(xiàn)的呢?這種轉(zhuǎn)換方法與一般的CBC模式比起來(lái)有多安全呢?答:這種方式是可以的。這種方式不如通常的CBC模式安全,因?yàn)榻饷芩惴ㄊ?,每個(gè)密文組分別解密,再與上一個(gè)塊密文亦或就可以恢復(fù)明文。解密算法的輸入是明文,這樣的安全性就非常低。6. What pseudo-random bit stream is generated by 64-bit OFB with a weak DES key? (10 points)Note: please refer to Kaufman 3.3.6 for the definition of weak key.通過(guò)使用一
10、個(gè)弱的DES密碼加密而成的64位OFB,將產(chǎn)生什么偽隨機(jī)的比特流呢?注:請(qǐng)參考Kaufman 3.3.6相關(guān)章節(jié)弱密碼的定義答:OFB是用虛擬隨機(jī)數(shù)產(chǎn)生器加上IV 與密鑰,產(chǎn)生“一次性冗字填充”片段,即Ex(IV), Ex(Ex (IV), Ex(Ex(Ex (IV), 。一個(gè)弱DES Key是自己本身的反轉(zhuǎn),對(duì)于任何一個(gè)塊來(lái)說(shuō)b: Ex(b) = Dx(b). So Ex(Ex(b) = b. 應(yīng)此OFB的填充序列是Ex(IV), IV, Ex(IV), IV,.。這樣的規(guī)律導(dǎo)致不安全性。7. In RSA algorithm, is it possible for more than on
11、edto work with a givene,p, andq? Kaufman 6.3 (10 points)在RSA算法中,當(dāng)我們知道e,p,g,是否可能得到超過(guò)一個(gè)d?答:不能得到,要得到d必須知道p q n e。8. In RSA algorithm, what is the probability that something to be encrypted will not be in Z*n? Kaufman 7.11 (10 points)在RSA算法中,被加密的一些不屬于Z*n,什么情況下是可能發(fā)生的?答:Since Zn =n-1 and Zn * = n p q + 1P
12、robability = (Zn Zn * ) / Zn = ( P + q + 12) / ( n 1 )9. In the description of possibledefense against Man-in-the-Middle AttackKaufman 6.4.2, 3, it stated that encrypting the Diffie-Hellman value with the other sidess public key shall prevent the attack. Why is this case assumption that an attacker
13、can encrypt whatever it wants with the other sides public key? Kaufman 6.2 (10 points)在描述defense against Man-in-the-Middle Attack這種可能性時(shí),它說(shuō)用另外種方面的普通密碼加密這個(gè)Diffie-Hellman值可以預(yù)防這方面的攻擊。為什么一個(gè)攻擊可以用另一方面的普通密碼加密任何它想要的呢?答:普通密碼加密這個(gè)Diffie-Hellman值,可以得知該文件的加密密碼方式,從而找出規(guī)律。對(duì)其進(jìn)行解密。所以才有此說(shuō)法。10. In modular arithmetic, why must the operand x be relatively prime with the modulus n in order for x to have a unique multiplicative inverse? (10 points)在模運(yùn)算中,為什么一定要把操作數(shù)x設(shè)置成模數(shù)的相關(guān)初始值,是為了讓x有一個(gè)唯一的乘法倒數(shù)嗎?答:并非如此??赡苁菫榱诉\(yùn)算方便的關(guān)系。我們可以找到莫個(gè)數(shù)的乘法倒數(shù)相對(duì)應(yīng)的不同本源根數(shù)。