Raymii.org
Quis custodiet ipsos custodes?Home | About | All pages | Cluster Status | RSS Feed
Diffie Hellman Key Exchange Dutch Notes and Example
Published: 28-07-2013 | Author: Remy van Elst | Text only version of this article
❗ This post is over eleven years old. It may no longer be up to date. Opinions may have changed.
This is a Dutch article on a Diffie Hellman Key Exchange, including an example. I wrote this to better understand the Diffie Hellman Key Exchange.
Recently I removed all Google Ads from this site due to their invasive tracking, as well as Google Analytics. Please, if you found this content useful, consider a small donation using any of the options below:
I'm developing an open source monitoring app called Leaf Node Monitoring, for windows, linux & android. Go check it out!
Consider sponsoring me on Github. It means the world to me if you show your appreciation and you'll help pay the server costs.
You can also sponsor me by getting a Digital Ocean VPS. With this referral link you'll get $200 credit for 60 days. Spend $25 after your credit expires and I'll get $25!
Notities Diffie Hellman Key Exchange
Alice & Bob kiezen een priemgetal P en een getal N. Deze zijn publiek.
Alice kiest een getal A (Prive)
Bob kiest een getal B (Prive)
A & B delen geen factoren met P.
Alice berekent J = N^A (modulo P)
Bob berekent K = N^B (modulo P)
Alice stuurt J naar Bob (Publiek)
Bob stuurt K naar Alice (Publiek)
Alice berekent K^A (modulo P)
Bob berekent J^B (modulo P)
Deze 2 getallen zijn hetzelfde en kunnen worden gebruikt als sleutel of om een symmetrische sleutel te versleutelen.
Voorbeeld:
P = 127
N = 23
A = 34
B = 16
J = N^A (mod P)
23^34 = 19895113660064588580108197261066338165074766609
19895113660064588580108197261066338165074766609 (mod 127) = 115
J = 115
K = N^B (mod P)
23^16 = 6132610415680998648961
6132610415680998648961 (mod 127) = 31
K = 31
Geheim A = K^A (mod P)
31^34 = 508507766528375922442969666478706045897328683433921
508507766528375922442969666478706045897328683433921 (mod 127) = 120
Geheim A = 120
Geheim B = J^B (mod P)
115^16 = 935762087353668006738433837890625
935762087353668006738433837890625 (mod 127) = 120
Geheim B = 120
Geheim A == Geheim B
Tags: articles , diffie-hellman , dutch , key-exchange , math , ssl