Attention: These instructions are to verify the tor source code.
Please follow the right instructions to verify Tor Browser's signature.
Assinatura digital é um processo que certifica que um determinado pacote foi gerado pelas pessoas que o desenvolveram e que não sofreram nenhuma alteração.
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 two files which are labelled "checksum" and "sig" with the same name as the package and the extension ".sha256sum" and ".sha256sum.asc" respectively.
The .asc
file will verify that the .sha256sum
file (containing the checksum of the package) has not been tampered with. Once the signature has been validated (see below on how to do it), the package integrity can be validated with:
$ sha256sum -c *.sha256sum
These files allow you to verify the file you've downloaded is exactly the one that we intended you to get.
This will vary by web browser, but generally you can download this file by right-clicking the "sig" and "checksum" 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.sha256sum.asc
.
Estes são exemplos de nomes de arquivos e não irão corresponder exatamente aos nomes dos arquivos que você baixou.
Agora vamos lhe mostrar como você pode verificar a assinatura digital de cada documento baixado em vários sistemas operacionais.
Por favor, lembre que a assinatura é datada do momento em que o pacote foi assinado.
Assim, todas as vezes que um novo documento for carregado, uma nova assinatura é gerada com a nova data.
Se você tiver verificado a assinatura, não se preocupe com a mudança das datas.
Instalando GnuPG
Primeiro de tudo você precisa ter o GnuPG instalado antes de verificar as assinaturas.
Para quem usa Windows:
Se você utiliza Windows, baixe o Gpg4win e execute o instalador.
Para verificar a assinatura, você precisará digitar alguns comandos na linha de comando do Windows, cmd.exe
.
Para usuários do macOS:
Se você estiver utilizando macOS, pode instalar o GPGTools.
Para verificar a assinatura, você precisará digitar alguns comandos no Prompt de Comando do Windows (ver "Aplicações").
Para quem usa GNU/Linux:
Se você está usando GNU/Linux, então provavelmente já tem o GnuPG em seu sistema, já que a maioria das distribuições Linux já o possui pré-instalado.
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.
Buscando a chave de desenvolvedores do Tor
The following keys can sign the tarball. Don't expect them all, it can vary depending on who is available to make the release.
You can fetch the key with the links provided above or with:
$ gpg --auto-key-locate nodefault,wkd --locate-keys ahf@torproject.org
$ gpg --auto-key-locate nodefault,wkd --locate-keys dgoulet@torproject.org
$ gpg --auto-key-locate nodefault,wkd --locate-keys nickm@torproject.org
This should show you something like (for nickm):
gpg: key FE43009C4607B1FB: public key "Nick Mathewson <nickm@torproject.org>" imported
gpg: Número total processado: 1
gpg: importado: 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.
Após importar a chave, você pode salvá-la em um arquivo (identificando-o através dessa impressão digital):
$ gpg --output ./tor.keyring --export 0x2133BC600AB133E1D826D173FE43009C4607B1FB
Este comando resulta em salvar a chave em um arquivo encontrado no caminho ./tor.keyring
, ou seja, no diretório atual.
Se ./tor.keyring
não existe após a execução deste comando, algo deu errado e você não pode continuar até descobrir por que isso não funcionou.
Verificando a assinatura
To verify the signature of the package you downloaded, you will need to download the corresponding .sha256sum.asc
signature file and the .sha256sum
file itself, and verify it with a command that asks GnuPG to verify the file that you downloaded.
Os exemplos abaixo consideram que você tenha baixado estes dois arquivos para a pasta "Downloads".
Observe que estes comandos usam exemplos de nomes de documentos e os seus serão diferentes: você terá baixado uma versão diferente da 9.0 e você pode não ter escolhido a versão em Inglês (en-US).
Para quem usa Windows:
gpgv --keyring .\tor.keyring Downloads\tor-0.4.6.10.tar.gz.sha256sum.asc Downloads\tor-0.4.6.10.tar.gz.sha256sum
Para usuários do macOS:
gpgv --keyring ./tor.keyring ~/Downloads/tor-0.4.6.10.tar.gz.sha256sum.asc ~/Downloads/tor-0.4.6.10.tar.gz.sha256sum
For BSD/Linux users:
gpgv --keyring ./tor.keyring ~/Downloads/tor-0.4.6.10.tar.gz.sha256sum.asc ~/Downloads/tor-0.4.6.10.tar.gz.sha256sum
The result of the command should produce something like this (depending on which key signed it):
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 você receber mensagens de erro contendo 'Nenhum arquivo ou diretório', algo deu errado com uma das etapas anteriores ou você esqueceu que esses comandos usam nomes de arquivo de exemplo e o seu será um pouco diferente.
Você também pode aprender mais sobre GnuPG.
Verifying checksum
Now that we validated the signatures of the checksum, we need to verify the integrity of the package.
Para quem usa Windows:
certUtil -hashfile tor-0.4.6.10.tar.gz.sha256sum SHA256
Para usuários do macOS:
shasum -a 256 tor-0.4.6.10.tar.gz.sha256sum
For BSD/Linux users:
sha256sum -c tor-0.4.6.10.tar.gz.sha256sum