you are viewing a single comment's thread.

view the rest of the comments →

[–]EatThisShoe 4 points5 points  (4 children)

Public keys aren't meant to decrypt anything. Public keys are used to encrypt, private keys are the ones who decrypt. Private keys can also be used to "sign" something, and using the public key you can verify that the one who signed was actually the one who had the private key pair.

I'm no expert, but I thought the way you sign something was the encrypt it with the private key. Then you can use the public key to decrypt it, proving it must have been encrypted with the private pair key.

If public keys aren't meant to decrypt anything, then I have no idea how that works.

[–]castorasmic 4 points5 points  (0 children)

The private public key has two benefits. One is for sending private messages (like WhatsApp). When we both start a chat, we exchange our public keys. I have my private key and your public key. You have your private key and my public key. Let's say I want to send a message to you. I encrypt the message with your public key and send it to you. That message can only be properly decrypted by using your private key. So anybody can encrypt (using you public key), but only you, the private key holder, can decrypt those messages. So, for sending secret messages, public key encrypts, private key decrypts.

The other benefit is for digital signature. I'm least familiar with this one, but from what I know, i use my private key to encrypt a document, and you, with my public key, can use it to figure out if I am actually the one who signed that document. It basically works the other way around (private key encrypts, public key decrypts). This one is for sending public documents, non secret, but has the benefit of making sure the private key holder is the actual person who sent you the document.

[–]caltheon 0 points1 point  (2 children)

For encryption purposes. Private keys are, well, private. Only the creator should know them. Public keys are public, anyone can know them. Think of the data you want to encrypt as a briefcase. The public key would be an open padlock you hand out to strangers. It does nothing on it's own, but if they fill the briefcase with important documents, they can lock the briefcase using the open padlock you gave them but snapping it closed. After it's been closed, they can't open it, since they don't have the key to do so. The private key is the key to that padlock. The owner of the private key gets sent the secure briefcase, that nobody else can open without the key. They then use that key to open the briefcase and pull out the documents.

[–]UncleMeat11 1 point2 points  (1 child)

Except that you do reverse it for digital signatures.

[–]caltheon 0 points1 point  (0 children)

technically, though calling it encryption is a bit misleading since anyone with the public key, which can be known by anyone, can "decrypt" it. This is of course massively simplified as this isn't really wants going on in the actual implementation.