Little-t-tor

Attention: These instructions are to verify the tor source code. Please follow the right instructions to verify Tor Browser's signature.

La firma digitale è un processo che assicura che un certo pacchetto sia stato creato dai suoi sviluppatori e che non sia stato manomesso. Below we explain why it is important and how to verify that the tor source code you download is the one we have created and has not been modified by some attacker.

Each file on our download page is accompanied by a file labelled "sig" with the same name as the package and the extension ".asc". These .asc files are OpenPGP signatures. Ti permettono di verificare che il file che hai scaricato è esattamente quello da noi previsto. This will vary by web browser, but generally you can download this file by right-clicking the "sig" link and selecting the "save file as" option.

For example, tor-0.4.6.7.tar.gz is accompanied by tor-0.4.6.7.tar.gz.asc. Questi sono solo esempi di nomi di file e non corrisponderanno esattamente a quelli dei file che scaricherai.

Ora ti mostriamo come puoi verificare la firma digitale del file scaricato nei vari sistemi operativi. Ti informiamo che la firma è datata a quando il pacchetto è stato firmato. Pertanto, ogni volta che un nuovo file viene caricato una nuova firma viene generata con una data diversa. Finché hai verificato la tua firma non dovresti preoccuparti che la data riportata potrebbe cambiare.

Installazione di GnuPG

Prima di tutto hai bisogno di installare GnuPG prima di poter verificare le firme.

Per gli utenti Windows:

Se utilizzi Windows, scarica Gpg4win e esegui l'installer.

Per verificare il file è necessario eseguire comandi da terminale cmd.exe da windows

Per gli utenti macOS:

Se stai usando macOS, puoi installare GPGTools.

Per verificare li file dovresti necessitare della riga di comando (Applications-Utility)

Per gli utenti GNU/Linux:

Se stai usando GNU/Linux probabilmente hai già GnuPG nel tuo sistema, molte distribuzioni lo hanno preinstallato.

In order to verify the signature you will need to type a few commands in a terminal window. How to do this will vary depending on your distribution.

Recuperare la chiave per sviluppatori Tor

Roger Dingledine (0xEB5A896A28988BF5 and 0xC218525819F78451), Nick Mathewson (0xFE43009C4607B1FB) sign Tor source tarballs.

Fetching Nick Mathewson most recent key:

‪$ gpg --auto-key-locate nodefault,wkd --locate-keys nickm@torproject.org

Questo dovrebbe farti vedere qualcosa come:

gpg: key FE43009C4607B1FB: public key "Nick Mathewson <nickm@torproject.org>" imported
gpg: Numero totale proccessati: 1
gpg: importati: 1 
pub   rsa4096 2016-09-21 [C] [expires: 2025-10-04]
      2133BC600AB133E1D826D173FE43009C4607B1FB
‪uid           [ unknown] Nick Mathewson <nickm@torproject.org>
sub   rsa4096 2016-09-23 [S] [expires: 2025-10-04]
sub   rsa4096 2016-09-23 [E] [expires: 2025-10-04]

If you get an error message, something has gone wrong and you cannot continue until you've figured out why this didn't work. You might be able to import the key using the Workaround (using a public key) section instead.

Dopo aver importato la chiave, puoi salvare su un file (identificandola dalla sua impronta qui):

‪$ gpg --output ./tor.keyring --export 0x2133BC600AB133E1D826D173FE43009C4607B1FB

This command results in the key being saved to a file found at the path ./tor.keyring, i.e. in the current directory. Se ./tor.keyring non esiste una volta eseguito questo comando, qualcosa è andato storto e non puoi continuare finchè non hai capito cosa non ha funzionato.

Verificare la firma

Per verificare la veridicità del pacchetto scaricato, dovresti scaricare il file corrispondente ".asc" e verificare con il comando GnuPG il file.

L'esempio presume che hai scaricato due file dalla tua cartella "Downloads" Nota che questi comandi usano esempi di nomi di file e i tuoi saranno diversi: avrai scaricato una versione diversa dalla 9.0 e potresti non aver scelto la versione English (en-US).

Per gli utenti Windows:

gpgv --keyring .\tor.keyring Downloads\tor-0.4.6.7.tar.gz.asc Downloads\tor-0.4.6.7.tar.gz

Per gli utenti macOS:

gpgv --keyring ./tor.keyring ~/Downloads/tor-0.4.6.7.tar.gz.asc ~/Downloads/tor-0.4.6.7.tar.gz

Per gli utenti GNU/Linux:

gpgv --keyring ./tor.keyring ~/Downloads/tor-0.4.6.7.tar.gz.asc ~/Downloads/tor-0.4.6.7.tar.gz

Il risultato del comando dovrebbe dare qualcosa come:

gpgv: Signature made Mon 16 Aug 2021 04:44:27 PM -03
gpgv:                using RSA key 7A02B3521DC75C542BA015456AFEE6D49E92B601
‪gpgv: Good signature from "Nick Mathewson <nickm@torproject.org>"

Se ricevi messaggi di errore che contengono 'Nessun file o directory', qualcosa è andato storto in uno dei passi precedenti, o hai dimenticato che questi comandi utilizzano esempi di nomi di file, e i tuoi saranno diversi.

Soluzione alternativa (utilizzando una chiave pubblica)

Se incontri errori che non puoi risolvere, sentiti libero di scaricare e utilizzare questa chiave pubblica. Alternativamente, puoi usare il seguente comando:

‪$ curl -s https://openpgpkey.torproject.org/.well-known/openpgpkey/torproject.org/hu/kounek7zrdx745qydx6p59t9mqjpuhdf |gpg --import -

Nick Mathewson key is also available on keys.openpgp.org and can be downloaded from https://keys.openpgp.org/vks/v1/by-fingerprint/2133BC600AB133E1D826D173FE43009C4607B1FB.

If you're using macOS or GNU/Linux, the key can also be fetched by running the following command:

‪$ gpg --keyserver keys.openpgp.org --search-keys nickm@torproject.org

Potresti anche voler saperne di più riguardo GnuPG.