--- title: 資訊安全導論期末 --- # 前引 * 目前只有97、98以及107年的紀錄,因此較難猜題 * 110 下學期因為遠距課程,期末改以報告形式進行,本文作業暫停 # 題目 ## 1. (送分)For each type of the following attacks, list all information and/or encryption/decryption programs the attacker of a cryptosystem can have? * 107 * 12% ### Ciphertext-only attack * 攻擊者僅有密文。 * 攻擊者有encryption/decryption program ### Known-plaintext attack * 攻擊者有一組以上密文與明文。 * 攻擊者有encryption/decryption program ### Chosen-Plaintext Attack * 攻擊者可將明文轉為密文。 * 攻擊者有encryption/decryption program ### Chosen-Ciphertext Attack * 攻擊者可將密文轉為明文。 * 攻擊者有encryption/decryption program #### Kerckhoffs原理 * 『對於一密碼系統的安全性,應假設敵人是知道所使用的方法。』 * 攻擊者有encryption/decryption program ## 2. S-boxes * 98, 107 ![](https://i.imgur.com/WHsUKYc.png) ### Which type of (Ciphertext-only attack, Known-plaintext attack, Chosen-Plaintext Attack or Chosen-Ciphertext Attack) should **linear attack** be classified as? * Known-plaintext attack ### Which type of (Ciphertext-only attack, Known-plaintext attack, Chosen-Plaintext Attack or Chosen-Ciphertext Attack) should **differential** be classified as? * chosen-plaintext attack ### probability holds * if + means XOR * We are checking for equals to 0 to hold. If we split x and y into two groups to process , remember that the results of the two groups has to be equal for XOR to result in 0. * Bias is the probility -1/2 * ![](https://i.imgur.com/a0Jtp3i.png) #### Find the probability that $x_1+x_2+y_3+y_4=0$ holds |$x_1+x_2$ | $y_3+y_4$ | $x_1+x_2=y_3+y_4$ | | -------- | -------- | -------- | | 0 | 1 | 0 | | 0 | 0 | 1 | | 0 | 1 | 0 | | 0 | 1 | 0 | | 1 | 1 | 1 | | 1 | 0 | 0 | | 1 | 0 | 0 | | 1 | 0 | 0 | | 0 | 0 | 1 | | 0 | 1 | 0 | | 0 | 1 | 0 | | 0 | 0 | 1 | | 1 | 1 | 1 | | 1 | 1 | 1 | | 1 | 0 | 0 | | 1 | 0 | 0 | * Ans: 7/16 #### Find the probability that $x_1+x_4+y_1+y_2+y_4=0$ holds |$x_1+x_4$ | $y_1+y_2+y_4$ | $x_1+x_4=y_1+y_2+y_4$ | | -------- | -------- | -------- | | 0 | 0 | 1 | | 1 | 1 | 1 | | 0 | 1 | 0 | | 1 | 1 | 1 | | 0 | 0 | 1 | | 1 | 1 | 1 | | 0 | 0 | 1 | | 1 | 1 | 1 | | 1 | 1 | 1 | | 0 | 1 | 0 | | 1 | 1 | 1 | | 0 | 0 | 1 | | 1 | 0 | 0 | | 0 | 0 | 1 | | 1 | 0 | 0 | | 0 | 0 | 1 | * Ans:12/16 ### condition probability #### Find the conditional probability that $\Delta y=1000$ and $\Delta x=1010$ #### Find the conditional probability that $\Delta y=0101$ and $\Delta x=0110$ ## 3. Questions for AES * 97 ### List the advantages of AES over DES ### Write out AES-128 (10-round) encryption algorithm. The SubByte, ShiftRow, MixColumn, and AddRoundkey procedures can be called as a command. #### Encryption ``` AddRoundKey(S,K[0]); for(i=1;i<=9;i++) { SubByte(S); ShiftRow(S); MixColumn(S); AddRoundKey(S,K[i]); } SubByte(S); ShiftRow(S); AddRoundKey(S,K[10]); ``` #### Decryption ``` AddRoundKey(S,K[10]); InverseShiftRow(S); InverseSubByte(S); for(i=9;i>=1;i--) { AddRoundKey(S,K[i]); InverseMixColumn(S); InverseShiftRow(S); InverseSubByte(S); } AddRoundKey(S,K[0]); ``` ## 4. Consider an RSA crypto-system whose public key is ... * 107 $(n,e)=(5767,4493)$ * 98 $(n,e)=(221,77)$ ### Find prime numbers *p* and *q* such that $n =pq$ #### 107 * n = 79 * 73 #### 98 * n = 13 * 17 ### Find the private key(d,n) #### 98 * $\phi (221)=lcm((13-1),(17-1)) = 48$ * $d=e^{-1}(mod\ \phi(n))$ * $1=77*d\ mod 48\rightarrow d=5$ * Ans: (5,221) #### 107 * $\phi (5767)=lcm((79-1),(73-1)) = 936$ * $d=e^{-1}(mod\ \phi(n))$ * $1=4493*d\ mod\ 976\rightarrow d=517$ * Ans: (517,4493) ### Decrypt the ciphertext * $m(c) = c^d mod(n)$ #### 98. $88$ * 88^5 mod 221 = 219 #### 107. $1000$ * 1000^517 mod 4493 = ? * 算得出來? ### Is it possible to find a different value of $d$ in the range of $0\lt d \lt(p-1)(q-1)$ that also works in decryption. Explain why it is impossible, or find all possible values of $d$ ### RSA Key gen 1. find prime numbers $p$ and $q$. 2. Calculate $n=p*q$ 3. Calculate $\phi (n)=(p-1)(q-1)$ 4. Select e, s.t. $1<e<\phi(n), gcd(e, \phi(n))=1 has to be singular$ 5. Calculate $d=e^{-1}(mod \phi(n))$ 6. Public key: $(e, n)$ 7. Private key: $(d, n)$ ## 5. Answer the following questions about RSA cryptosystem * 107 ### What is common modulus attack * same n ![](https://i.imgur.com/z3bfcYM.png) * Choose different n's ### What is Small-e attack * e too small ![](https://i.imgur.com/DhrGuez.png) * choose large e ### What is cycling attack ![](https://i.imgur.com/YPB3OQ1.png) ### How to avoid cycling attack * choose better p,q * p,q are large prime and * $p=2p^*+1, p*$ is prime * $q=2q^*+1, q*$ is prime ## 6. Describe algorithms(flow charts) to * 107 ### Create a digital envelope ![](https://i.imgur.com/AY3NzWn.png) #### Open a digital envelope ![](https://i.imgur.com/snvwGN6.png) ## 7. Use flow charts to explain the RSA signature with hash function * 97,98,107 ### Alice wants to sign a document M ![](https://i.imgur.com/E8cl7Hw.png) * Hash plaintext and encrypt with Alice's private key ### Bob wants to verify a signed document (M,s) from Alice ![](https://i.imgur.com/FSmgvmT.png) * decrypt signature with Alices's public key * Generate hash value from plaintext and check if it matches the signature #### 教授版 [](https://i.imgur.com/p9DhCd6.png) ## 8. Certificates of public key * 97,98, 107 ### Why certificates are necessary * proves the authenticity of a device, server, or user ### Which information items should be contained in a certificate? * things mentioned by x.509 Authentication framework * includinge * 使用者名稱 A * 該使用者的公鑰 KUA * 由 CA 對(A, KUA)所簽署的簽章* * CA: certificate authority  ### Let a Certificate issued from A for B be denoted as A[B] * 需要確認答案是否正確 #### 107 ![](https://i.imgur.com/Lh2UDGT.png) * A,B,F #### 98 ![](https://i.imgur.com/SZHoy3b.png) * ans: A,E,D ## 9. What is a "Computer Virus"? Describe the life cycle of a computer virus. * 107 * Currently no PPT for this question ## 10. What are the differences between "Information Hiding" and "Encryption"? What are the differences of "Steganography" and "Watermarking" * 107 * Currently no PPT for this question ## 11. Common Modulus attack * 98, 98 ![](https://i.imgur.com/7Je3t2m.png) ![](https://i.imgur.com/VCKx7cl.png) ## 12. Consider a Rabin cryptosystem where the encryption function is $E(x) = x^2 mod 77$. Find all possible plaintexts that encrypt to the ciphertext 23 * 97,98 ### Decrypt method * $p\equiv q \equiv 3(mod4)$ * $n = p*q$ * $m_p= c^{\dfrac{p+1}{4}}mod\ p$ * $m_q= c^{\dfrac{q+1}{4}}mod\ q$ * $ap+bq=1$ * $M_1 = (a*p*m_p+n*q*m_q) mod\ p$ * $M_2 = n-M_1$ * $M_3 = (a*p*m_p-n*q*m_q) mod\ q$ * $M_4 = n-M_3$ ### Answer * $p*q=n=77, \rightarrow p=7,q=11$ * $4= 23^{\dfrac{7+1}{4}}mod\ 7$ * $1= 23^{\dfrac{11+1}{4}}mod\ 11$ * $7a+11b = 1 \rightarrow a=-3 , b=2$ * $M_1 = (-3*7*4+ 2*11*1)mod\ 7=1$ * $M_2 = 77-1$ * $M_3 = (-3*7*4-2*11*1)mod\ 11 = 4$ * $M_4 = 77-4 = 73$ ## 13. In a Diffie-Hellman key agreement between two persons A and B, (g,p) = (5,97). User A randomly choose x=4, and user B randomly selects y=9. * 97, 98 ### Which number should be sent from A to B * $A = 5^4\ mod\ 97=43$ ### Which number should be sent from B to A * $B = 5^9 mod 97=30$ ### What is the agreed key * $S = B^x mod p = A^y\ mod\ p = 30^4 mod 97 = 43^9 mod 97 = 50$ ## 14. Please draw a diagram to explain the Dual Signature scheme used in SET(Secure Electronic Transaction). * 97 ![](https://i.imgur.com/QphIB3J.png) ## 15. Is it possible to apply the technology such as encryption/decryption and digital signature in information security to multimedia. say images or videos? If it is possible, describe some applications; otherwise, explain why it is impossible * Currently no PPT for this question * Probably watermarking ###### tags: `Introduction to Information Security` `CSnote`