1 / 35

訊息鑑別 ( Message Authentication )

訊息鑑別 ( Message Authentication ). 本章內容. 8.1 前言 8.2 單向赫序函數 8.3 文件訊息完整性驗證 8.4 MD5 8.5 SHA 8.6 文件訊息的來源驗證 8.7 文件訊息鑑別碼. 8.1 前言. 在網路上公開的傳送文件訊息 (Document or Message) 很容易遭到駭客攔截竄改、新增、或刪除等攻擊。 需對文件訊息作 完整性 (Integrity) 驗證 。 該文件訊息是否確實為某人所送過來的文件訊息,而非由他人假冒。 需驗證訊息的 來源是否正確 。. 8.2 單向赫序函數.

Télécharger la présentation

訊息鑑別 ( Message Authentication )

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. 訊息鑑別(Message Authentication)

  2. 本章內容 8.1 前言 8.2 單向赫序函數 8.3 文件訊息完整性驗證 8.4 MD5 8.5 SHA 8.6 文件訊息的來源驗證 8.7 文件訊息鑑別碼

  3. 8.1前言 • 在網路上公開的傳送文件訊息(Document or Message)很容易遭到駭客攔截竄改、新增、或刪除等攻擊。 • 需對文件訊息作完整性(Integrity)驗證。 • 該文件訊息是否確實為某人所送過來的文件訊息,而非由他人假冒。 • 需驗證訊息的來源是否正確。

  4. 8.2 單向赫序函數 ◎ 單向赫序函數二個主要功能 (1) 將文件訊息打散及重組,使其不能再還原為原始文件訊息。 (2) 將任意長度的文件訊息壓縮成固定長度的訊息摘要。 ◎ 數學式子 MD=H(M)H(.):一單向赫序函數 M :表一任意長度文件訊息

  5. 單向赫序函數特性 ◎ 單向赫序函數三種特性 (1)給定文件訊息M,可很容易算出其對應的訊息摘要MD。 (2)給定一訊息摘要MD,很難從MD去找到一個文件訊息M〞,使H(M〞)= MD。 (3)給定一文件訊息M,很難再找到另一文件訊息M〞,使H(M)=H(M〞)。

  6. 8.3 文件訊息完整性驗證 ◎ 以單向赫序函數做文件訊息的完整驗證,其驗證 方式如下:

  7. 8.4MD5 Introduction • MD5 was developed by Ron Rivest at MIT • Arbitrary Length Message  MD5  128-bit Message

  8. MD5 Message Digest Algorithm

  9. MD5 Message Digest Algorithm(續) Initial Vector, IV Note: hexadecimal values A: 01 23 45 67 B: 89 AB CD EF C: FE DC BA 98 D: 76 54 32 10

  10. + + + + MD5 Processing of a Single 512-bit Block Yq CVq 128 A B C D 32 512 MD5 Compression Function F, T[1…16], X[i] 16 steps A B C D G, T[17…32], X[ρ2i] 16 steps A B C D H, T[33…48], X[ρ3i] 16 steps A B C D I, T[49…64], X[ρ4i] 16 steps F, G, H, I: four primitive logical function T[i]: Table T, constructed from the sine function X[k]: Array X +: addition modulo 232 128 CVq+1

  11. MD5 Compression Function Primitive Logical Function

  12. MD5 Compression Function(續) Table T T[i] = 232 abs(sin(i)) sin: sine function Example:

  13. MD5 Compression Function(續) Array X X[k]: Array X, X[k] = M[q  16 + k] = the kth 32-bit word in the qth 512-bit block of the message Permutation ρ ρ2(i) = (1 + 5i) mod 16 ρ3(i) = (5 + 3i) mod 16 ρ4(i) = 7i mod 16

  14. A A B B C C D D Elementary MD5 Operation (single step) Primitive Logical Function + g X[k] + T[i] + CLSs + CLSs: <<< s, Circular Left Shift s bits

  15. 8.5 Secure Hash Algorithm (SHA-1) Introduction • SHA was developed by the National Institute of Standard and Technology(NIST) • SHA was published as a federal information processing standard(FIPS PUB 180) in 1993 • Maximum length of less than 264 Message  SHA  160-bit Message

  16. ANSI:American National Standards Institute (美國國家標準局) ANSI是美國主要的標準訂定單位,它負責訂定許多資訊處理方面的定義及標準。ANSI是代表出席ISO的美國代表。 • NIST:National Institute of Standards and Technology (美國國家標準技術局)美國國家標準技術局 (前身為National Bureau of Standards) 隸屬美國商業部,是發展標準的主要生力軍,NIST底下的電腦科學技術局 (The Institute for Computer Sciences and Technology) 為美國研發並出版FIPS標準 (Federal Information Processing Standards),聯邦機構依此標準購買電腦設備。

  17. FIPS:Federal Information Processing Standards(聯邦資訊處理標準)聯邦資訊處理標準是美國聯邦政府用來定義政府機構購買資訊系統的要求條件以及審核電腦及通訊系統的一套標準。常以FIPS PUB xxxx 形式表達。

  18. Secure Hash Algorithm (SHA-1) (續)

  19. Secure Hash Algorithm (SHA-1) (續) Initial Vector, IV Note: hexadecimal values A: 67 45 23 01 B: EF CD AB 89 C: 98 BA DC FE D: C3 D2 E1 F0 E: C3 D2 E1 F0

  20. SHA-1 Processing of a Single 512-bit Block Yq CVq 160 32 A B C D E 512 SHA-1 Compression Function f1, K, W[1…19] 20 steps A B C D E f2, K, W[20…39] 20 steps A B C D E f3, K, W[40…59] 20 steps A B C D E f4, K, W[60…70] 20 steps f: primitive logical function Kt: an additive constant; four distinct values are used, as defined previously Wt: a 32-bit word derive from the current 512-bit input block +: addition modulo 232 + + + + + CVq+1 160

  21. SHA-1 Compression Function Primitive Logical Function

  22. SHA-1 Compression Function(續)

  23. SHA-1 Compression Function(續) Four Additive Constant, Kt

  24. SHA-1 Compression Function(續) Array W Wt = S1(Wt-16  Wt-14  Wt-8  Wt-3) 512 bits W0 W2 W6 W8 Wt-16 W t-14 Wt-8 Wt-3 W63 W65 W71 W76 Yq XOR XOR XOR S1 S1 S1 … … … W0 W1 W15 W16 Wt W79 Sk: <<< k, Circular Left Shift k bits

  25. A B C D Elementary SHA-1 Operation (single step) A B C D E ft + S5 + + Wt S30 Kt + E

  26. Comparison of SHA-1 and MD5 • Security: • SHA-1 is more stronger against brute-force attacks than MD5 • MD5 is vulnerable to cryptanalytic attacks, but SHA-1 is not • Speed: • SHA-1 execute more slowly than MD5 • Simplicity and Compactness: • Both algorithm are simple to describe and simple to implement

  27. 8.6 文件訊息的來源驗證 • 單向赫序函數雖然可用來作訊息的完整性驗證但實際運用上卻是行不通的。 • 問題在於沒有對訊息的來源作鑑別。

  28. 植基於對稱式密碼系統的文件訊息鑑別機制 ◎ 以對稱式密碼系統來作為文件訊息鑑別機制,其 驗證方式如下:

  29. 植基於公開金鑰密碼系統的文件訊息鑑別機制 ◎ 以公開金鑰密碼系統來做數位簽章,其文件訊息 鑑別方式如下:

  30. 植基於金鑰相依單向赫序函數的文件訊息鑑別機制植基於金鑰相依單向赫序函數的文件訊息鑑別機制 ◎為改善前面兩種方法需大量運算的缺點,便有了植基於金鑰相依單向赫序函數,此種機制又稱文件訊息鑑別碼(MAC):

  31. 8.7文件訊息鑑別碼 ◎ 文件訊息鑑別碼(Message Authentication Code,MAC)可用來驗證文件訊息是否為約定好通訊的雙方所傳送,並可驗證文件訊息在傳遞過程中是否遭到竄改。

  32. 利用對稱式密碼系統及單向赫序函數所構成的MAC利用對稱式密碼系統及單向赫序函數所構成的MAC

  33. CBC-MAC

  34. 單向赫序函數MAC • 這種MAC類型是利用一單向赫序函數,配合一祕密金鑰所構成的文件訊息鑑別碼。 • 此類的文件訊息鑑別碼機制也可讓使用者自行來決定要採用何種單向赫序函數,在實作上相當便利也具有彈性。 • 串接方式可以是H(K||M),但不安全。較安全的串接方式是H(M||K)、H(K1||M||K2)、H(K,H(K||M))、H(K1,H(K2||M))

More Related