72
© The McGraw-Hill Companies, Inc., 2007 Chapter 3 基基基基基基基基基基 基基基基基基 Computer-based Symmetric Key Cryptographic A lgorithms

Chapter 3 基於電腦的對稱性金鑰 密碼學演算法 Computer-based Symmetric Key Cryptographic Algorithms

  • Upload
    dore

  • View
    91

  • Download
    0

Embed Size (px)

DESCRIPTION

Chapter 3 基於電腦的對稱性金鑰 密碼學演算法 Computer-based Symmetric Key Cryptographic Algorithms. 3.1 前言. 電腦執行加密是十分簡單與快速的。對稱性金鑰密碼學受歡迎已相當久,最近則是非對稱性金鑰密碼學受到更多的注目。 然而,在實際上大多仍是使用對稱性與非對稱性金鑰密碼學的組合。. 3.2 演算法型態和模式. 演算法型態 從明文產生密文有兩種基本方式: 串流密碼 和 區塊密碼 。. 1. 串流密碼 串流密碼技術是將明文中每個位元逐一加密,解密也是同樣規則。 - PowerPoint PPT Presentation

Citation preview

© The McGraw-Hill Companies, Inc., 2007

Chapter 3基於電腦的對稱性金鑰

密碼學演算法Computer-based Symmetric Key Cryptographic Algorithms

© The McGraw-Hill Companies, Inc., 2007

3.1 前言• 電腦執行加密是十分簡單與快速的。對稱

性金鑰密碼學受歡迎已相當久,最近則是非對稱性金鑰密碼學受到更多的注目。

• 然而,在實際上大多仍是使用對稱性與非對稱性金鑰密碼學的組合。

© The McGraw-Hill Companies, Inc., 2007

3.2 演算法型態和模式

© The McGraw-Hill Companies, Inc., 2007

• 演算法型態– 從明文產生密文有兩種基本方式:串流密碼和區塊密碼。

© The McGraw-Hill Companies, Inc., 2007

1. 串流密碼• 串流密碼技術是將明文中每個位元逐一加密,解密

也是同樣規則。• XOR 是可反推的──使用兩次後,它會產生原始

值。這在密碼學中非常有用。

© The McGraw-Hill Companies, Inc., 2007

2. 區塊密碼• 區塊密碼技術為一次加密一個明文區塊。

解密也是一次只針對一個密文區塊。

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

• 演算法模式– 電子碼冊模式– 密碼區塊鏈結模式– 密碼回饋– 輸出回饋

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

3.3 對稱性密碼學總覽

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

3.4 資料加密標準• 背景與歷史

© The McGraw-Hill Companies, Inc., 2007

• DES 如何工作 1. 基本原理

© The McGraw-Hill Companies, Inc., 2007

2. 初始排列 (IP)

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

3. 回合– 步驟 1 :金鑰轉換– 步驟 2 :擴增排列– 步驟 3 : S-box 替代

• S-box 替代是一個過程,接受縮減金鑰和擴增 RPT 進行 XOR 運作的 48 位元輸入,而使用替代技術來產生 32 位元的輸出。

– 步驟 4 : P-box 排列– 步驟 5 : XOR 和交換

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

圖 3.29 (續下頁)

© The McGraw-Hill Companies, Inc., 2007

圖 3.29 (續下頁)

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

4. 最後排列

© The McGraw-Hill Companies, Inc., 2007

5. DES 解密6. DES 的強度

© The McGraw-Hill Companies, Inc., 2007

• DES 的變動1. 雙重 DES

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

2. 三重 DES

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

3.5 國際資料加密演算法

© The McGraw-Hill Companies, Inc., 2007

• IDEA 如何工作1. 基本原理

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

2. 回合

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

3. 一個回合中子金鑰產生

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

4. 輸出轉換

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

5. 輸出轉換的子金鑰產生6. IDEA 解密7. IDEA 的強度

© The McGraw-Hill Companies, Inc., 2007

3.6 RC5

• RC5 如何動作1. 基本原理

© The McGraw-Hill Companies, Inc., 2007

2. 操作原理

© The McGraw-Hill Companies, Inc., 2007

3. 一次性初始運算

© The McGraw-Hill Companies, Inc., 2007

4. 一個回合的細節– 步驟 1 : C 和 D 做 XOR– 步驟 2 : E 做循環式左移– 步驟 3 : E 和下一個子金鑰相加– 步驟 4 : D 和 E 做 XOR– 步驟 5 :循環式左移 G– 步驟 6 : G 和下一個子金鑰相加– 步驟 7 :其餘的工作

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

5. 數學表示式

© The McGraw-Hill Companies, Inc., 2007

6. 子金鑰製造– 步驟 1 :子金鑰產生– 步驟 2 :子金鑰混合

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

3.7 Blowfish

• 根據 Schneier 所述, Blowfish 是用下列的目標設計而成:– 快速– 緊密– 簡單– 安全

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

3.8 高等加密標準• 主要的 AES 特徵如下:

– 對稱性和平行架構– 符合現代處理器– 適合智慧卡

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

© The McGraw-Hill Companies, Inc., 2007

3.9 差分密碼分析和線性密碼分析

• 差分密碼分析專注於成對的密文,其明文有著特殊的差異。

• 基於線性近似值, Mitsuru Matsui 發明線性密碼分析攻擊。

© The McGraw-Hill Companies, Inc., 2007

章節總結• 密碼學演算法有兩個主要的觀點:型態和模式。• 兩個主要的演算法型態是:串流密碼和區塊密碼。• 鏈結模式使區塊密碼更安全。• 四個鏈結模式是:電子碼冊 (ECB) 、密文區塊鏈結 (C

BC) 、密碼回饋 (CFB) 、輸出回饋 (OFB) 。• 資料加密標準 (DES) 是一個非常受歡迎的對稱性金鑰

演算法。• DES 的變化,亦即雙重 DES 和三重 DES 很受歡迎。• 其他受歡迎的對稱性金鑰演算法是: IDEA 、 RC5 、

Blowfish 。• 美國政府已經證明一個演算法,稱為 Rijndael ,就像

高等加密標準 (AES) 一樣。• 差分密碼分析專注於明文中具有特殊差異的密文對。• 線性密碼分析攻擊是基於線性近似的基礎上。