Now before we wrap up this section I want to spend one more lecture talking about another method to
exchange keys between the sender and the receiver.
So as we learned we can use PDP in order to encrypt the message and make sure that this message will
only be readable by the receiver by encrypting the message with the receiver's public key.
Therefore for this to work for example if David wanted to send a message to John he would have had to
get John's public key then same goes for John.
If John wanted to send something to David he would have had to get David's public key and to exchange
the keys in the previous lectures.
We used email to send the keys from one person to another.
Now we can use any method of communication.
And like I said sometimes if you're using a market or if you're on a forum you might even see the user
including the public key in their signature or in their profile page.
That way you can use that key to encrypt messages and send them to that user.
And you'll be sure that the only person that will be able to read this message is the user.
Now there is another way of sharing the keys which I want to cover in this lecture and that way relies
on using key servers so you can think of this as a computer that's accessible on the Internet or on
the darknet.
It contains a number of keys and then for example if David wanted to share his public key with John
or with anyone else they can upload their key to the server.
Same goes for John if he wanted to share his public key with others.
He can upload his key to the server as well.
And then if David wanted to communicate with John he won't need to ask John for the public key directly.
And John won't need to communicate with David directly and send him the key.
All David has to do is query the server the key server that is accessible like I said on the darknet
or on the internet and download John's public key.
Same goes for John if you wanted to get David's public key.
He can query the server download David's key and that way.
Both David and John have each other's public keys and therefore they can start communicating and encrypted
messages to each other using each other's public keys.
The only thing that you can to keep in mind when doing this is when you upload your key to this public
server anybody can get your public key.
Now like I said the public key cannot be used to decrypt your messages.
But as we've seen before there is an identity tied up to the key.
Now we used fake information but if you're using real information the name will be visible on that key.
And the email associated with that key again like we seen before when we create a key which we set an
email address with that key.
So that email will also be publicly available.
So if you don't want to make this information available then do not upload your keys to these key servers.
Also if the key is associated with other keys or part of a chain of trust these keys will also become
available along with the information tied up to them.
So any contact associated with the key will also become available and public once you upload that key
to the key server.
So again if you don't want this information to be public then do not upload your key to the key server
and just send it directly to the people that you want to share your public key with.
But like I said the main idea remains sound sharing the public key does not compromise the encryption
the public key cannot be used to decrypt the messages.
It can only be used to encrypt them.
Hence the name public.
And that's why we can actually share it with anyone we want and we can just make it publicly available
now.
Let's see how we can do this.
So first of all I'm going to go to John's computer right here and let's say that I want to make my private
key so this key right here available and I want to upload it to a key server.
Now before uploading it to a key server I need to enable this feature and to do that.
We're going to go to edit preferences and in here when it says publish keys too I'm going to click on
the drop down menu and select the server right here.
Now as you can see this is an online service.
Therefore whoever is going to download this key needs to be connected to the TOR network.
Now I'm going to close this and the next thing that I'm going to do is upload this key to the key server.
So to do that we're going to go to remote and sync and publish keys.
This is telling us that one key is selected and it's going to be synchronized and uploaded to the key
server that we selected.
We're going to click on sync and this will upload my key to the key server that we selected.
Now anyone who wants to communicate with me will join week.
They can query this key server and find my public key and use that to encrypt messages for me.
So in our example it's David that wants to communicate with John.
We have his computer right here and all he needs to do is open his passwords and keys from the utilities.
As we've seen before and he is going to first select the G and you PGE keys go to remote and click on
find the remote keys.
So these are the steps that you need to use if you want to pull a key from a key server when you click
on this.
You'll get a search box as you can see in here which you can use to search for your contact.
You can search using the name associated with the key as we know that's John wake.
You can also use the e-mail or the I.D. I'm just going to use the email which is G N C K 7 at a blue
dot in and I'm going to click on Search now as you can see I have the result right here.
Now you can right click and look up the properties of this contact and you can see this is for a person
named John wake.
You can see the e-mail.
You can see the key I.D..
And if we click on details you'll also be able to see the key fingerprint.
Now ideally you'd want to confirm the key I.D. and the fingerprint with your contact before adding this
key because as we seen anyone can publish a key to the key server and claim to be anybody.
So we're not sure that this John Wick is actually the John Wick that we need to communicate with.
Therefore you should communicate with your contact use in another method of communication for example
by e-mail by phone or by a text message and confirmed the fingerprint.
And the idea that you're about to add to make sure that this is the correct fingerprint and the correct
I.D. for the key that you want to add now obviously John can get this information again by going to
his passwords and keys right click his own key click on properties and he can get his own fingerprint
and use that to help you confirm that this is the right contact.
Once you're sure this is the right contact you can click it in here and click on import to add to your
keys and as you can see it got added in here into my keyring and then as we've seen before you can start
typing messages and encrypt them from the applet in here or encrypt files by right clicking the files
and encrypting them.
So basically I just wanted to show you another method of key exchange how you can upload a key to a
key server and how your contact can download it or how you can download a key from the key server.
Now keep in mind when you upload a key to the key server it might not become immediately available.
I actually posed the video and resumed recording after several hours after uploading the John Key because
usually there are more than just one key server.
So when you upload your key to one of the servers it actually takes some time for the key to be shared
with all of the servers.
And to become available for everybody to download so if you uploaded a key and your contact tried to
download it within the same hour and couldn't find it then that's fine.
Just tell them to wait for a few hours and then they should be able to download it.