A assinatura digital é um processo que assegura que um certo pacote foi gerado pelos seus programadores e que não foi manipulado. Below we explain why it is important and how to verify that the Tor Browser 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 "signature" with the same name as the package and the extension ".asc". These .asc files are OpenPGP signatures. Estes permitem-lhe verificar se o ficheiro que transferiu é exatamente igual ao que nós queríamos que tivesse. This will vary by web browser, but generally you can download this file by right-clicking the "signature" link and selecting the "save file as" option.

Por exemplo, tor-browser-windows-x86_64-portable-13.0.1.exe é acompanhado pelo tor-browser-windows-x86_64-portable-13.0.1.exe.asc. These are example file names and will not exactly match the file names that you download.

Agora nós vamos mostrar-lhe como pode verificar a assinatura digital do ficheiro transferido em vários sistemas operativos. Por favor, note que a assinatura tem a mesma data em que o pacote foi assinado. Por isso, de cada vez que um novo ficheiro é enviado, é gerada uma nova assinatura com uma data diferente. Desde que tenha verificado a assinatura, não deve preocupar-se que estas datas não sejam iguais.

Instalação de GnuPG

Antes de mais, tem de instalar o GnuPG antes de poder verificar as assinaturas.

Para os utilizadores do Windows:

Se usar Windows, descarregue o Gpg4win e corra o seu instalador.

Para poder verificar a assinatura, terá de digitar uns comandos na linha de comandos do Windows, cmd.exe.

Para os utilizadores de macOS:

If you are using macOS, you can install GPGTools.

Para poder verificar a assinatura, terá de digitar uns comandos no Terminal (sob "Applications").

Para os utilizadores de GNU/Linux:

Se estiver a usar GNU/Linux, então provavelmente já tem o GnuPG no seu sistema, visto que a maioria das distribuições GNU/Linux vêm com o GnuPG pré-instalado.

Para poder verificar a assinatura, terá de digitar uns comandos numa janela do terminal. Como o fazer vai variar consoante a sua distribuição.

Obtendo a chave dos desenvolvedores do Tor

A equipa do Tor Browser assina os lançamentos do Tor Browser. Importe a chave de assinatura dos 'Programadores' do Tor Browser (0xEF6E286DDA85EA2A4BA7DE684E2C6E8793298290):

gpg --auto-key-locate nodefault,wkd --locate-keys torbrowser@torproject.org

Isto deve mostrar-lhe algo como:

gpg: key 4E2C6E8793298290: public key "Tor Browser Developers (signing key) <torbrowser@torproject.org>" imported
gpg: Número total processados: 1
gpg:               imported: 1
pub   rsa4096 2014-12-15 [C] [expires: 2025-07-21]
      EF6E286DDA85EA2A4BA7DE684E2C6E8793298290
uid           [ desconhecido] Tor Browser - Programadores (chave de assinatura) <torbrowser@torproject.org>
sub   rsa4096 2018-05-26 [S] [expires: 2020-12-19]

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.

After importing the key, you can save it to a file (identifying it by its fingerprint here):

gpg --output ./tor.keyring --export 0xEF6E286DDA85EA2A4BA7DE684E2C6E8793298290

This command results in the key being saved to a file found at the path ./tor.keyring, i.e. in the current directory. If ./tor.keyring doesn't exist after running this command, something has gone wrong and you cannot continue until you've figured out why this didn't work.

Verificação da assinatura

Para verificar a assinatura do pacote que transferiu, terá de transferir o ficheiro de assinatura ".asc" correspondente, bem como o próprio ficheiro instalador, e verificá-lo com um comando que solicita GnuPGP para verificar o ficheiro que transferiu.

Os exemplos abaixo assumem que descarregou estes dois ficheiros para a sua pasta de Downloads. Note that these commands use example file names and yours will be different: you will need to replace the example file names with exact names of the files you have downloaded.

For Windows users (change x86_64 to i686 if you have the 32-bit package):

gpgv --keyring .\tor.keyring Downloads\tor-browser-windows-x86_64-portable-13.0.1.exe.asc Downloads\tor-browser-windows-x86_64-portable-13.0.1.exe

Para os utilizadores de macOS:

gpgv --keyring ./tor.keyring ~/Downloads/tor-browser-macos-13.0.1.dmg.asc ~/Downloads/tor-browser-macos-13.0.1.dmg

For GNU/Linux users (change x86_64 to i686 if you have the 32-bit package):

gpgv --keyring ./tor.keyring ~/Downloads/tor-browser-linux-x86_64-13.0.1.tar.xz.asc ~/Downloads/tor-browser-linux-x86_64-13.0.1.tar.xz

The result of the command should contain:

gpgv: Good signature from "Tor Browser Developers (signing key) <torbrowser@torproject.org>"

If you get error messages containing 'No such file or directory', either something went wrong with one of the previous steps, or you forgot that these commands use example file names and yours will be a little different.

Refreshing the PGP key

Run the following command to refresh the Tor Browser Developers signing key in your local keyring from the keyserver. This will also fetch the new subkeys.

gpg --refresh-keys EF6E286DDA85EA2A4BA7DE684E2C6E8793298290

Contornar (utilização de uma chave pública)

Se encontrar erros que não consegue arranjar, esteja à vontade para descarregar e usar esta chave pública. Em alternativa, pode usar o comando seguinte:

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

Tor Browser Developers key is also available on keys.openpgp.org and can be downloaded from https://keys.openpgp.org/vks/v1/by-fingerprint/EF6E286DDA85EA2A4BA7DE684E2C6E8793298290. 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 EF6E286DDA85EA2A4BA7DE684E2C6E8793298290

Também pode saber mais sobre o GnuPG.