I have always been interested in cyber security and computers, I am decent with Python. Recently I have really been diving into reading a lot about encryption, which may have been brought more to my attention by Edward Snowden’s *Permanent Record* book*.* I understand the generality of encryption; you have plaintext that goes through some algorithm that uses a key to encrypt it specifically for someone with a matching or not matching key, I know that’s very watered down but that’s the just of what I have read I believe).
A couple questions about that overview:
* How are keys generated between something like Reddit and my laptop? On their server?
* Where are those particular keys held? In my web browser, a file on my computer?
* For public key encryption, how does it encrypt the message and send it to the correct user? Wouldnt it have to know the private key its being sent to in order for the algorithm to be reversed?
I appreciate any answers I get or books/youtube videos reccomended. I would like to try to encrypt a thumb drive or old hard drive I have laying around just for the heck of it, but really want to know the ends and outs of it before I started messing around. Thank you in advanced!