|
Posted by Erich Kohl on November 2, 2006, 6:32 pm
If you were Registered and logged in, you could reply and use other advanced thread options wrote:
>
>Erich Kohl wrote:
>>
>> My understanding is that public keys and private keys are inverse
>> functions of one another; that is, only a person's public key can
>> "undo" (decrypt) a message that was encrypted by their original
>> private key.
>
>As pointed out, they are inverse in that one undoes the other. But Todd
>H. is incorrect in saying that the public key recovers the plaintext
>from the ciphertext. It's actually the opposite. The plaintext is
>encrypted with the public key, and the private key is used to recover
>the plaintext from the ciphertext.
>
>Think about it this way, if I encrypted a secret message with my
>private key, and the public key was used to decrypt it, anyone would be
>able to decrypt my message, since everyone has my public key.
>
Makes sense.
>This is actually a useful property though, and it's how we do digital
>signatures. But you should distinguish between encryption and signing.
>The operations are reverse of eachother.
>
>> Okay, so the private key is kept secret. But the thing is, since the
>> keys are related to each other in the sense that they are
>> mathematically "inverse functions" of one another, can't somebody
>> figure out what a person's or institutions's private key is simply by
>> reverse engineering the public key? By figuring out what the inverse
>> of the public key is?
>> Is it just that it would take such an incredibly long time to do, that
>> it would be a pointless waste of effort? Or is it the purpose of a
>> digital certificate to prevent that from happening? Is there a
>> mathematical reason?
>
>
>Yes, there we is a well defined relationship between the two. In the
>case of RSA, you take two really big prime numbers and multiply them
>together. The primes are your private key (technically the primes are
>used to find the private key, but it suffices in this discussion to say
>they are the private key), and the product of those primes are your
>public key.
>
>So, generate two huge primes, p and q. Your public key is p*q. The
>reason this is secure is because if I give you p*q (public), it's very
>very very difficult to find what p and q is. You need p and q for the
>private key. Thats why it can't be reversed. It is tied to the
>difficulty of factoring.
>
>
>> I appreciate any explanation that can be given.
>
>Just to clarify a point, here is how encryption and signing works:
>
>If you want to send me an encrypted message, you would use my public
>key and encrypt the message. My private key decrypts it.
>
>If you want to sign a message, you "encrypt" it with your private key.
>The public key is used to "decrypt" this message. Anyone who has your
>public key can "decrypt" it and verify the signature. The reason this
>works is because only you have access to your private key, so only you
>can "encrypt" with the private key.
>
>-Matt
Ah, of course! And you *know* that the message came from a fraudulent
source if your private key couldn't unlock the ciphered data because
of its direct relationship to the *public* key. If the private key
doesn't work on it, the message wasn't encrypted with the proper
corresponding PUBLIC key. And ONLY YOU can decrypt messages meant for
YOU, because your private key is, well, private. ;-)
Am I understanding this correctly? I think I am.
But here's another question . . . who hands out these keys? Where are
they stored? Is it the job of things like VeriSign to do that?
Thanks to everyone for your help.
|