Now that we have our keeper generated the next step is to share our public key with the people that
we want to receive encrypted messages from so that they can encrypt messages using our public key so
that we will be the only people that can decrypt these messages because we have the private key.
So in order to do this you need to come to your passwords and keys.
Like I said you can access this from applications utilities and click on passwords and keys as you can
see I have it already opened and I already selected my key pair which I created in the previous lecture.
Now in order to export the public key.
Now keep in mind we're exporting the public key not the private key.
We never shared the private key.
Hence the name private key.
So we're gonna go to file.
We're going to click on export and you need to select the location where you want to store your public
key.
And now I'm going to select my tour browser directory because I want to share this through email.
So when added as an attachment and as we know the Tor browser can only access the third browser directory
entails.
That's why I selected this directory.
What you can store it anywhere you want.
Now I'm also going to change the format from PDP to armored PDP.
This won't really make a big difference.
The reason why I'm doing this so that I can show you the content of the key as plain text.
So we're done here.
I'm going to click on export and that's it.
It's done.
So if I go to my home directory and go to Tor browser you can see we have a file called John Wick that
A C and this is my public key that I can share with anybody so that they can encrypt data and send it
to me.
Now you can literally attach this file the way it is.
You can upload it to a file sharing service like I showed you or use on your own share.
You can use any method of sharing this file if you don't want to share it as a file.
You can also right click it select open with other application select view all applications and select
your text editor to open it with a text editor.
If I click on select here you'll see we'll be able to read the file as normal text.
And this way you can literally copy all of this and paste it anywhere you want.
So like this you can share the key without having to upload the file or attach it anywhere.
You can copy this text send it as an instant message printed on a piece of paper and give it to someone.
You can do anything you want with it.
So you have two ways of sharing it.
You can literally copy this text and send it to the person that you want to receive encrypted data from
or you can attach this file right here.
And like I said you can use any method of communication.
It doesn't really matter how you send it now just as an example I'm going to be sending this as an email.
So I've already logged in into my web mail as you can see in here.
And what I want to do is send a message.
So I'm going to click on compose.
I'm going to put the e-mail of the person I want to send this to so I'm sending this to another e-mail
account that I own for David Smith at elude dot and I'm going to set the subject and I'm going to call
this my p GP key and then you can write anything here if you wanted the message.
So we're going to say please find my PDP key below you can literally just paste all of the text that
you copied in here like I said and then they'll be able to use this key as text to encrypt data to you
and we'll see how you can do that.
This is the first method of sharing your key.
Like I said You can also share the key file that we exported to do that.
We're going to use an attachment.
So again I'm going to click on browse and select the key file that we have in here or already in the
Tor Browser directory.
So you just double click this and that's added to the attachment.
Now like I said You don't need to send both.
I'm just showing you both here as an example.
What on this end in the key as a file or as text in here is enough for the other person to start encrypting
data for you.
Not only that but you can even add this key to your signature.
So every time you communicate with someone they will see your public key and if they wanted to they
can encrypted data that they're sending to you using your public key.
And this way nobody can read this data except you a lot of people even put this in their profile page
and forums and even and markets.
So if you click on a certain account you'll probably see their GP key pasted like this so that when
you communicate with them you would use this key to encrypted data.
And that way they will be the only people able to read the message because you encrypted it using their
public key.
So the whole idea is you want to share this with anybody that might want to communicate with you so
that when they send you something you will be the only person able to read what they sent you.
So we have the key here we have it attached.
We've already said the e-mail on the subject.
So I'm just going to click on send to send this email and I'm going to go to the other computer.
This is David's computer.
The person that is supposed to send messages to John as you can see I'm already logged into the email
account as well.
I'm going to refresh to see if I got anything in my inbox.
And as you can see I have a new message we're going to go to the inbox.
This message is coming from John Wick.
Perfect.
So we're going to click on it again as you can see we have the key in both forums as an attachment and
as text.
So now this is David.
And if we go back to our diagram David is the person that wants to send an encrypted message to John.
So what John did is he created a key.
He sent John the key pair.
So we have the key right here.
What we need to do right now is download the key and in the next lecture I'll show you how we use it
to encrypt the message.
So let's go ahead and download the key.
So we have it in here as an attachment.
All we have to do is click on Download.
And as usual if you click on Save This will only allow you to save it in the third browser directory.
And it's called John week at a.
So I'm going to click on safe to see with their and if we go to our home directory go to Tor browser
you will see we have the key saved right here.
Now I'm actually going to remove this because I also want to show you how to download the key if it
was sent as plain text if it was not sent as an attachment.
So we're going to assume that you just got the key like this as text.
So if you want to save a key that you got it like this for example if you've got it as an instant message
or if you saw it on a forum or on an account where the user was sharing their public key so that you
can encrypt messages for them.
In that case if you want to start sending encrypted messages to this person using this key you want
to make sure first of all you copy the whole key from the start here all the way down to the end.
I'm going to right click and copy and then you want to open a text editor.
So we're going to go to accessories.
We're going to open our text editor.
We're going to paste everything that we copied in here.
We're going to save control as or click here.
And you want to store this in any location that you want.
Now you don't really have to put it into a browser.
I'm just going to put it there anyway and we're just going to call this John Wick again that a a C.
We're going to click on save.
And again we have the file now if we go back to this directory.
We have the file the John wake dot EMC and inside it.
It has the content of the public key of John.
Now all we have to do is import this public key to our hearing to do that again.
We have to open the passwords and keys here and we're going to go to file import and select the key
that we want to import.
If you couldn't see it here then make sure you go to the location where you downloaded it.
So in my case it was in tor browser.
And again we have the key that we want to import in here click on open.
It's going to show you the information of this key.
Again like I said Remember I said anybody who has access to this public key will be able to see your
e-mail address.
And as you can see we can actually see John's e-mail address right here and we can see his name right
here.
John Wick.
That's why it's very important to use your anonymous or fake identity in here.
We're going to click on import to add this key and now if we click on our G and new P.G. keys as you
can see we have John weak as an entry in here.
And as you can see John Wick in here has an icon of one gold key.
We don't see two icons going back to John's computer.
If we go to the passwords and keys in here you can see John has two keys in here because this is a keeper.
John has his own private key and the public key.
But at David's computer David only has the public key and that's why we see only one gold icon in here.
Again if you're right click this and go to properties.
You'll be able to see the name and the e-mail of the key owner.
You can see the key I.D. and click in on details.
You can see the fingerprint which like I said can be used to verify the owner of the key.
And we'll talk all about that later on in the course for now we have imported the public key of the
person that we want to communicate with.
So right now we can start encrypting data and send it to John.
And the only person that will be able to see the content of this data is John because he is the only
person that has the private key.