当前位置:网站首页>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
边栏推荐
- [cloud native] IVX low code development was introduced into Tencent map and previewed online
- 数据库使用psql及jdbc进行远程连接,不定时自动断开的解决办法
- VIM多行操作
- Coscon'22 city / school / institution producer solicitation order
- Tianyi cloud web application firewall (edge cloud version) supports the detection and interception of Apache spark shell command injection vulnerabilities
- Vector CANoe Menu Plugin拓展入门
- Zhaoqi science and technology innovation overseas high-level talent introduction platform, entrepreneurship event Roadshow
- [training day3] section
- 有一说一,阿里P7的薪资待遇是真的香
- Linux Installation mysql8.0.29 detailed tutorial
猜你喜欢
随机推荐
Several ways to resolve hash conflicts
Click hijacking attack
College personnel management system based on jsp+servlet
Mondriaans's dream (state compression DP)
Analysis of interface testing
Basic select statement
我要开中信的证券账户找渠道的经理开安全吗?
【云原生】 iVX 低代码开发 引入腾讯地图并在线预览
6、 Common commands of ROS (I): rosnode, rostopic, rosmsg
[training Day2] torchbearer
相对路径与绝对路径
AI zhetianchuan ml integrated learning
Vector CANape - How to Send Receive CAN Message in CANape
深度学习实验:Softmax实现手写数字识别
DTS搭载全新自研内核,突破两地三中心架构的关键技术|腾讯云数据库
Common APIs
JS recursive Fibonacci sequence deep cloning
Come on developer! Not only for the 200000 bonus, try the best "building blocks" for a brainstorming!
Heavy! The 2022 China open source development blue book was officially released
# MySQL 七种连接方式图解








