題目
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
Confidentiality(for privacy)
Authentication
Integrity
* 資料完整性,確定訊息未被竄改
Non-repudiation
3. Explain the following type of security
* 102,106,109
* 12%
unconditional security
computational security
- 計算上安全
- 破解密文的花費遠遠大於所加密訊息的價值。
- 破解密文所花費的時間遠遠多於該資訊的有效期間
provable security
- 可證明安全
- 該密碼安全性問題為公認困難問題或更難。
storage-bound security
4. Answer the following questions about vigenere cipher
* 102,106,107,109
* 12%
How to encrypt and decrypt vigenere cipher?
Encrypt
Decrypt
What is index of coincidence
- 字串任取兩字母為相同之機率
- n為字串長度,為字母在字串中的出現次數
What's the difference between mono-alphabetic cipher and poly-alphabetic cipher
- 在 mono 中同一個字母只會被轉換成一種結果,如所有凱撒密碼 A 都變成 D
- 在 poly 中則可能變成多種結果如 vigenere
How to attack vigenere cipher
- 將密文切成數個 m 長度的字串
- 計算各字串的 index of coincidence
- 若 index of coincidence 接近 0.066 則m為密鑰之長度(或其整數倍),否則接近 0.038
- 若為前者則做頻率分析破解密文內容,若為後者則調整 m 長度
5. Answer the following questions about block cipher
* 102,106,107,109
* 12
What's the SPN (Substituition-Permutation network structure)? draw!
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- Round
- 在各輪將處理中密文與key做運算(e.g. 互斥或(xor))
- Substitution 代換
- Permutation 置換
- 進行數輪
- 必須可逆
What's the Feistel Network structure?draw!
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 輸入須為偶數
- 加密
- 在每輪將右半與互斥或併當作下一輪的左半。左半則為下一輪的右半
- 解密
Main differences
- SPN s-box必須可逆,來解密。FEISTEL則只需倒序使用 KEY 解密
6. DES Problems
Encrypt and Decrypt
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Round Key generation procedure
- 由密鑰 K 產生16 個 48-bit sub-keys
Not safe? why?
- 56-bit key size 太小, 1999年就能在一內破解解
AES Problems
Encryption
Decryption
7. Computation
Find an x = 1~10 such that
GCD
gcd(2021,3031)
- gcd(2021,3031) = gcd(2021,1010) = gcd(1,1010)=1
gcd(357,1235)
- gcd(357,1235) = gcd(357,164) = gcd(29,164) = gcd(29,19) = gcd(10,19) = gcd(10,9) = gcd(1,9) = 1
Inverse
費馬小定理
8. Answer the following
- Block cipher, Stream cipher
- Block cipher 以一把key以block為單位加密(without memory)
- Stream cipher key不斷改變一次加密一個byte 或bit(with memory)
- Symmetric, Asymmetric
- Symmetric Cryptosystems: 其加密鑰=解密鑰,鑰匙是保密的。
- Asymmetric Cryptosystems:其加密鑰≠解密鑰,且加密鑰為公開鑰(Public Key)而解密鑰為私鑰(Private Key)。
9. asymmetric crypto sign and verify
- Using asymmetric (public-key) cryptosystems, suppose Alice (A) want to sign and encrypt a document to Bob (B), and Bob need to decrypt and verify the document. Alice has her public key KUA and private key KRA, whereas Bob has his public key KUB and private key KRB. Please sketch a flowchart to illustrate the process of using these keys to sign/verify and encrypt/decrypt for Alice and Bob.
