Now that we understand how Ppgpp works.
In this lecture and the next few lectures, I'm going to show you how to use it to encrypt all kinds
of data, verify integrity, and so on.
Now, as I explained in the previous lecture, for this to work, the receiver, which is John in this
case, has to first generate a key pair, a public key and a private key.
He will share the public key with the person who he wants to receive data from.
That person who is David in this example will use the public key to encrypt the message.
Send the message to John.
The message will be unreadable unless the private key is used to decrypt it.
And as you can see throughout this whole scenario, the private key never left John.
So John never shares the private key.
And it is the only key that can be used to decrypt the data.
Therefore, this implementation is very, very secure.
So like I said, the first step for this is the receiver needs to generate a key pair.
A public key and a private key.
So in this lecture, I'm going to show you how we can create our own key pair so that we can share our
public key with the people that we want to receive data from.
And then they can use this public key to encrypt data and send it to us so that we are the only ones
that can decrypt this data because we have the private key.
So we can do this in tales easily using a pre-installed program called Cleopatra.
You can find this program in the applications under accessories, and we have it right here.
Now, you actually would have used this program already if you installed the Tor browser on Windows.
But anyway, we have a different use case in here and the goal is to actually use it to create a key
pair for us.
Now, as you can see by default it has a number of keys already installed on it.
Now these keys are pre-installed by the developers.
You can see the names of these keys, the emails associated with them, the dates from which they're
valid and until when they expire.
And the key ID.
Now it's very important to understand that you should never delete any of these keys because these keys
are actually used to validate the integrity of packages that tales downloads.
So whenever you're installing updates or if you're installing programs on tales, these keys are used
to validate that these packages or these updates are not getting modified as they're being downloaded
from their original sources.
So it's very important to keep these keys the same.
What we want to do right now is to create our own key.
And to do that, we're going to click on file and click on New key Pair.
We're going to select the first option in here to generate a personal openpgp key pair.
And it's asking us for the name and the email.
As you can see, these values are optional.
You don't actually have to put anything in here.
It is very important to keep in mind that the values that you put in here will be visible to anybody
that you share the key with.
So if you're sharing it in the future with people that you are not sure you should trust, then you
want to make sure that you use the fake name and fake ID and your private or anonymous email that we
created earlier, or you can simply just leave it blank.
So I'm going to just put the name as John Wick and my private and anonymous email is J and seven at
illudin.
And I'm going to click on the advanced Options to show you what we can change and give you an idea of
what else can be modified.
So you can see in here the encryption or the key type is set to RSA.
You want to keep this the same.
This is a very strong encryption.
We're just going to increase its value to 4096 bits.
And in here in the certificate usage, you can tick the boxes that you're going to use this key for.
So as you can see right now, the key is going to be used for signing for encryption and certification.
And we're not going to be using that key for authentication.
That is completely fine.
We actually only want to use it for signing encryption and certification.
So we're going to keep all of these options the same.
And you can also set an expiry date for this key so that it expires once it reaches the date that you
select here, you can untick this box to keep it valid forever or just keep it ticked and set an appropriate
date.
Once you're happy with the options we're going to click on.
Okay.
And we're going to click on next to go to the next step.
As you can see, it's showing us a summary of the values, the details that we filled.
And you can click here to show all details, to see all of the options and the values that we selected.
We're happy with everything.
So we're going to click, Create, and finally, it's going to ask us to set a passphrase for this key.
Make sure you choose a strong passphrase that is hard to brute force or to guess.
And we're going to click on okay to finish this process.
And perfect.
The key is created.
Now we have the fingerprint as well.
We spoke about this previously when we were talking about validation and we will actually talk about
it in more details in the next lectures.
We'll also talk about these next steps in the next lectures.
Anyway, so we're happy with what we did so far.
We're simply going to click Finish and as you can see, we have the new key in here at the bottom in
bold.
Now this key is in bold because it actually contains two keys.
It contains a private key and a public key.
The public key is the one that you share with the people that you want to share encrypted data with.
And the private one is the one that you keep yourself and you never share it.
All of the other keys in here are not in bold because they are public keys.
They do not contain the private key because these are actually not our own keys.
Therefore, the creators of tales have shared their public key in here so that we can validate the packages
downloaded are actually made by them.
But these entries do not contain the private key, obviously, because the tales developers keep these
private keys for themselves and use them to sign the packages that they distribute to us.
Now, you can also get more details about any of these keys by simply right clicking the key and going
to the details in here at the bottom.
So as you can see, we can see the email, the name, We could see this anyway at the start.
You can also see the dates from which it's valid.
And when it expires, you can see the type, you can see the fingerprint.
And like I said, this is useful for data validation, but we'll talk about that in more details later.
You can even change the passphrase from here and the more details in here, obviously give us even more
details and we'll talk more about exporting the keys and sharing them and sharing the certificates in
the next lectures.
But for now, we have our key created and stored inside this program, Cleopatra.
And in the future, I'm going to show you how to use this program and use this key to encrypt text and
share information privately.