Asymmetric encryption – Simply explained

Encryption is the process of taking a message
and scrambling it’s contents so that only certain people can look at your message. There are two types of encryption: symmetric
and asymmetric encryption. Let’s first take a look at symmetric encryption
to understand why asymmetric encryption was created. To do that, let me introduce you to Alice
and Bob. Alice has a sensitive document that she wants
to share with Bob. She uses an encryption program to protect
her document with a password or passphrase that she chooses. She then sends the encrypted document to Bob. However, Bob cannot open this message because
he doesn’t know the passphrase that Alice used to encrypt the document. In other words: he doesn’t have the key to
open the lock. Now comes a real problem: how does Alice share
this passphrase securely with Bob? Sending it through email is risky because
others might find the passphrase and use it to decrypt any messages between Alice and
Bob. This is exactly the kind of problem that asymmetric
encryption intends to solve. It’s compareable to a mailbox on the street. The mailbox is exposed to anyone who knows
its location. We can say that the location of the mailbox
is completely public. Anyone who knows the address can go to the
mailbox and drop in a letter. However, only the owner of the mailbox has
a key to open it up and read the messages. Let’s go back to technical details. When using asymmetric encryption, both Alice
and Bob have to generate a keypair on their computers. A popular and secure way for doing this is
by using the RSA algorithm. This algorithm will generate a public and
private key that are mathematically linked to each other. Public keys can be used to encrypt data and
only the matching private key can be used to decrypt it. Even though the keys are linked together they
cannot be derrived from each other. In other words: if you know someone’s public
key, you cannot derrive his private key. If we retake our mailbox example then the
mailbox’s address would be the public key something that everyone is allowed to know. The owner of the mailbox is the only one who
has the private key and that is needed to open up the mailbox. Let’s now take a look at how Alice and Bob
can use asymmetric encryption to communicate securely with each other. They start by exchanging their public keys. Bob gives his public key to Alice and Alice
gives her public key to Bob. Now Alice can send her sensitive document
again. She takes the document and encrypts it with
Bob’s public key. She then sends the file to Bob, who uses his
private key to unlock the document and read it. Because they use asymmetric encryption, only
Bob is able to decrypt the message. Not even Alice can decrypt it because she
doesn’t have Bob’s private key. The strength and security of the asymmetric
encryption now relies on Alice and Bob to keep their private keys well protected. If an attacker steals Alice’s private key,
it can be used to decrypt all messages that are intended for Alice. However, the attacker cannot decrypt messages
that where sent by Alice because that requires Bob’s private key. Asymmetric encryption is used in a lot of
places where security really matters. You might not be aware of it, but everytime
you visit a secure website via HTTPS, you’re actually using asymmetric encryption. It’s also being used to securily send emails
with the PGP protocol. And one last example: Bitcoin also uses asymmetric
encryption to make sure that only the owner of a money wallet can withdraw or transfer
money from it. So now you know how asymmetric encryption
works and what the differences are between asymmetric and symetric encryption. If you liked this video, consider supporting
me by sharing it and subscribing to my YouTube channel and as always: thank you very much
for watching!

100 thoughts on “Asymmetric encryption – Simply explained”

  1. The only non flawed encryption key would be something that cannot be duplicated a private key can be duplicated or hacked
    The best encryption would be based on time because you cant hack time or duplicate it

  2. It used to be super complicated for me but even watching this awesome video up to 02:16 helped me understand how public/private keys work in general and now it makes TOTAL sense. THANKS!

  3. I'm confused…. Please help! ( if you know it in detail )
    Session key is the one that is the secret key. Once it has been encrypted using the public key of the receiver, the sender will send the encrypted session key. So when the receiver receives it, he uses his private key to decrypt the session key. (which is the secret key)
    So next time the data is transfered, will the session key be used for both encryption and decryption? Since the same key is used to encrypt and to decrypt.

  4. clearly & beautifully explained. From a long -long time, I was highly confused why 2 keys in asymmetric encryption…never been able to understand…but your explanation made it clear completely. Tons of thanks to you 🙂

  5. Can you make one that explains Cast-128(Cast5) and the use in PGP? Maybe an explanation video on how the encryption and decryption are used.
    Great video! Wish there were more channels like this.

  6. Question: Can you manually create your own private & public key or is that something that only an automated process can achieve? In other words, can you generate a random set of numbers and say here is my public key, then generate another random set of numbers and say here is my private key that unlocks the public.

  7. How do Bob and Alice exchange their private keys in public key encryption? Wouldn't they run in to the same problem as private key encryption?

  8. You’ve got my sub! Thanks for the video, as I’ve been trying to understand this for quite a while, and no one else has been able to explain it to me. Simply put, Alice is encrypting the file in a way that only Bob can understand, and vice versa.

  9. One of worst names is "public key" .. wtf? Why it's called key? It's more like "public opened trezor" .. once u put something in and close it, it can be opened only by it's owner with his private key …

  10. But someone can use Alice's public key to send to message to Bob and pretend to be Alice, how is this problem solved?

  11. I feel like the explanations are a bit over simplified, so here's my take on it.

    There are 4 items: the document, a box, a lock, and a key.

    The box is the encryption algorithm that uses the lock to encrypt the document and create the decryption algorithm.

    The lock and key are the public and private keys. I call them the lock and key because of how they're used.

    You have your sensitive document that needs to be sent, and your friend sends the box and key. The box is something that everyone can get and probably didn't need to be sent since you might already have one, but the lock is specific to your friend.
    You put your document in the box, lock it, and send it for them to unlock it.

    Bam, I just summarized this in a way the included the actual algorithm and doesn't use the phrase "public key."

  12. 2:53

    Sorry if my question sounds dumb, but if Alice encrypts the sensitive document with Bob's public key, can't others just use Bob's public key to decrypt it since its the same key used to encrypt it?

  13. @2:09 "they (public and private keys) cannot be derived from each other" I think this is incorrect, because the public key is derived from the private key but you cannot derive the private key from the public key. This makes the one-way function definition.

  14. I have a doubt. If you can encrypt a message with a can also decrypt it with that key. Why it is not possible here? Public key and private key are two different keys. 2 different key produce 2 different Outputs right?

  15. Man you explained it in so much simple manner. I don't even need to note it anywhere. It was like a story that's in my head. Thanks a lot sir.

  16. Digital signatures are reverse of this asymmetric encryption explanation. Sign your message with your private key -> receiver decrypts it with your public key. (Proves authenticity, disregards confidentiality)

  17. This is all cool, of course, but what about the MITM attack?
    I mean the following case:
    The stage when Bob and Alice exchange public keys, the hacker intervenes and picks up their keys; generates two pairs of public and private keys; then he replaces the public keys of Bob and Alice with his own public keys, too, he keeps in his memory.
    Thus, he has full control over their correspondence! Moreover, he can change the messages by signing them with real public keys and Bob and Alice will not even guess about it.
    How can I protect my system from this?

  18. Not using a "key" altogether is even better. Any key of either computer is subject to hacking. The software that generates the keys are hackable as well. That's why I use enigmato thank you very much :o)

Leave a Reply

Your email address will not be published. Required fields are marked *