Verify a download

Check that an installer image is the one the project signed, before you write it to a stick. It takes about a minute.

What you're checking #

Two different things can go wrong with a download. It can be damaged on the way, and it can be replaced by someone. A checksum catches the first. Only a signature catches the second, because anyone who can replace the image can replace a checksum sitting next to it.

So each release has:

FileWhat it is
The image, ending in .isoWhat you install from
A .sig file with the same nameThe signature on that image
SHA256SUMSThe SHA-256 checksum of every file in the release
SHA256SUMS.sigThe signature on that list

The download page lists them for the current release. No release is published right now, so the file names below are examples of the pattern.

The signing key #

PartValue
NameStarchaser Linux Release Signing
Primary key30CE 16A9 011C 2554 4990 3F51 7787 1C86 D07D 98C0
Signing subkey7F00 9E4C C753 19FC 1D3A B76C 411C F005 5456 39A0
Public keystarchaser-release.asc

There are two fingerprints because the key has two parts. The primary key is the identity: it's the one you import and trust, and it's valid until 2036. It doesn't sign files itself. It certifies a signing subkey, and the subkey signs the installer images and SHA256SUMS. The subkey is valid until October 2028 and can be replaced without changing the primary key.

So when gpg checks a signature, the fingerprint it prints is the subkey's, the one starting 7F00 9E4C. That's correct. The primary key's fingerprint, starting 30CE 16A9, appears on the line after it.

The same key ships in the starchaser-keyring package and signs the packages in the Starchaser repository. If you already run Starchaser, you already have it.

On Linux #

1. Import the key and check its fingerprint #

curl -O https://starchaserlinux.org/keys/starchaser-release.asc
gpg --import starchaser-release.asc
gpg --fingerprint --with-subkey-fingerprint 30CE16A9011C255449903F5177871C86D07D98C0

gpg prints both fingerprints: the primary key under pub and the signing subkey under sub. Compare each with the one on this page, all 40 characters. If you can, compare it with a second source as well, such as the starchaser-keyring package on a computer that already runs Starchaser.

2. Check the signature on the checksum list #

gpg --verify SHA256SUMS.sig SHA256SUMS

A good result looks like this:

gpg: Signature made ...
gpg:                using EDDSA key 7F009E4CC75319FC1D3AB76C411CF005545639A0
gpg: Good signature from "Starchaser Linux Release Signing <[email protected]>"
Primary key fingerprint: 30CE 16A9 011C 2554 4990  3F51 7787 1C86 D07D 98C0
     Subkey fingerprint: 7F00 9E4C C753 19FC 1D3A  B76C 411C F005 5456 39A0

Three things to check: it says Good signature, the using line and the subkey fingerprint are the signing subkey above, and the primary key fingerprint is the primary key above. If the subkey is anything else, treat it as a failure.

gpg will also warn that the key is not certified with a trusted signature. That's expected: it means you haven't told gpg you trust this key, which is exactly why you compared the fingerprint yourself in step 1.

3. Check the image against the list #

sha256sum --check --ignore-missing SHA256SUMS

You want OK next to the image's name. --ignore-missing skips the files in the list that you didn't download.

Or check the image's own signature #

gpg --verify starchaser-VERSION-x86_64.iso.sig starchaser-VERSION-x86_64.iso

This does both jobs in one step, and takes a little longer on a large image.

On Starchaser #

The key is already in the system keyring, so one command does it:

pacman-key --verify starchaser-VERSION-x86_64.iso.sig starchaser-VERSION-x86_64.iso

If you make a recovery stick from Settings > Recovery, the signature and the checksum are checked for you before anything is written.

On macOS #

Install GnuPG first, for example with Homebrew (brew install gnupg). Steps 1 and 2 are the same as on Linux. For step 3, macOS has shasum instead of sha256sum:

shasum -a 256 --check --ignore-missing SHA256SUMS

On Windows #

Install Gpg4win, then run steps 1 and 2 in PowerShell. curl.exe is the name to use there. For step 3, compute the checksum and compare it with the line for your image in SHA256SUMS:

Get-FileHash .\starchaser-VERSION-x86_64.iso -Algorithm SHA256
Get-Content .\SHA256SUMS

The two values must be identical. Windows prints its value in capitals; that difference doesn't matter.

If it doesn't verify #

  • BAD signature means the file isn't what was signed. Delete it and download again. If it fails a second time, don't use it, and report it.
  • Can't check signature: No public key means the key isn't imported. Go back to step 1.
  • FAILED from the checksum means the download is damaged or incomplete. Download it again.

Never install from an image that failed.

Packages #

You rarely need to check a package by hand, because pacman verifies every package and the repository database against the keyring before it installs anything. To do it anyway, download the package and its .sig from a package's page and run:

gpg --verify PACKAGE.pkg.tar.zst.sig PACKAGE.pkg.tar.zst

Each package page also lists the SHA-256 recorded in the repository database.