1 00:00:00,000 --> 00:00:07,000 Now that we have our key pair generated, the next step is to share our public key with the people that 2 00:00:07,000 --> 00:00:15,000 we want to receive encrypted messages from so that they can encrypt messages using our public key so 3 00:00:15,000 --> 00:00:22,000 that we will be the only people that can decrypt these messages because we have the private key. 4 00:00:22,000 --> 00:00:26,000 So in order to do this, you need to go to Cleopatra. 5 00:00:27,000 --> 00:00:33,000 As you can see, I have it already opened and I already selected my key pair, which I created in the 6 00:00:33,000 --> 00:00:34,000 previous lecture. 7 00:00:34,000 --> 00:00:37,000 Now in order to export the public key. 8 00:00:37,000 --> 00:00:41,000 Now, keep in mind, we're exporting the public key, not the private key. 9 00:00:41,000 --> 00:00:44,000 We never share the private key. 10 00:00:44,000 --> 00:00:46,000 Hence the name Private key. 11 00:00:46,000 --> 00:00:48,000 So we're going to go to file. 12 00:00:48,000 --> 00:00:55,000 We're going to click on export and you need to select the location where you want to store your public 13 00:00:55,000 --> 00:00:56,000 key in. 14 00:00:56,000 --> 00:01:02,000 Now I'm going to select my Tor browser directory because I want to share this through email. 15 00:01:02,000 --> 00:01:04,000 So I want to add it as an attachment. 16 00:01:04,000 --> 00:01:09,000 And as we know, the Tor browser can only access the Tor browser directory in tales. 17 00:01:09,000 --> 00:01:14,000 That's why I selected this directory, but you can store it anywhere you want. 18 00:01:15,000 --> 00:01:18,000 I'm also going to set the name to John Wick. 19 00:01:18,000 --> 00:01:24,000 This is not that important, but I'm just doing it so that the name is representative of the key. 20 00:01:24,000 --> 00:01:27,000 So it's easier for me to find and track in the future. 21 00:01:27,000 --> 00:01:29,000 And I'm going to click on Save to Save it. 22 00:01:30,000 --> 00:01:32,000 So if I go to my home directory. 23 00:01:33,000 --> 00:01:35,000 And go to Tor browser. 24 00:01:36,000 --> 00:01:44,000 You can see we have a file called John Wick Dot ASC and this is my public key that I can share with 25 00:01:44,000 --> 00:01:48,000 anybody so that they can encrypt data and send it to me. 26 00:01:48,000 --> 00:01:52,000 Now you can literally attach this file the way it is. 27 00:01:52,000 --> 00:01:57,000 You can upload it to a file sharing service like I showed you or use Onionshare. 28 00:01:57,000 --> 00:02:03,000 You can use any method of sharing this file if you don't want to share it as a file, you can also right 29 00:02:03,000 --> 00:02:12,000 click it select Open with other application select View all applications and select your text editor 30 00:02:12,000 --> 00:02:14,000 to open it with a text editor. 31 00:02:14,000 --> 00:02:21,000 If I click on Select here, you'll see we'll be able to read the file as normal text. 32 00:02:21,000 --> 00:02:28,000 And this way you can literally copy all of this and paste it anywhere you want. 33 00:02:28,000 --> 00:02:33,000 Like this you can share the key without having to upload the file or attach it anywhere. 34 00:02:33,000 --> 00:02:39,000 You can copy this text, send it as an instant message, print it on a piece of paper and give it to 35 00:02:39,000 --> 00:02:40,000 someone. 36 00:02:40,000 --> 00:02:42,000 You can do anything you want with it. 37 00:02:42,000 --> 00:02:44,000 So you have two ways of sharing it. 38 00:02:44,000 --> 00:02:50,000 You can literally copy this text and send it to the person that you want to receive encrypted data from. 39 00:02:50,000 --> 00:02:53,000 Or you can attach this file right here. 40 00:02:53,000 --> 00:02:57,000 And like I said, you can use any method of communication. 41 00:02:57,000 --> 00:02:59,000 It doesn't really matter how you send it. 42 00:03:00,000 --> 00:03:07,000 Now, just as an example, I'm going to be sending this as an email, so I've already logged in into 43 00:03:07,000 --> 00:03:09,000 my web mail, as you can see in here. 44 00:03:09,000 --> 00:03:12,000 And what I want to do is send a message. 45 00:03:12,000 --> 00:03:14,000 So I'm going to click on Compose. 46 00:03:15,000 --> 00:03:19,000 I'm going to put the email of the person I want to send this to. 47 00:03:19,000 --> 00:03:26,000 So I'm sending this to another email account that I own for David Smith at Elude Dot n. 48 00:03:27,000 --> 00:03:32,000 I'm going to set the subject and I'm going to call this my PGP key. 49 00:03:33,000 --> 00:03:37,000 And then you can write anything here if you want in the message. 50 00:03:37,000 --> 00:03:45,000 So we're going to say, Please find my PGP key below and you can literally just paste all of the text 51 00:03:45,000 --> 00:03:47,000 that you copied in here, like I said. 52 00:03:47,000 --> 00:03:54,000 And then they'll be able to use this key as text to encrypt data to you, and we'll see how you can 53 00:03:54,000 --> 00:03:54,000 do that. 54 00:03:55,000 --> 00:03:58,000 This is the first method of sharing your key. 55 00:03:58,000 --> 00:04:02,000 Like I said, you can also share the key file that we exported. 56 00:04:02,000 --> 00:04:05,000 To do that, we're going to use an attachment. 57 00:04:05,000 --> 00:04:09,000 So again, I'm going to click on Browse and select the key file that we have in here. 58 00:04:10,000 --> 00:04:16,000 We're already in the Tor browser directory, so you just double click this and that's added to the attachment. 59 00:04:16,000 --> 00:04:19,000 Now like I said, you don't need to send both. 60 00:04:19,000 --> 00:04:25,000 I'm just showing you both here as an example, but only sending the key as a file or as text in here 61 00:04:25,000 --> 00:04:30,000 is enough for the other person to start encrypting data for you. 62 00:04:30,000 --> 00:04:35,000 Not only that, but you can even add this key to your signature. 63 00:04:35,000 --> 00:04:41,000 So every time you communicate with someone, they will see your public key and if they wanted to, they 64 00:04:41,000 --> 00:04:45,000 can encrypt the data that they're sending to you using your public key. 65 00:04:45,000 --> 00:04:49,000 And this way nobody can read this data except you. 66 00:04:50,000 --> 00:04:56,000 A lot of people even put this in their profile page in forums and even in markets. 67 00:04:56,000 --> 00:05:02,000 So if you click on a certain account, you'll probably see their PGP key pasted like this so that when 68 00:05:02,000 --> 00:05:08,000 you communicate with them, you would use this key to encrypt the data and that way they will be the 69 00:05:08,000 --> 00:05:14,000 only people able to read the message because you encrypted it using their public key. 70 00:05:14,000 --> 00:05:21,000 So the whole idea is you want to share this with anybody that might want to communicate with you so 71 00:05:21,000 --> 00:05:26,000 that when they send you something, you will be the only person able to read what they sent you. 72 00:05:27,000 --> 00:05:29,000 So we have the key here. 73 00:05:29,000 --> 00:05:30,000 We have it attached. 74 00:05:30,000 --> 00:05:36,000 We've already set the email and the subject, so I'm just going to click on send to send this email. 75 00:05:38,000 --> 00:05:40,000 And I'm going to go to the other computer. 76 00:05:40,000 --> 00:05:45,000 This is David's computer, the person that is supposed to send messages to John. 77 00:05:45,000 --> 00:05:49,000 As you can see, I'm already logged in to the email account as well. 78 00:05:49,000 --> 00:05:53,000 I'm going to refresh to see if I got anything in my inbox. 79 00:05:53,000 --> 00:05:56,000 And as you can see, I have a new message. 80 00:05:56,000 --> 00:05:57,000 We're going to go to the inbox. 81 00:05:58,000 --> 00:06:01,000 And this message is coming from John Wick. 82 00:06:01,000 --> 00:06:01,000 Perfect. 83 00:06:01,000 --> 00:06:03,000 So we're going to click on it. 84 00:06:05,000 --> 00:06:11,000 And again, as you can see, we have the key in both forms as an attachment and as text. 85 00:06:11,000 --> 00:06:13,000 So now this is David. 86 00:06:13,000 --> 00:06:20,000 And if we go back to our diagram, David is the person that wants to send an encrypted message to John. 87 00:06:20,000 --> 00:06:24,000 So what John did is he created a key pair. 88 00:06:24,000 --> 00:06:26,000 He sent John the key pair. 89 00:06:26,000 --> 00:06:28,000 So we have the key right here. 90 00:06:28,000 --> 00:06:31,000 What we need to do right now is download the key. 91 00:06:31,000 --> 00:06:36,000 And in the next lecture I'll show you how we use it to encrypt the message. 92 00:06:36,000 --> 00:06:42,000 So let's go ahead and download the key so we have it in here as an attachment. 93 00:06:42,000 --> 00:06:48,000 All we have to do is click on download and as usual, if you click on Save, this will only allow you 94 00:06:48,000 --> 00:06:53,000 to save it in the Tor browser directory and it's called John Wick dot ASC. 95 00:06:53,000 --> 00:06:56,000 So I'm going to click on Save to save it there. 96 00:06:58,000 --> 00:07:00,000 And if we go to our home directory. 97 00:07:01,000 --> 00:07:03,000 Go to Tor browser. 98 00:07:03,000 --> 00:07:07,000 You will see we have the key saved right here. 99 00:07:07,000 --> 00:07:13,000 Now, I'm actually going to remove this because I also want to show you how to download the key. 100 00:07:13,000 --> 00:07:17,000 If it was sent as plain text, if it was not sent as an attachment. 101 00:07:17,000 --> 00:07:23,000 So we're going to assume that you just got the key like this as text, if you got it as an instant message 102 00:07:23,000 --> 00:07:30,000 or if you saw it on a forum or on an account where the user was sharing their public key so that you 103 00:07:30,000 --> 00:07:32,000 can encrypt messages for them. 104 00:07:32,000 --> 00:07:39,000 In that case, if you want to start sending encrypted messages to this person using this key, you want 105 00:07:39,000 --> 00:07:46,000 to make sure, first of all, you copy the whole key from the start here, all the way down to the end. 106 00:07:46,000 --> 00:07:51,000 I'm going to right click and copy, and then you want to open a text editor. 107 00:07:51,000 --> 00:07:54,000 So we're going to go to accessories. 108 00:07:54,000 --> 00:08:01,000 We're going to open our text editor, We're going to paste everything that we copied in here. 109 00:08:01,000 --> 00:08:09,000 We're going to save Ctrl s or click here and you want to store this in any location that you want. 110 00:08:09,000 --> 00:08:12,000 Now you don't really have to put it into a browser. 111 00:08:12,000 --> 00:08:20,000 I'm just going to put it there anyway, and we're just going to call this John Wick again, Dot ASC. 112 00:08:20,000 --> 00:08:25,000 We're going to click on Save and again, we have the file. 113 00:08:25,000 --> 00:08:32,000 Now if we go back to this directory, we have the file, the John Wick dot ASC and inside it it has 114 00:08:32,000 --> 00:08:35,000 the content of the public key of John. 115 00:08:36,000 --> 00:08:41,000 Now all we have to do is import this public key to our keyring. 116 00:08:41,000 --> 00:08:44,000 To do that, we have to open Cleopatra here. 117 00:08:46,000 --> 00:08:47,000 And we're going to go to file. 118 00:08:48,000 --> 00:08:53,000 Import and select the key that we want to import. 119 00:08:53,000 --> 00:08:57,000 If you couldn't see it here, then make sure you go to the location where you downloaded it. 120 00:08:57,000 --> 00:08:59,000 So in my case it was in Tor browser. 121 00:08:59,000 --> 00:09:02,000 And again, we have the key that we want to import in here. 122 00:09:02,000 --> 00:09:04,000 Click on Open. 123 00:09:04,000 --> 00:09:11,000 Now, before importing it, Cleopatra is telling us that we should verify this key using the fingerprint. 124 00:09:11,000 --> 00:09:17,000 So usually you can do that using a phone call or if they had a business card or if they publicly share 125 00:09:17,000 --> 00:09:18,000 their fingerprint. 126 00:09:18,000 --> 00:09:23,000 And like I said, that's kind of similar to what we did when we were verifying the Tor browser. 127 00:09:23,000 --> 00:09:26,000 We'll talk about that later on in the course. 128 00:09:26,000 --> 00:09:32,000 So for now, we're going to say we don't want to do this because this step is optional anyway. 129 00:09:33,000 --> 00:09:36,000 So as you can see now, we have the key imported at the bottom. 130 00:09:36,000 --> 00:09:41,000 And as you can see right now, it is not written in bold. 131 00:09:41,000 --> 00:09:47,000 It's actually similar to all of the other keys, because right here at this computer, we only have 132 00:09:47,000 --> 00:09:49,000 the public key. 133 00:09:49,000 --> 00:09:57,000 Whereas in the original computer in John's computer, this entry is listed in bold in there on Cleopatra, 134 00:09:57,000 --> 00:10:01,000 because they have the full pair, the public key and the private key. 135 00:10:02,000 --> 00:10:08,000 Now we have imported the public key of the person that we want to communicate with. 136 00:10:08,000 --> 00:10:13,000 So right now, we can start encrypting data and send it to John. 137 00:10:13,000 --> 00:10:20,000 And the only person that will be able to see the content of this data is John, because he is the only 138 00:10:20,000 --> 00:10:22,000 person that has the private key.