Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 29th, 2005, 10:43 AM   #1
justdoit
Newbie
 
Join Date: Apr 2005
Posts: 1
Rep Power: 0 justdoit is on a distinguished road
rsa encrption decrption algorithm

Hi,
Can anyone design an encryption decyption algorithm for rsa encrption in c or java language.The algorithm is as follows.

2.1 Algorithms and examples
Key generation
choose two primes, p and q −! p = 17 q = 11 (3)
generate the modulus, n −! n = p ·q = 17 ·11 = 187 (4)
generate r −! r = (p−1)(q−1) = 16 ·10 = 160 (5)
choose a prime as encryption key, (6)
e  r−1,gcd(r,n) = 1 −! e = 7
calculate d −! d = e−1mod r (7)
7−1mod 160 = 23
Encryption
letm = 88 (8)
c = me mod n −! 1237 mod 187 = 11 (9)
Decryption
givenc = 11 (10)
m = cd mod n −! 1123 mod 187 = 88 (11)


Can anyone do this program for me.plzzzzzzzz

thanks in advance.


looking for ur good reply.
justdoit is offline   Reply With Quote
Old Apr 29th, 2005, 10:58 AM   #2
peace_of_mind
Professional Programmer
 
peace_of_mind's Avatar
 
Join Date: Sep 2004
Location: Hell if I know most of the time
Posts: 439
Rep Power: 5 peace_of_mind is on a distinguished road
Send a message via MSN to peace_of_mind Send a message via Yahoo to peace_of_mind
Modify your screenname to: justtryitforcryingoutloud. Then post problems you're having.
__________________
Amateurs built the ark
Professionals built the Titanic

peace_of_mind is offline   Reply With Quote
Old May 4th, 2005, 9:16 AM   #3
mackenga
Professional Programmer
 
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 317
Rep Power: 4 mackenga is on a distinguished road
Yeah, I mean you've practically written it anyway.
mackenga is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:59 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC