Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save travishen/773419ac1b85dcd7a8015d441dc72c2f to your computer and use it in GitHub Desktop.

Select an option

Save travishen/773419ac1b85dcd7a8015d441dc72c2f to your computer and use it in GitHub Desktop.
迪菲-黑爾曼-墨克鑰匙交換方案 Diffie-Hellman-Merkle key exchange scheme
愛麗絲 巴伯
步驟 1 愛麗絲挑選一個祕密數字,例如3,我們把這個數字標示為 A 巴伯挑選一個祕密數字,例如 6,我們把這個數字標示為 B
步驟 2 愛麗絲把 3 套進這個單向函數,演算7^A(mod 11)結果為 2 巴伯把 6 套進這個單向函數,演算7^B(mod 11)結果為 4
步驟 3 愛麗絲把這個函數值 2 稱為 α 傳送給巴伯 巴伯把這個函數值 4 稱為 β 傳給愛麗絲
步驟 4 愛麗絲用巴伯求出的函數值來演算β^A(mod 11)的結果為 9 巴伯用愛麗絲所求出的函數值來演算α^B(mod 11)的結果為 9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment