# Verify a kosa8 download

Every kosa8 release ships `checksums.txt`, the SHA-256 of every file in the release, and a signature over it made with the kosa8 release key. Check the signature, then check your file against the checksum. The macOS and Linux install script does both for you.

## The keys

| Key | Signs | Fingerprint |
|---|---|---|
| [allowed_signers](https://kosa8.com/keys/allowed_signers) ([kosa8-release.pub](https://kosa8.com/keys/kosa8-release.pub)) | `checksums.txt`, as `checksums.txt.sshsig` | `SHA256:GRzbgilAN1oU4LtwNLRDlnhpPbhx9jGORY+uPZ7jkNo` (Ed25519) |
| [kosa8-release-rpm.asc](https://kosa8.com/keys/kosa8-release-rpm.asc) | the kosa8 `.rpm` packages | `075F D831 64B5 C9F6 1353 57C5 E755 1780 6DC4 02FC` (RSA 4096) |
| [kosa8-release.rsa.pub](https://kosa8.com/keys/kosa8-release.rsa.pub) | the kosa8 `.apk` packages | RSA 4096 |

The checksum key is also written into [install.sh](https://kosa8.com/install.sh), so the installer does not fetch it at run time. v0.22.0 is the first release signed with these keys. Earlier releases have only `checksums.txt`.

## Check the signature and the checksum

You need `ssh-keygen` from OpenSSH 8.1 or later. macOS has it, as do most Linux systems (Debian and Ubuntu: `openssh-client`; Alpine: `openssh-keygen`) and Windows 10 and 11 with the OpenSSH client.

```
$ v=v0.22.1
$ base=https://github.com/AzmxAI/kosa8-releases/releases/download/$v
$ curl -fsSLO $base/checksums.txt -O $base/checksums.txt.sshsig
$ curl -fsSLO https://kosa8.com/keys/allowed_signers
$ ssh-keygen -Y verify -f allowed_signers -I release@kosa8.com -n kosa8-release \
    -s checksums.txt.sshsig < checksums.txt
Good "kosa8-release" signature for release@kosa8.com with ED25519 key SHA256:GRzbgilAN1oU4LtwNLRDlnhpPbhx9jGORY+uPZ7jkNo
$ shasum -a 256 -c checksums.txt --ignore-missing     # sha256sum on Linux
kosa8_0.22.1_linux_amd64.tar.gz: OK
```

Anything other than `Good "kosa8-release" signature` means the checksums are not the ones kosa8 published. Do not install, and tell [contact@kosa8.com](mailto:contact@kosa8.com).

## What the installers do

- `install.sh` and `install.ps1` always check your download against `checksums.txt`, and refuse to install if the file or its line is missing or the digest differs.

- When the release has `checksums.txt.sshsig` and `ssh-keygen` can check it, `install.sh` checks it against the key built into the script, and refuses to install if it does not verify. Without a new enough `ssh-keygen` it says that the signature was not checked, and installs on the checksum alone.

- On Windows, check the signature by hand as above (Windows 10 and 11 have `ssh-keygen` with the OpenSSH client); `install.ps1` checks the checksum.

## Linux packages

The kosa8 `.rpm` and `.apk` are signed from v0.22.1 on. Import the key once, then the package tools check every kosa8 package:

```
$ sudo rpm --import https://kosa8.com/keys/kosa8-release-rpm.asc
$ rpm -K kosa8_*_linux_amd64.rpm                 # digests signatures OK
$ sudo curl -fsSL -o /etc/apk/keys/kosa8-release.rsa.pub https://kosa8.com/keys/kosa8-release.rsa.pub
$ sudo apk add ./kosa8_*_linux_amd64.apk         # no --allow-untrusted needed
```

The `.deb` packages and the Linux desktop packages are not signed on their own; check them with `checksums.txt` as above.

## macOS and Windows

The macOS binaries and **kosa8.app** are signed with a Developer ID and notarized by Apple. Check with `codesign -dv --verbose=2 "$(command -v kosa8d)"` and `spctl -a -vv -t install "$(command -v kosa8d)"`: the first names `Developer ID Application: Dhruvitkumar Talati (7HFZ59D953)`. Every Windows `.exe` is Authenticode-signed: right-click it, choose Properties, then Digital Signatures.

---
Source: https://docs.kosa8.com/guides/verify-release/
