|
PowerBASIC Forums
![]() Source Code
![]() Simple example of Diffie-Hellman-Merkle secure key exchange
|
| next newest topic | next oldest topic |
| Author | Topic: Simple example of Diffie-Hellman-Merkle secure key exchange |
|
Wayne Diamond Member |
'This Powerbasic program is based on an example from a book called 'THE CODE BOOK, by Simon Singh. I got my copy at Amazon, and I 'recommend you get your copy now! It's the single most enjoyable 'book I've read in 2001/2002. It combines amazing stories of the 'history of cryptography (the codemakers) and cryptanalysis '(the codebreakers) with amazing algorithms and is a must read 'for anyone who has even the slightest fascination with ciphers! :-) 'ported to PB from textual descriptions by Wayne Diamond, January 2002 #COMPILE EXE For obvious reasons this demo uses small numbers. When implementing such a key exchange, all numbers should be made extremely high so that brute-force isn't viable Enjoy!
[This message has been edited by Wayne Diamond (edited January 21, 2002).] IP: Logged |
|
Wayne Diamond Member |
[This message has been edited by Wayne Diamond (edited January 21, 2002).] IP: Logged |
|
Eddy Van Esch Member |
Wayne, I rewrote your code a little bit. I don't think the double MOD operation is necessary. Don't think the second MOD does anything, from a mathematical point of view. Verify it with your calculator... I wrote this, using an internet document explaining Diffie-Hellman. BTW Bob and Alice are still there... ![]() All it needs now is large integers.... Working on it...
Kind regards Eddy
[This message has been edited by Eddy Van Esch (edited March 20, 2002).] IP: Logged |
All times are EasternTime (US) | next newest topic | next oldest topic |
![]() |
|
Copyright © 1999-2005 PowerBASIC, Inc. All Rights Reserved.