Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Diffie–Hellman key exchange
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Secrecy chart === The chart below depicts who knows what, again with non-secret values in {{blue|blue}}, and secret values in '''{{red|red}}'''. Here [[Alice and Bob#Cast of characters|Eve]] is an [[Eavesdropping#Network attacks|eavesdropper]] – she watches what is sent between Alice and Bob, but she does not alter the contents of their communications. * ''<span style="color:blue">g</span>'', public (primitive root) base, known to Alice, Bob, and Eve. ''<span style="color:blue">g</span>'' = <span style="color:blue">5</span> * ''<span style="color:blue">p</span>'', public (prime) modulus, known to Alice, Bob, and Eve. ''<span style="color:blue">p</span>'' = <span style="color:blue">23</span> * '''''<span style="color:red">a</span>''''', Alice's private key, known only to Alice. '''''<span style="color:red">a</span>''''' = '''<span style="color:red">6</span>''' * '''''<span style="color:red">b</span>''''', Bob's private key known only to Bob. '''''<span style="color:red">b</span>''''' = '''<span style="color:red">15</span>''' * ''<span style="color:blue">A</span>'', Alice's public key, known to Alice, Bob, and Eve. ''<span style="color:blue">A</span>'' = ''<span style="color:blue">g</span><sup>'''<span style="color:red">a</span>'''</sup>'' mod ''<span style="color:blue">p</span>'' = <span style="color:blue">8</span> * ''<span style="color:blue">B</span>'', Bob's public key, known to Alice, Bob, and Eve. ''<span style="color:blue">B</span>'' = ''<span style="color:blue">g</span><sup>'''<span style="color:red">b</span>'''</sup>'' mod ''<span style="color:blue">p</span>'' = <span style="color:blue">19</span> {| border="0" cellspacing="0" cellpadding="2" |- | valign="top" | {| class="wikitable" |+ Alice |- style="text-align:center;" ! Known ! Unknown |- | ''<span style="color:blue">p</span>'' = <span style="color:blue">23</span> | |- | ''<span style="color:blue">g</span>'' = <span style="color:blue">5</span> | |- | '''''<span style="color:red">a</span>''''' = '''<span style="color:red">6</span>''' | '''''<span style="color:red">b</span>''''' |- | ''<span style="color:blue">A</span>'' = <span style="color:blue">5</span><sup>'''''<span style="color:red">a</span>'''''</sup> mod <span style="color:blue">23</span> | |- | ''<span style="color:blue">A</span>'' = <span style="color:blue">5</span><sup>'''<span style="color:red">6</span>'''</sup> mod <span style="color:blue">23</span> = <span style="color:blue">8</span> | |- | ''<span style="color:blue">B</span>'' = <span style="color:blue">19</span> | |- | '''''<span style="color:red">s</span>''''' = <span style="color:blue">B</span><sup>'''''<span style="color:red">a</span>'''''</sup> mod <span style="color:blue">23</span> | |- | '''''<span style="color:red">s</span>''''' = <span style="color:blue">19</span><sup>'''<span style="color:red">6</span>'''</sup> mod <span style="color:blue">23</span> = '''<span style="color:red">2</span>''' | |} | valign="top" | {| class="wikitable" |+ Bob |- style="text-align:center;" ! Known ! Unknown |- | ''<span style="color:blue">p</span>'' = <span style="color:blue">23</span> | |- | ''<span style="color:blue">g</span>'' = <span style="color:blue">5</span> | |- | '''''<span style="color:red">b</span>''''' = '''<span style="color:red">15</span>''' | '''''<span style="color:red">a</span>''''' |- | ''<span style="color:blue">B</span>'' = <span style="color:blue">5</span><sup>'''''<span style="color:red">b</span>'''''</sup> mod <span style="color:blue">23</span> | |- | ''<span style="color:blue">B</span>'' = <span style="color:blue">5</span><sup>'''<span style="color:red">15</span>'''</sup> mod <span style="color:blue">23</span> = <span style="color:blue">19</span> | |- | ''<span style="color:blue">A</span>'' = <span style="color:blue">8</span> | |- | '''''<span style="color:red">s</span>''''' = <span style="color:blue">A</span><sup>'''''<span style="color:red">b</span>'''''</sup> mod <span style="color:blue">23</span> | |- | '''''<span style="color:red">s</span>''''' = <span style="color:blue">8</span><sup>'''<span style="color:red">15</span>'''</sup> mod <span style="color:blue">23</span> = '''<span style="color:red">2</span>''' | |} | valign="top" | {| class="wikitable" |+ Eve |- style="text-align:center;" ! Known ! Unknown |- | ''<span style="color:blue">p</span>'' = <span style="color:blue">23</span> | |- | ''<span style="color:blue">g</span>'' = <span style="color:blue">5</span> | |- | | '''''<span style="color:red">a</span>''''', '''''<span style="color:red">b</span>''''' |- | | |- | | |- | ''<span style="color:blue">A</span>'' = <span style="color:blue">8</span>, ''<span style="color:blue">B</span>'' = <span style="color:blue">19</span> | |- | | |- | | '''''<span style="color:red">s</span>''''' |} |} Now '''''<span style="color:red">s</span>''''' is the shared secret key and it is known to both Alice and Bob, but ''not'' to Eve. Note that it is not helpful for Eve to compute ''<span style="color:blue">AB</span>'', which equals ''<span style="color:blue">g</span>''<sup>'''''<span style="color:red">a</span>'''''+'''''<span style="color:red">b</span>'''''</sup> mod <span style="color:blue">p</span>. Note: It should be difficult for Alice to solve for Bob's private key or for Bob to solve for Alice's private key. If it is not difficult for Alice to solve for Bob's private key (or vice versa), then an eavesdropper, [[Alice and Bob#Cast of characters|Eve]], may simply substitute her own private / public key pair, plug Bob's public key into her private key, produce a fake shared secret key, and solve for Bob's private key (and use that to solve for the shared secret key). [[Alice and Bob#Cast of characters|Eve]] may attempt to choose a public / private key pair that will make it easy for her to solve for Bob's private key.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Diffie–Hellman key exchange
(section)
Add topic