Forums: » Register « |  Free Tools |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |

New Free Tools on Dev Shed!

#1
June 16th, 2012, 10:05 AM
 Achilles91
Registered User

Join Date: Jun 2012
Posts: 2
Time spent in forums: 22 m 20 sec
Reputation Power: 0
Crypto Algorithm Question - Why use prime and primitive root in Diffie-Hellman Algorithm

p = prime number , q = primitive root of p

user A and B share : q and p
user A and B generate a secret key : i and j
user A and B use "q^i/j mod p" to generate exchange key : Xa and Xb
user A and B exchange key and generate session key.

Problem :
1. Why use prime number and primitive root rather than 2 random number
2. Possible information get by hacker is q, p, Xa and Xb
hacker use brute force attack on Xa^n mod p , the hacker is trying to find out value i or j by keep try
for (n=1;;n+1), so the hacker will get the session key easily if the i and j value is low
SO, what is the minimum value for i and j

#2
June 16th, 2012, 11:38 PM
 OmegaZero
Contributing User

Join Date: May 2007
Posts: 756
Time spent in forums: 3 Weeks 6 Days 8 h 21 m 49 sec
Reputation Power: 928
Re 1, Try it. Take values of p and q which are a prime and primitive root (say 11 and 2), and ones that are neither (say 12 and 2). Compute the value of Xa for each possible value of a.

Or if you have a grounding in abstract algebra, it may help you to know that the value you're calling "q" is often called "g" for "generator" (with the same meaning as in group theory).

Re 2, How secure do you want it--i.e. what is the least amount of time it can take for an attacker to succeed that's acceptable. Once you have that determine how large of a value you need so that the average (+whatever additional safety factor you desire) number of computations needed to solve it takes at least that length of time.

Note that Diffie-Hellman is typically used with numbers hundreds (if not thousands) of bits in length. Even if you were capable of computing the exponent-modulus operation in one nanosecond, it would take about 15 years just to break a 50-bit Diffie-Hellman by the brute force method you describe. Look up the discrete logarithm problem for more effective approaches.
__________________
sub{*{\$::{\$_}}{CODE}==\$_[0]&& print for(%:: )}->(\&Meh);

#3
June 17th, 2012, 09:10 AM
 Achilles91
Registered User

Join Date: Jun 2012
Posts: 2
Time spent in forums: 22 m 20 sec
Reputation Power: 0

Thanks for your explanation , appreciate

 Viewing: Dev Shed Forums > System Administration > Security and Cryptography > Crypto Algorithm Question - Why use prime and primitive root in Diffie-Hellman Algorithm

## Developer Shed Advertisers and Affiliates

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts vB code is On Smilies are On [IMG] code is On HTML code is Off
 View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox Forum Jump Please select one User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home -------------------- Programming Languages    PHP Development        PHP FAQs and Stickies    Perl Programming        Perl FAQs and Stickies    C Programming        C Programming FAQs and Stickies    Java Help        Java FAQs    Python Programming        Python Programming FAQs    Ruby Programming        Ruby Programming FAQs    Game Development        Game Development FAQs Programming Languages - More    ASP Programming        ASP Programming FAQs    .Net Development        .Net Development FAQs    Visual Basic Programming        Visual Basic Programming FAQs    Software Design        Software Design FAQs    ColdFusion Development        ColdFusion Development FAQs    Delphi Programming        Delphi Programming FAQs    Regex Programming        Regex Programming FAQs    XML Programming        XML Programming FAQs    Other Programming Languages        Other Programming Languages FAQs Web Design    HTML Programming        HTML Programming FAQs    JavaScript Development        JavaScript Development FAQs    CSS Help        CSS Help FAQs    Flash Help        Flash Help FAQs    Photoshop Help        Photoshop Help FAQs    Web Design Help        Web Design Help FAQs    Website Critiques        Website Critiques FAQs    Search Engine Optimization        Search Engine Optimization FAQs Mobile Programming    Mobile Programming        Mobile Programming FAQs    iPhone SDK Development        iPhone SDK Development FAQs    Android Development        Android Development FAQs    BlackBerry Development        BlackBerry Development FAQs Web Site Management    Business Help        Business Help FAQs    Development Software        Development Software FAQs    Scripts        Scripts FAQs Databases    Database Management        Database Management FAQs    DB2 Development        DB2 Development FAQs    MySQL Help        MySQL Help FAQs    PostgreSQL Help        PostgreSQL Help FAQs    Firebird SQL Development        Firebird SQL Development FAQs    MS SQL Development        MS SQL Development FAQs    Oracle Development        Oracle Development FAQs    LDAP Programming        LDAP Programming FAQs System Administration    Mail Server Help        Mail Server Help FAQs    Apache Development        Apache Development FAQs    Security and Cryptography        Security and Cryptography FAQs    Antivirus Protection        Antivirus Protection FAQs    DNS        DNS FAQs    IIS        IIS FAQs    Networking Help        Networking Help FAQs    FTP Help        FTP Help FAQs Operating Systems    BSD Help        BSD Help FAQs    Linux Help        Linux Help FAQs    UNIX Help        UNIX Help FAQs    Windows Help        Windows Help FAQs    Mac Help        Mac Help FAQs Web Hosting    Web Hosting        Web Hosting FAQs    Free Web Hosting        Free Web Hosting FAQs    Web Hosting Requests        Web Hosting Requests FAQs    Web Hosting Offers        Web Hosting Offers FAQs Computer Hardware    Computer Hardware    CPUs        CPUs FAQs    Cooling        Cooling FAQs    Embedded Programming        Embedded Programming FAQs    Motherboards        Motherboards FAQs    Multimedia Hardware        Multimedia Hardware FAQs Other    Dev Shed Lounge        Dev Shed Lounge FAQs    Development Articles        Development Articles FAQs    Beginner Programming        Beginner Programming FAQs    Hire A Programmer        Hire A Programmer FAQs    Project Help Wanted        Project Help Wanted FAQs Latest News Updated Hourly    Technology News    Business News    Science News Forum Information    Forum Rules/Guidelines        Forum Rules/Guidelines FAQs    Forum Announcements        Forum Announcements FAQs    Dev Shed Gaming Center        Go to the Dev Shed Battle Arena        Go to the Dev Shed Arcade Games        Go to the Legend of the Green Dragon    Suggestions & Feedback        Suggestions & Feedback FAQs

 Forums: » Register « |  Free Tools |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |