1 / 11

RSA

RSA. 學  生: A0933332 張郡芳 指導老師:梁明章 教授. 對稱金鑰系統. 加密與解密都使用同一個金鑰. 非對稱金鑰系統. 金鑰必須是一對,分成公鑰跟私鑰 使用公鑰加密的資料只能用私鑰解密,使用私鑰加密的資料只能用公鑰解密。. RSA. 1976 年被提出概念。 1978 年 Rivest 、 Shamir 與 Adleman (RSA) 提出公開 金 鑰架構。. RSA 原理. 選擇相異大質數 p & q ,得其積 n n = p * q Φ (n) = (p-1)*(q-1)

jacob-gross
Télécharger la présentation

RSA

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. RSA 學  生:A0933332 張郡芳 指導老師:梁明章 教授

  2. 對稱金鑰系統 • 加密與解密都使用同一個金鑰

  3. 非對稱金鑰系統 • 金鑰必須是一對,分成公鑰跟私鑰 • 使用公鑰加密的資料只能用私鑰解密,使用私鑰加密的資料只能用公鑰解密。

  4. RSA • 1976年被提出概念。 • 1978 年 Rivest 、Shamir 與 Adleman (RSA) 提出公開金鑰架構。

  5. RSA原理 • 選擇相異大質數p & q,得其積n • n = p * q • Φ (n) = (p-1)*(q-1) • 隨機選擇加密金鑰e,e需跟Φ (n)互質 • 根據金鑰e,計算出解密金鑰d,d 需滿足下列條件: (e * d) mod (Φ (n)) = 1 • 於是獲得一對金鑰 • 公鑰: (e , n) • 私鑰: (d , n)

  6. RSA加解密 • 把需加密的資訊視為連續的2進位stream「M」 • 將M 以長度k 切分成M1, M2, M3,….., Mi • 2k <= n (n 是金鑰中的n,k 需盡量大) • 加密文Ci = ( Mie ) mod (n) • 解密文Mi = ( Cid ) mod (n)

  7. RSA舉例 • p =11、q =13 • n = p * q =11*13 =143 • Φ (n) = (p-1)*(q-1) =(11-1)*(13-1) = 120 • 選一與120 互質的數e,例如e = 7 • 根據(e * d) mod (Φ(n)) = 1 計算 ( 7 * d ) mod (120) = 1 故d = 103 • 公鑰( 7, 143) • 私鑰(103, 143)

  8. RSA加解密舉例 • 假設Mi = 85 • 密文Ci = Mie % n = 857 % 143 = 123 • 解密Mi = Cid % n = 123103 % 143 = 85

  9. RSA的攻擊 1、 對n 作大質因數分解 質數資料庫 2、選擇密文攻擊 提供偽裝訊息誘使對方以私鑰加密後傳回 (XM)d = Xd *Md % n 解決方法:不以私鑰對來自外面的訊息作加密 3、共用n 的攻擊 C1 = Me1 % n , C2 = Me2 % n r*e1 + s*e2 = 1 (質數性質) m=(C1-1)-r * (C2 -1)-s mod n

  10. RSA的問題 • 產生密鑰很麻煩,受到大質數產生技術的限制,因而難以做到每次都選取不同的p、q • 電腦運算力提升使得n 必須越來越大才能拉長被破解時間,導致p , q 也跟著變大。 • 目前最常見的解決之道是RSA + DES + Hash合併應用。

  11. The End • Thanks for your attention

More Related