--- title: 資安導論期末題庫 --- ## 期末題庫練習 :::danger 2,5不確定 ::: **1.Prove or disprove that that 2 is a primitive root of 13. Why do we need to select a primitive root to serve as $\alpha$ in the Diffie-Hellman algorithm mentioned above?** **(2是否為13的質根?說明是或不是的原因) (在DH演算法中,為何選用質根來作運算?)** >是,因為2mod13還是2,因為這樣才能確保兩副鑰匙的共同性。 >![](https://i.imgur.com/q1b4vkD.png) >![](https://i.imgur.com/6AhkOHc.png) ![](https://i.imgur.com/9mXYhL6.png) **2. What is the Security of Diffie-Hellman algorithm? (DH 演算法的安全性原因為何?)** >這個算法能夠讓兩方在不用把密鑰傳輸出去的狀況下,使用一些事前就知道的內容,來產生一把金鑰。 **3. Alice and Bob use the Diffie-Hellman key exchange technique with a common prime q = 23 and a primitive root $\alpha$= 5. (a) If Bob has a public key YB = 10, what is Bob’s private key XB? (b) If Alice has a public key YA = 8, what is the shared key K with B? (Alice跟Bob兩人作DH金鑰交換,使用的質數是23,質根是5. (a)如果Bob的公鑰是10, 那Bob的私鑰為何? (b)如果Alice的公鑰是8, 那兩人協調的金鑰為何?)** >$(a)\ 5^a mod23 =10,a=3,8^3mod 23 = 6$ >$(b)\ 5^b mod23 = 8,b=6,10^6 mod23 = 6$ >$s=6$ **4. What is the the DOS/Clogging attack in Diffie-Hellman? (DH 演算法可能遭遇 DOS/Clogging 攻擊, 試說明之)** >中間人攻擊,攻擊者與通訊的兩端分別建立獨立的聯繫,並交換其所收到的資料,使通訊的兩端認為他們正在通過一個私密的連線與對方直接對話,但事實上整個對談都被攻擊者完全控制。 >![](https://i.imgur.com/3hbxDl8.png) **5. Please describe the ECDHE.** (試說明如何用 ECC 來做 DH 金鑰交換) >(1):客戶端隨機生成隨機值Ra,計算並將Pa(x, y)傳送至伺服器 >(2):伺服器隨機生成隨機值Rb,計算並將Pb(x, y)傳送至客戶端。 >(3):客戶端計算Sa(x, y);伺服器計算Sb(x, y) >(4):演算法保證了Sa = Sb = S,提取其中的S的x向量作為金鑰(預主金鑰)。 **6. Man-in-the-Middle attack could happen in the Diffie-Hellman key exchange protocol. Let the system parameters q = 11 and $\alpha$= 7. Suppose the private keys of Alice (sender), Bob (receiver), and Darth (attacker) are 3, 9, and 6, respectively. What is the shared key between Alice and Darth? (5%) What is the shared key between Darth and Bob? (5%) (DH 金鑰交換可能會遭遇中間人攻擊。令系統參數 q = 11 and $\alpha$= 7. 假設Alice(傳送者), Bob(接收者), Darth(攻擊者)三人的私鑰分別是 3, 9, 6. 請問Alice 跟Darth 之間協調的金鑰為何? Darth 跟Bob 之間協調的金鑰為何?)** >$Alice=7^3 mod11=2,Bob=7^9mod11=8,Darth=7^6mod11=4$ >$Alice\&Darth=4^3=2^6 mod11=9$ >$Bob\&Darth=4^9=8^6mod11=3$ >![](https://i.imgur.com/3cprKiw.png) **7. What is the purposes of ARP? DNS? (ARP 的用途何在?DNS 的用途何在?)** >ARP:透過IP確認對方的MAC位址。 >DNS:將Domain轉為IP **8. What is the SYN Flooding? Smurf attack? (說明何謂 SYN Flooding? Smurf attack?)** >SYN Flooding 攻擊者發送大量的SYN請求連線,造成伺服器頻寬被佔滿為一種阻斷式服務攻擊 >Smurf attack 攻擊者會偽裝自己IP,與目標主機IP相同,並發送大量的ICMP封包與IP廣播造成目標本機的網路頻寬被回應封包佔滿,為一種分佈式拒絕服務攻擊 **9. Explain the main functions of MAC address, IP address, and Port number in data transmission through internet. (網路通訊需要 MAC address, IP address,及 Port number,試分別說明其用途)** >IP address:在網路上用來確認裝置位置的地址 >Port number:標識伺服器上提供特定網路服務的行程 >MAC address:在網路上用來辨識機器的唯一識別碼 **10. Explain the basic difference between HTTP and HTTPS. (試說明 HTTP 與 HTTPS 的差異)** >HTTPS 需 SSL 數位憑證,傳輸前會進行加密,比 HTTP 更安全。資訊以加密形式送至有公鑰的網站,收到訊息後,網站使用其私鑰解密訊息。若資訊被途中攔截沒有私鑰也無法將其解讀 **11. Given S2 below, what is the output regarding input as 011000. (給定 S2 如下, 請問當 S2 輸入是 011000 時,輸出為何?)** ![](https://i.imgur.com/9JY67gq.png) >1.011000將最左跟最右的 bit 取出 >2.得到 00 為第 0 列 >3.1100 為第 12 行 >4.查表得出12 **12. What are the differences between block ciphers and stream ciphers? (區塊加密與串流加密的差異?)** >區塊:分區加密,key相同且不能公開,加解密速度快,但不適合加密太大的檔案 >串流:整串加密,key不相同且公鑰可以公開私鑰不能,加解密速度慢 **13. Please show how to perform the 3-DES with two keys? How to perform the 3-DES with three keys? (20%) (如何用兩把金鑰執行 3-DES? 如何用三把金鑰執行 3-DES?)** >E 加密 >D 解密 >(2key) $C = Ek1(Dk2(Ek1( P ))) ; P = Dk1(Ek2(Dk1(C)))$ ![](https://i.imgur.com/ltnK2Ti.png) >(3key) $C = Ek3(Dk2(Ek1( P ))) ; P = Dk1(Ek2(Dk3(C)))$ ![](https://i.imgur.com/RDkgir5.png) **14. What is the avalanche effect (雪崩效應) in DES? (DES 中提到的雪崩效應,是甚麼意思?)** >明文的任何細微變化都會引起密文的不可區分性改變 >OR當金鑰或文本修改其中一個bit,則輸出出來的密文會完全不一樣 **15. Compare the concepts of cryptography (密碼學) and steganography(資訊隱藏). What are their differences?(密碼學與資訊隱藏主要的差別為何?)** >密碼學是基於數學理論來證明其安全性 >資訊隱藏是將密文存在文本中,須以特定方式讀取才可得知密文 **16. What are the advantages and disadvantages of LSB (Least Significant Bit) algorithms used in steganography? (資訊隱藏演算法中常用的 LSB 方法有何優缺點?)** >優: 不改變檔案大小,掩蓋加密痕跡 >缺: 需使用大量的訊息來隱藏少量的機密訊息 **17. What is the NFT (Non-fungible token)? (NFT 是甚麼?)** >非同質化代幣是一種被稱為區塊鏈數位帳本上的資料單位,每個代幣可以代表一個獨特的數位資料,作為虛擬商品所有權的電子認證或憑證。