当前位置:网站首页>8.1 Diffie Hellman key exchange
8.1 Diffie Hellman key exchange
2022-07-26 18:05:00 【Grilled little fat sheep with charcoal...】
Diffie-Hellman key exchange (DHKE) The scheme provides a solution to the key distribution problem in practice , That is, it allows both sides to communicate through insecure channels , Get a common key .DHKE The basic idea is , Z p ∗ Z^*_p Zp∗ Exponential operation in (p Prime number ) It's a one-way function , And the exponential operation is commutative , namely : k = ( a x ) y = ≡ ( a y ) x m o d p k = (a^x)^y =\equiv (a^y)^x mod p k=(ax)y=≡(ay)xmodp
value k = ( a x ) y = ≡ ( a y ) x m o d p k = (a^x)^y =\equiv (a^y)^x mod p k=(ax)y=≡(ay)xmodp Is a joint key , It can be used as the session key of both communication parties .
Diffie-Hellman Key exchange protocol in Z p ∗ Z^*_p Zp∗ How it works
This agreement has two parties ,Alice and Bob, They will set up a shared key . There may be a trusted third party , This party can properly select the public parameters required for key exchange . However ,Alice or Bob It is also possible to generate public parameters . Strictly speaking ,DHKE The agreement consists of two agreements : Handshake agreement and main agreement ; The main protocol is responsible for the real key exchange .
Diffie-Hellman handshake protocol
- Choose a large prime number p p p.
- Choose an integer α ∈ { 2 , 3 , 4 , . . . . , p − 2 } \alpha \in \{2, 3, 4, ...., p-2\} α∈{ 2,3,4,....,p−2}.
- Open p p p and α \alpha α
Diffie-Hellman key exchange 
Let's prove the correctness of the agreement , namely Alice and Bob In fact, the same session key is calculated k A B k_{AB} kAB
prove : Alice Calculation B α ≡ ( α b ) a ≡ α a b m o d p B^\alpha \equiv ({\alpha}^b)^a \equiv {\alpha}^{ab} mod p Bα≡(αb)a≡αabmodp
and Bob Calculation A b ≡ ( α a ) b ≡ α a b m o d p A^b \equiv ({\alpha}^a)^b \equiv {\alpha}^{ab} mod p Ab≡(αa)b≡αabmodp
therefore Alice and Bob Share the session key k A B = α a b m o d p k_{AB} = {\alpha}^{ab} mod p kAB=αabmodp. This key can be used in Alice and Bob Establish a secure communication between , For example, will k A B k_{AB} kAB Used as similar AES or 3DES Key of equal symmetry algorithm .
Example :Diffie-Hellman The domain parameter of is p = 29 , α = 2 p = 29, α =2 p=29,α=2. The process of this agreement is as follows :
The value calculated by both parties is k A B = 16 k_{AB} = 16 kAB=16, This value can be used as a union key , For example, as the session key in symmetric encryption .
Reference material :《 In simple terms, cryptography 》–Christof Paar,Jan Pelzl Writing
边栏推荐
- Spark unified memory partition
- quartz触发器规则
- 【Unity3D】摇杆
- 6、 Common commands of ROS (I): rosnode, rostopic, rosmsg
- Performance tuning bugs emerge in endlessly? These three documents can easily handle JVM tuning
- Come on developer! Not only for the 200000 bonus, try the best "building blocks" for a brainstorming!
- Laozi cloud and Fuxin Kunpeng achieved a major breakthrough in 3D ofd 3D format documents for the first time
- 【集训Day1】 Dwarves line up
- LeetCode50天刷题计划(Day 5—— 最长回文子串 10.50-13:00)
- [static code quality analysis tool] Shanghai daoning brings you sonarource/sonarqube download, trial and tutorial
猜你喜欢
随机推荐
天翼云Web应用防火墙(边缘云版)支持检测和拦截Apache Spark shell命令注入漏洞
Detailed explanation of openwrt's feeds.conf.default
AI遮天传 DL-回归与分类
[training Day1] spy dispatch
【集训Day3】section
drools-基础语法
College personnel management system based on jsp+servlet
2022 Henan Mengxin League game (3): Henan University
10、 Implementation of parameter modification of parameter server
“蔚来杯“2022牛客暑期多校训练营3记录
Come on developer! Not only for the 200000 bonus, try the best "building blocks" for a brainstorming!
7月30号PMP考试延期后我们应该做什么?
Spark数据格式UnsafeRow
Basic select statement
VIM多行操作
浅析接口测试
The user experience center of Analysys Qianfan bank was established to help upgrade the user experience of the banking industry
How to switch nodejs versions at will?
带你熟悉云网络的“电话簿”:DNS
.Net CLR GC 动态加载短暂堆阈值的计算及阈值超量的计算








![[training Day2] sculpture](/img/d9/2e2ee8b4d995a29204afba889da635.png)
