this post was submitted on 28 Apr 2024
1 points (100.0% liked)
Security
5014 readers
1 users here now
Confidentiality Integrity Availability
founded 4 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Great question. Modern encryption schemes are usually composed of a handful of primitives. If we consider something like HTTPS it uses both asymmetric and symmetric parts.
Asymmetric encryption is the "magic" that you are missing. Asymmetric encryption algorithms create a keypair, one half of this is the "public key" which can be used to encrypt messages that can only be decrypted by the "private key". This means that even if the public key is public (as the name suggests) the messages can't be decrypted without the public key.
You can think of this as giving someone an open padlock. They can put something inside a box and lock it using the padlock, but they can't open it without your key.
Using this you could come up with a very simple protocol for establishing a secure channel:
(Note: There are many missing features from this system, but I think it illustrates the point. Don't design your own crypto.)