From 734698e262361933cf7e3ac4d4cce62a9c7788d5 Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Tue, 24 Sep 2019 10:06:00 -0700 Subject: [PATCH] cleaned up language so its actually readable --- 312/notes/public.md | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/312/notes/public.md b/312/notes/public.md index 1457af3..ba5c696 100644 --- a/312/notes/public.md +++ b/312/notes/public.md @@ -6,11 +6,33 @@ Think of a box that we put things inside of:(put simply) * Private key: can open the box * Public key: can lock the box -Caveats: +The idea works on the principle that public keys are public so anyone can lock a message down but only the owner/creator of that public key can open those locked messages with their private key. -Public keys contain a unique signature, which can be used to _sign_ a message. Even though everyone can open the message they also know who locked the box. +## Public Keys -Imagine then, lock the box with private key(secure) and sign it with the public key(authorized). +Can be used to open something if it was locked with a private key. +## Private Keys +If used to lock something the public key can be used to then open the box. +_The catch_: that message is also signed so we know exactly who the message is coming from. + +## Both together + +> Message => Lock(message, private key) + +_Sign_ the message + +> Signed Message => Lock(signed message, public key) + +Lock the message like normal + +Once the intended person has the package they: + +* Open it with their private key +* Check the signature +* Find the public key for that signature +* Open the remaining layer with the public key + +That last part only works because locking with a private key allows the public key to open the box afterwards.