Stafræn undirritun er ferli sem á að tryggja að tiltekinn pakki hafi verið útbúinn af hönnuðum hans og að ekki hafi verið átt við hann af utanaðkomandi aðilum. Hér fyrir neðan munum við útskýra hvers vegna það er svo mikilvægt og hvernig eigi að fara að því að sannreyna að Tor-vafrinn sem þú nærð í sé raunverulega það sem við sem við bjuggum til og að því hafi ekki verið breytt af einhverjum snuðrara.

Hverri skrá á niðurhalssíðunni okkar fylgir skrá merkt "signature" með sama nafn og viðkomandi forritspakki en með skráarendinguna ".asc". Þessar .asc skrár eru OpenPGP-undirritanir. Þær gera þér kleift að sannprófa að skráin sem þú sækir sé nákvæmlega sú skrá sem við ætluðumst til að þú fengir. 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.

Til dæmis, með tor-browser-windows-x86_64-portable-13.0.1.exe fylgir skráin 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.

Nú skulum við sýna þér hvernig þú getur sannreynt stafræna undirritun á niðurhalaðri skrá í mismunandi stýrikerfum. Athugaðu að undirritunin er dagsett á þeirri stundu sem pakkinn er undirritaður. Þess vegna er útbúin ný undirritun með annarri dagsetningu í hvert skipti sem ný skrá er send inn. Ef þú hefur sannreynt undirritunina þarftu ekki að hafa áhyggjur af því að munur sé á uppgefnum dagsetningum.

Uppsetning GnuPG

Fyrst af öllu þarftu að vera með GnuPG uppsett áður en þú getur staðfest undirritanir.

Fyrir notendur Windows :

Ef þú ert að nota Windows, þá geturðu sótt Gpg4win og keyrt uppsetningarforrit þess.

Til að staðfesta undiritunina þarftu að skrifa inn nokkrar skipanir á skipanalínu Windows, cmd.exe.

Fyrir notendur macOS:

Ef þú ert að nota macOS, geturðu sett upp GPGTools.

Til að staðfesta undiritunina þarftu að skrifa inn nokkrar skipanir á skipanalínu Terminal (undir "Applications").

Fyrir notendur GNU/Linux:

Ef þú ert að nota GNU/Linux, þá er GnuPG að öllum líkindum þegar uppsett á kerfinu þínu, þar sem flestar GNU/Linux dreifingar koma með það foruppsett.

Til að staðfesta undiritunina þarftu að skrifa inn nokkrar skipanir á skipanalínu. Hvernig það er gert fer eftir dreifingunni þinni.

Fetching the Tor Developers key

Þróunarteymi Tor-vafrans undirritar allar útgáfur hans. Import the Tor Browser Developers signing key (0xEF6E286DDA85EA2A4BA7DE684E2C6E8793298290):

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

Það ætti að sýna þér eitthvað á borð við þetta:

gpg: key 4E2C6E8793298290: public key "Tor Browser Developers (signing key) <torbrowser@torproject.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1
pub   rsa4096 2014-12-15 [C] [expires: 2025-07-21]
      EF6E286DDA85EA2A4BA7DE684E2C6E8793298290
uid           [ unknown] Tor Browser Developers (signing key) <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.

Sannreyna undirritunina

To verify the signature of the package you downloaded, you will need to download the corresponding ".asc" signature file as well as the installer file itself, and verify it with a command that asks GnuPG to verify the file that you downloaded.

The examples below assume that you downloaded these two files to your "Downloads" folder. 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

Fyrir notendur 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

Hjáleið (með því að nota dreifilykil)

If you encounter errors you cannot fix, feel free to download and use this public key instead. Alternatively, you may use the following command:

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. Ef þú ert að nota MacOS eða GNU/Linux, er hægt að sækja lykilinn með því að keyra eftirfarandi skipun:

gpg --keyserver keys.openpgp.org --search-keys EF6E286DDA85EA2A4BA7DE684E2C6E8793298290

Þú gætir viljað sjá meira um GnuPG.