pgp_workshop
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| pgp_workshop [2025/04/16 08:11] – usera | pgp_workshop [2025/05/29 07:47] (current) – [The actual Key signing] usera | ||
|---|---|---|---|
| Line 167: | Line 167: | ||
| The way it is done is the following: | The way it is done is the following: | ||
| - | - The file is **hashed** (see the paragraph below). | + | - The file is **[[hashed|hashed]]** (see the paragraph below). |
| - This hashed file is encrypted with your private key | - This hashed file is encrypted with your private key | ||
| - The result is added at the end of your file, giving a **signed** file. | - The result is added at the end of your file, giving a **signed** file. | ||
| - | |||
| - | <div class=" | ||
| - | < | ||
| - | <p style=' | ||
| - | < | ||
| - | <p style=' | ||
| - | <b>to hash</ | ||
| - | <ol> | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | </ol> | ||
| - | </p> | ||
| - | </ | ||
| - | </ | ||
| Actually, in most case you will do both: signing (with your private key) then encrypting (with the public key of someone else). The person receiving the message will decrypt it with their private key, and then extract the signature and verify it with your public key. | Actually, in most case you will do both: signing (with your private key) then encrypting (with the public key of someone else). The person receiving the message will decrypt it with their private key, and then extract the signature and verify it with your public key. | ||
| + | |||
| + | ==== First step if you only set up Thunderbird with PGP so far ==== | ||
| + | |||
| + | If you were on Windows and set up your keys with Kleopatra, the command line gpg tool will already know those keys. However, if you used the PGP key manager from thunderbird, | ||
| + | |||
| + | This is how to do it. First, go to the key manager, select your own key, that you will use to sign things with, and click on File-> | ||
| + | |||
| + | Then, open a command line, navigate to the directory where your secret key file is located and enter: | ||
| + | |||
| + | < | ||
| + | gpg --import [filename] | ||
| + | </ | ||
| + | |||
| + | where [filename] is the name of this secret key file. you then need to tell the gpg command tool to use this key as a default signing key. This is done by the command: | ||
| + | |||
| + | < | ||
| + | echo ' | ||
| + | </ | ||
| + | |||
| + | where [fingerprint] is the fingerprint of your key. You can find it with the command: | ||
| + | |||
| + | < | ||
| + | gpg --fingerprint [NAME] | ||
| + | </ | ||
| + | |||
| + | where [NAME] can be a small part of your mail address: gpg is cleaver enough to do a search among your keys and guess which one is the closest. | ||
| + | |||
| + | You are then ready to sign files and keys ! | ||
| ==== Checking the integrity of a downloaded file ==== | ==== Checking the integrity of a downloaded file ==== | ||
| Line 263: | Line 276: | ||
| GPG is a lot based on the trust that you are talking to the right person. Therefore, to tell to the whole world that you trust some public key, you should **sign the public keys** of other people. | GPG is a lot based on the trust that you are talking to the right person. Therefore, to tell to the whole world that you trust some public key, you should **sign the public keys** of other people. | ||
| + | |||
| + | === Note if you used Thunderbird and not Kleopatra === | ||
| + | |||
| + | To sign a key, you need to use the command line gpg, so as said before, if you used Kleopatra to generate your keys, you are good to go, as the gpg tool will already know your keys. However, if you used Thunderbird, | ||
| + | - First, go to the PGP key manager in Thunderbird | ||
| + | - Select the public key you want to sign, then right click and click on Export public key to file and select a location on your computer | ||
| + | - Open a command line, navigate to the folder where your file is and enter '' | ||
| + | - repeat the operaton for each key you want to sign | ||
| + | |||
| + | === The actual Key signing === | ||
| This is how to do it (as recommended [[https:// | This is how to do it (as recommended [[https:// | ||
| - Alice (you) get the public key of Bob | - Alice (you) get the public key of Bob | ||
| - | - Alice sign it with her private key: < | + | - Alice sign it with her private key: '' |
| - | - Alice exports, then encrypts the signed key with Bob public key, with the following command: < | + | - Alice exports, then encrypts the signed key with Bob public key, with the following command: < |
| - Alice emails the key to Bob using the mail address associated with the key | - Alice emails the key to Bob using the mail address associated with the key | ||
| - | - Bob receives it, then decrypt it with his private key and import it: < | + | - Bob receives it, then decrypt it with his private key and import it: '' |
| - | - He can then send it to a keyserver, containing Alice signature: | + | - He can then send it to a keyserver, containing Alice signature: |
pgp_workshop.1744791094.txt.gz · Last modified: by usera
