![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Professional Programmer
Join Date: Mar 2005
Location: Student of University of Mumbai, Maharashtra State, India
Posts: 344
Rep Power: 4
![]() |
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 |
|
|
|
|
|
#2 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
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. |
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: Mar 2005
Location: Student of University of Mumbai, Maharashtra State, India
Posts: 344
Rep Power: 4
![]() |
Thanks for a descriptive answer.
(Sorry for the incomplete edit of original post. url...didn't realize :-( )
__________________
Visit: http://www.somaiya.edu |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |