Programming Forums
User Name Password Register
 

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

Reply
 
Thread Tools Display Modes
Old Sep 3rd, 2006, 12:34 PM   #1
java_roshan
Professional Programmer
 
Join Date: Mar 2005
Location: Student of University of Mumbai, Maharashtra State, India
Posts: 344
Rep Power: 4 java_roshan is on a distinguished road
Public Key Cryptography: private key?

Hello All,

Was reading about Public Key Cryptography and Digital Signatures. Digital signatures are usually an
encrypted extract of the encryption algorithm applied to the HASH value of the message digest.
Now, the encryption algorithm is used with a private key of the sender. My question is where does
this private key come from?
1. Is it generated at the user end and relates to the public key (of computer/user)?
2. Is it disributed by [url=http://en.wikipedia.org/wiki/Key_server_%28cryptographic%29]Key Server
3. Is it given by Certificate Authority?
__________________
Visit: http://www.somaiya.edu
java_roshan is offline   Reply With Quote
Old Sep 3rd, 2006, 2:54 PM   #2
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
The first one. The user generates a private and public key pair. The public key can be given out to anyone, whilst the private key should be kept secret at all times.

One can upload a public key to a key server, so that people can more easily find your public key. Think of it as a cryptographic directory relating usernames and email addresses to public keys.

Certificate Authorities sign certificates (which are public keys plus some metadata). This is to prove that your certificate is trustworthy to a user. A user may not trust your certificate on its own, but they may trust Verisign. Thus, if your certificate is signed by Verisign, the user can take that as a stamp of trust that you are genuine.

It took me a while to grasp the difference between public and private keys. I like to think of them as providing two functions, f and g. The function f is the inverse of g, and vice versa, so that f(g(x)) = x and g(f(x)) = x. A file encrypted by f can be decrypted by g, and a file encrypted by g can be decrypted by f.

The private key contains information from which we can construct both f and g. The public key only contains f. Thus, if we want to encrypt a message m, we can use f(m), meaning that both the public and private key can encrypt messages. But only the privet key can decrypt this message, using g(f(m)).

Signing works the opposite way around. A message is signed by taking its hash, h(m), and passing this through g: g(h(m)). Note that since only the private key has g, only the private key can sign a message. Once signed, the public key can then decrypt this signature using f, and then can compare it to h(m). If f(g(h(m))) = h(m), then the message signature is valid.
Arevos is offline   Reply With Quote
Old Sep 4th, 2006, 11:33 PM   #3
java_roshan
Professional Programmer
 
Join Date: Mar 2005
Location: Student of University of Mumbai, Maharashtra State, India
Posts: 344
Rep Power: 4 java_roshan is on a distinguished road
Thanks for a descriptive answer.

(Sorry for the incomplete edit of original post. url...didn't realize :-( )
__________________
Visit: http://www.somaiya.edu
java_roshan 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Associated with Vector Source code buggytoast Java 3 Apr 2nd, 2006 6:41 AM
Array issues :( Alo Tsum Java 10 Nov 26th, 2005 6:45 PM
Run-time problem jch02140 Java 2 Aug 9th, 2005 3:34 AM
function solomon_13000 Java 6 Apr 3rd, 2005 12:42 AM
Searching a collection ellomoto Java 1 Feb 24th, 2005 1:05 AM




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

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