1 / 13

DES and Triple DES

DES and Triple DES. 楊昌偉. Ouline. DES 和 Triple DES 簡單介紹 How to Get a optimal C code 測試平台和結果. Each single round. F function. P 1. P n. …. DES encrypt. DES encrypt. K. K. C 1. C n. (a)Encryption (ECB mode). C 1. C n. …. DES decrypt. DES decrypt. K. K. P 1. P n.

yaakov
Télécharger la présentation

DES and Triple DES

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DES and Triple DES 楊昌偉

  2. Ouline • DES 和Triple DES簡單介紹 • How to Get a optimal C code • 測試平台和結果

  3. Each single round

  4. F function

  5. P1 Pn … DES encrypt DES encrypt K K C1 Cn (a)Encryption (ECB mode) C1 Cn … DES decrypt DES decrypt K K P1 Pn (b)Decryption (ECB mode)

  6. IV P1 P2 DES encrypt DES encrypt K K C1 C2 (a)Encryption (CBC mode)

  7. C2 C1 DES decrypt DES decrypt K K IV P1 P2 (b)Decryption (CBC mode)

  8. Triple DES K1 K2 K1 B A E D E P C (a) Encryption K1 K2 K1 A B D E D C P (b) Decryption

  9. How to get a optimal C code • 1. 利用macro語法代替副程式的呼叫 • 2. 展開迴圈 • 3. 利用bitwise的運算 (32bit AND XOR OR) • 4. Preprocessing • 5. Compiler optimization option : gcc -O3 -funroll-loops • 6. Toolkit : Intel V-tune (CPU rescheduling)

  10. Preprocess • 1. Key Setup :不要做real time key xor, 而先把subkey xor sbox ,maintain一個16 round的s box array. • 2. 在F function中合併S box和P box, 並maintain一個可以一次處理12個bit的表,最後以bitwise運算取代E box.

  11. 測試平台 • Compiler : gcc 2.7.2.3 • 平台 : FreeBSD 3.5-stable CPU Celeron 600 Memory 196 MB

  12. 測試結果

More Related