1 00:00:00,000 --> 00:00:04,000 Now, so far we have David, who wants to send a secret message to John. 2 00:00:05,000 --> 00:00:08,000 To do this, John generated a key pair. 3 00:00:08,000 --> 00:00:11,000 John also sent the public key to David. 4 00:00:11,000 --> 00:00:17,000 David has downloaded the public key and imported it into his key ring. 5 00:00:17,000 --> 00:00:23,000 So if we go to David's computer right here, we can see he has John's public key. 6 00:00:23,000 --> 00:00:28,000 So right now, David can encrypt data with John's public key. 7 00:00:28,000 --> 00:00:30,000 Send it to John. 8 00:00:30,000 --> 00:00:37,000 And that way John will be the only person who can decrypt this data because he is the only person that 9 00:00:37,000 --> 00:00:39,000 has his own private key. 10 00:00:39,000 --> 00:00:43,000 Now, you'll also notice an extra entry in here. 11 00:00:43,000 --> 00:00:49,000 I've actually created a key pair for David in this section right here, for the sake of completion. 12 00:00:49,000 --> 00:00:55,000 You don't have to do this because, like I said, all we need is John's public key to send data to John. 13 00:00:55,000 --> 00:01:01,000 And according to the example we're doing, David will be sending data to John. 14 00:01:01,000 --> 00:01:03,000 So all we need is John's public key. 15 00:01:04,000 --> 00:01:10,000 I just created a key pair here for David, just for the sake of completion so that you can see how this 16 00:01:10,000 --> 00:01:12,000 will work in a real life scenario. 17 00:01:13,000 --> 00:01:19,000 So we actually don't need to use this anymore because David already has the public key of John. 18 00:01:19,000 --> 00:01:25,000 So all you have to do is literally start typing the message that you want to send to do this. 19 00:01:25,000 --> 00:01:30,000 I'm just going to open a text editor and I'm just going to start composing the message. 20 00:01:30,000 --> 00:01:33,000 So for this, we're just going to say hello. 21 00:01:33,000 --> 00:01:39,000 This is a secret message sent from David to John. 22 00:01:39,000 --> 00:01:45,000 Now to encrypt this message, we're going to click on the recipients in here to set the person that 23 00:01:45,000 --> 00:01:48,000 we want to encrypt the message to. 24 00:01:48,000 --> 00:01:53,000 So first of all, as you can see, to prove our authority or to sign the message, we're going to be 25 00:01:53,000 --> 00:02:00,000 signing it as David, because we have David's private key and this is David's computer, and then we're 26 00:02:00,000 --> 00:02:04,000 going to encrypt it for myself so that I can actually read the message. 27 00:02:04,000 --> 00:02:08,000 And we're also going to tick this box to encrypt it for others. 28 00:02:08,000 --> 00:02:15,000 And here we're going to put the names or the public keys of the people that we want to share this with. 29 00:02:15,000 --> 00:02:17,000 So we want to send this to John. 30 00:02:17,000 --> 00:02:20,000 And therefore, I'm going to type John. 31 00:02:20,000 --> 00:02:24,000 And as you can see, I'll get his key entry suggested to me in here. 32 00:02:24,000 --> 00:02:27,000 So all I have to do is click this and that's it. 33 00:02:27,000 --> 00:02:33,000 The message is going to be encrypted for him using his public key and for myself using my public key 34 00:02:33,000 --> 00:02:34,000 so I can read it. 35 00:02:34,000 --> 00:02:40,000 And also it's going to be signed using my private key so that John can validate the integrity of the 36 00:02:40,000 --> 00:02:44,000 message and make sure that it is actually written or composed by David. 37 00:02:46,000 --> 00:02:50,000 Now that we're happy with the options, we're simply going to click on sign Encrypt. 38 00:02:50,000 --> 00:02:55,000 And as you can see, it's telling us that the signing and the encryption is successful. 39 00:02:55,000 --> 00:03:02,000 So all we have to do is go back to the notepad in here and we have the encrypted message in here. 40 00:03:02,000 --> 00:03:12,000 So right now you can just copy all of this and send it to John using any method of communication so 41 00:03:12,000 --> 00:03:14,000 you can send it as an instant message. 42 00:03:14,000 --> 00:03:21,000 You can send it in a chat room, you can send it as an email, you can even put it in a pastebin publicly 43 00:03:21,000 --> 00:03:23,000 where anybody can see your secret message. 44 00:03:23,000 --> 00:03:25,000 This is the beauty of PGP. 45 00:03:25,000 --> 00:03:32,000 You can put this anywhere and nobody will be able to see or read the content of this unless they have 46 00:03:32,000 --> 00:03:34,000 the private key of John. 47 00:03:34,000 --> 00:03:40,000 And like I said, if John is using PGP properly and he knows what he's doing, he should never share 48 00:03:40,000 --> 00:03:41,000 his private key. 49 00:03:41,000 --> 00:03:48,000 Therefore, he will be the only person in the world that is able to read the content of this message. 50 00:03:48,000 --> 00:03:55,000 Now, for this example, to make things easy, I'm going to go back to my email client and I'm just 51 00:03:55,000 --> 00:03:57,000 going to reply to this email. 52 00:03:59,000 --> 00:04:02,000 And we'll put our encrypted message in here. 53 00:04:02,000 --> 00:04:06,000 Keep in mind, I'm copying it from the start to the end. 54 00:04:06,000 --> 00:04:09,000 I'm going to click on Send and that's it. 55 00:04:09,000 --> 00:04:10,000 Send to John. 56 00:04:10,000 --> 00:04:13,000 So let's go to John's computer. 57 00:04:13,000 --> 00:04:16,000 We're going to go to his email account. 58 00:04:16,000 --> 00:04:22,000 We're going to refresh the inbox and we're going to click on the message that we just got. 59 00:04:22,000 --> 00:04:26,000 And as you can see, this message is encrypted. 60 00:04:26,000 --> 00:04:27,000 It's gibberish. 61 00:04:27,000 --> 00:04:31,000 We can't really see what David is trying to tell us. 62 00:04:31,000 --> 00:04:35,000 So we're going to right click and copy this message. 63 00:04:35,000 --> 00:04:37,000 We're going to go to Cleopatra. 64 00:04:37,000 --> 00:04:40,000 As you can see right now, we're in John's computer. 65 00:04:40,000 --> 00:04:41,000 John is in bold. 66 00:04:41,000 --> 00:04:47,000 So that means we have the private key for John and therefore, we should be able to decrypt this message. 67 00:04:47,000 --> 00:04:50,000 So we're going to click on the notepad again. 68 00:04:50,000 --> 00:04:52,000 We're going to paste the message. 69 00:04:52,000 --> 00:04:54,000 It's already in our clipboard. 70 00:04:54,000 --> 00:04:59,000 And instead of clicking on Encrypt this time we're going to say Decrypt and verify. 71 00:05:01,000 --> 00:05:06,000 It's going to ask me for the passphrase for John Wick because like I said, this is going to need to 72 00:05:06,000 --> 00:05:09,000 use the private key of John Wick to decrypt the message. 73 00:05:09,000 --> 00:05:14,000 Remember, we had to set a passphrase when we created this key pair, so I'm going to input it. 74 00:05:17,000 --> 00:05:18,000 And perfect. 75 00:05:18,000 --> 00:05:22,000 As you can see, we have the decrypted message right here. 76 00:05:22,000 --> 00:05:26,000 So now in this example, John created the key pair. 77 00:05:26,000 --> 00:05:32,000 He shared his public key with David, and David was the one encrypting the message and sending it back 78 00:05:32,000 --> 00:05:33,000 to John. 79 00:05:33,000 --> 00:05:40,000 Now, if John wants to send something back to David, we just have to do the reverse of the process. 80 00:05:40,000 --> 00:05:46,000 So David will just have to create his own key pair, share the public key with John and then John will 81 00:05:46,000 --> 00:05:53,000 be able to encrypt messages and share them with David and know that David would be the only one able 82 00:05:53,000 --> 00:05:57,000 to read the contents of the messages sent to him.