doc:appunti:linux:tux:gpg
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| doc:appunti:linux:tux:gpg [2010/04/14 11:26] – niccolo | doc:appunti:linux:tux:gpg [2021/08/29 09:14] (current) – [Creazione della coppia chiavi pubblica/privata] niccolo | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| < | < | ||
| - | gpg --gen-key | + | gpg --full-generate-key |
| </ | </ | ||
| < | < | ||
| - | DSA keypair will have 1024 bits. | + | Please select what kind of key you want: |
| - | ELG-E keys may be between 1024 and 4096 bits long. | + | RSA and RSA |
| + | RSA keys may be between 1024 and 4096 bits long. | ||
| Requested keysize is 2048 bits | Requested keysize is 2048 bits | ||
| - | Key is valid for? (0) 2y | + | Key is valid for? (0) 3y |
| - | Key expires at Fri 13 Jul 2007 02:42:12 PM CEST | + | Real name: Niccolo Rigacci |
| - | You selected this USER-ID: | + | Email address: niccolo@rigacci.org |
| - | " | + | |
| </ | </ | ||
| La chiave privata (protetta dalla passphrase) viene memorizzata in '' | La chiave privata (protetta dalla passphrase) viene memorizzata in '' | ||
| + | |||
| + | Per pubblicare la propria chiave (la parte pubblica) su un server pubblico: | ||
| + | |||
| + | < | ||
| + | gpg --keyserver pgp.key-server.io --send-keys 58F28BB5 | ||
| + | </ | ||
| Questi i comandi per: | Questi i comandi per: | ||
| Line 32: | Line 38: | ||
| gpg --list-secret-keys | gpg --list-secret-keys | ||
| </ | </ | ||
| + | |||
| + | ===== Pubblicazione su keys.openpgp.org ===== | ||
| + | |||
| + | Sul server **[[https:// | ||
| + | |||
| ===== Firmare o criptare un documento ===== | ===== Firmare o criptare un documento ===== | ||
| Line 101: | Line 112: | ||
| Importante lo switch **'' | Importante lo switch **'' | ||
| - | Esistono dei server pubblici dedicati allo scambio delle chiavi (pubbliche). Ad esempio con **[[http://wwwkeys.eu.pgp.net/|wwwkeys.eu.pgp.net]]** oppure **[[http://keyserver.veridis.com:11371/|keyserver.veridis.com]]** l' | + | Esistono dei server pubblici dedicati allo scambio delle chiavi (pubbliche). Ad esempio con **[[http://pgp.key-server.io/|pgp.key-server.io]]** oppure **[[https://pgp.mit.edu/|pgp.mit.edu]]** l' |
| Per installare nel proprio portachiavi una chiave presa dal server in questione si può prelevare il file ASCII-armored ed effettuare l''' | Per installare nel proprio portachiavi una chiave presa dal server in questione si può prelevare il file ASCII-armored ed effettuare l''' | ||
| Line 111: | Line 122: | ||
| </ | </ | ||
| + | ===== Copia di una chiave privata ===== | ||
| + | |||
| + | Con questa procedura si può copiare una chiave privata da un host ad un altro. Per prima cosa si elencano le chiavi private e si prende nota dell' | ||
| + | |||
| + | < | ||
| + | gpg --list-secret-keys | ||
| + | </ | ||
| + | |||
| + | Quindi si salva in un file il **PRIVATE KEY BLOCK** (quasi certamente la chiave privata è protetta da password, che viene chiesta durante la procedura di esportazione): | ||
| + | |||
| + | < | ||
| + | touch private.key | ||
| + | chmod 640 private.key | ||
| + | gpg --armor --export-secret-keys 8364FCC486877E37A39B7D5D01526646275E281D > private.key | ||
| + | </ | ||
| + | |||
| + | Dopo aver copiato il file sul nuovo host, si esegue (viene chiesta nuovamente la password che protegge la chiave): | ||
| + | |||
| + | < | ||
| + | gpg --import private.key | ||
| + | </ | ||
| + | |||
| + | La chiave privata viene salvata nel keyring, si può verificare con **%%gpg --list-secret-keys%%**. La chiave resta **cifrata** con la password che aveva in origine. | ||
| ===== Cifrare/ | ===== Cifrare/ | ||
| Line 167: | Line 201: | ||
| gpg --fingerprint | gpg --fingerprint | ||
| </ | </ | ||
| + | |||
| + | ===== Ricerca di una chiave pubblica ===== | ||
| + | |||
| + | Si dovrebbe poter interrogare dei server pubblici per cercare la chiave pubblica di una persona, ad esempio **[[http:// | ||
| + | |||
| + | {{pgp.key-server.io.png? | ||
| + | |||
| + | Nella schermata sopra si vede ad esempio che esiste la chiave **275E281D** scaduta il **2018-09-17**, | ||
doc/appunti/linux/tux/gpg.1271237172.txt.gz · Last modified: by niccolo
