Now so far we have David who wants to send a secret message to John to do this.
John generated a keeper.
John also sent the public key to David.
David has downloaded the public key and imported it into his key ring.
So if we go to David's computer right here we can see he has John's public key.
So right now David can encrypt data with John's public key send it to John.
And that way John will be the only person who can decrypt this data because he is the only person that
has his own private key.
Now you'll also notice an extra entry in here.
I've actually created a keeper for David in this section right here for the sake of completion.
You don't have to do this because like I said all we need is John's public key to send data to John.
And according to the example we're doing David will be sending data to John so all we need is John's
public key.
I just created a keeper here for David just for the sake of completion so that you can see how this
will work in a real life scenario.
So we actually don't need to use this anymore because David already has the public key of John.
So all you have to do is literally start typing the message that you want to send to do this.
I'm just going to open a text editor.
So again we're gonna go to accessories.
We're going to open my text editor and I'm just going to start composing the message.
So for this we're just gonna say hello.
This is a secret message sent from David to John.
Now before sending this we're going to select all of this text.
We're going to copy it.
And then we're gonna go to the clipboard applet and we're going to click on sign encrypt clipboard with
public key.
We're going to click on this.
And as you can see you get a list of all of the public key that you have on your computer.
Now like I said all of the ones that start with tails are default public keys added in order to verify
the integrity of packages downloaded from tells you don't want to select any of these.
You want to make sure you select the contacts that you want to send their message to.
And in our example we want to send the message to John Wick now this is perfectly fine.
You can just select it like this and click on okay to encrypt the message.
But in this case even you even David.
So even the sender won't be able to see the contents of the message if you want to be able to decrypt
the contents of the message yourself as well then you should take the entry for your own key.
So this is David's computer.
And if David wants to still be able to see the contents of the message that he is going to send he should
take this box.
Otherwise we can just tick John.
And the only person in the world that will be able to read the content of this message will be John
or anyone who has the private key.
But if John is using BGP properly he should never share the private key with anybody.
And therefore when we encrypt a message with his private key we can be sure that John will be the only
person that can read the content of this message.
So we're going to click on.
OK.
That's going to ask us if we trust this key we're going to say yes we do trust it.
And as you can see in here you can see the icon of the clipboard has changed to indicate that the clipboard
right now contains an encrypted text that represents the text that we copied already.
So if and the same text editor in here if I just paste whatever that is in my clipboard you will see
I'll get an encrypted message.
And this is basically the content in here encrypted using John's public key.
So right now you can't just copy all of this and send it to John using any method of communication so
you can send it as an instant message.
You can send it in a chatroom you can send it as an e-mail.
You can even put it in a pastebin publicly where anybody can see your message where anybody can see
your secret message.
This is the beauty of PDP.
You can put this anywhere and nobody will be able to see or read the content of this unless they have
the private key of John.
And like I said if John is using PDP properly and he knows what he is doing he should never share his
private key.
Therefore he will be the only person in the world that is able to read the content of this message.
Now for this example to make things easy.
I'm going to go back to my e-mail client and I'm just going to reply to this email and we'll put our
encrypted message in here.
Keep in mind I'm copying it from the start to the end.
I'm going to click on send and that's it sent to John.
So let's go to John's computer.
We're going to go to his e-mail account.
We're going to refresh the inbox and we're going to click on the message that we just got.
And as you can see this message is encrypted.
It's gibberish.
We can't really see what David is trying to tell us so we're going to right click and copy this message
and as soon as we copy it you'll notice the clipboard icon in here.
Again changes to indicate a lock to indicate that the clipboard contains encrypted text.
We're going to click on this and we're going to say I want to decrypt or verify my clipboard.
That's going to ask me for the passphrase for my key for John Wicks key.
Remember when we created this key we had to select a passphrase and that passphrase will always be required
before you can use this private key.
So I'm going to put the passphrase that I set when I created this key I'm going to click on.
OK and perfect as you can see we can see the contents of the message saying hello.
This is a secret message sent from David to John.
So that's pretty much it.
As you can see the receiver shares their public key with the sender the sender uses this public key
to encrypt the message and then they can put the message anywhere or even share it publicly.
It doesn't really matter because the only person that can read this message is the person who has the
private key the private key never gets shared therefore this is a very very good and secure implementation.
So now in this example John created the keeper.
He shared his public key with David.
And David was the one encrypting the message and sending it back to John.
Now if John wants to send something back to David we just have to do the reverse of the process.
So David will just have to create his own keeper share the public key with John.
And then John will be able to encrypt messages and share them with David and know that David would be
the only one able to read the contents of the messages sent to him.