Skip to content

Verifying the Image

Sam Bent edited this page Jul 16, 2026 · 23 revisions

Verifying the Image

You're about to run software that protects where you are. You shouldn't have to trust that the image on the registry is really the one built from the public source. This page shows how to check.

There are two independent things you can verify: that the image was signed by the maintainer, and that it was built from the public source and nothing else.

Where to get it

The image lives on the maintainer's own registry and is mirrored on Docker Hub:

docker pull sambent.dev/sam/hiddenforge:2.0.2
# or the mirror:
docker pull doingfedtime/hiddenforge:2.0.2

Both resolve to the same content, identified by a digest that starts with sha256:0608533f…. The digest, not the tag, is what the signatures are over.

1. Check the signatures

The release is signed three separate ways, on purpose, with no dependency on any outside transparency log or third-party service. The verification material lives in the signatures/ folder of the code repository.

Maintainer key (cosign)

Grab the public key from the repo and verify:

cosign verify \
  --key cosign.pub \
  --insecure-ignore-tlog=true \
  sambent.dev/sam/hiddenforge:2.0.2

--insecure-ignore-tlog=true is intentional: these signatures are deliberately kept out of any public transparency log. A successful check confirms the image digest was signed by the maintainer's key.

Post-quantum signature (ML-DSA-65)

A second signature uses ML-DSA-65, a signature scheme standardized for the era of quantum computers (FIPS 204). Using the files in signatures/:

pqsign verify \
  --pub hiddenforge-mldsa.pub \
  --sig hiddenforge.digest.mldsa \
  --in  hiddenforge.digest

Hardware key (YubiKey / SSH-FIDO2)

The third signature was made by a physical security key, so it can't be produced by software alone:

ssh-keygen -Y verify \
  -f allowed-signers \
  -I sam@sambent.com \
  -n file \
  -s hiddenforge.digest.sig \
  < hiddenforge.digest

All three sign the same image digest. Any one of them confirms authenticity; together they cover different kinds of risk (a leaked software key, a future quantum attack, and impersonation without the hardware token).

2. Reproduce the build yourself

Signatures tell you who signed the image. A reproducible build tells you what's in it: that it was built from the public source and nothing was slipped in along the way.

HiddenForge builds reproducibly. Build the same source commit twice, on any machine, and you get a byte-for-byte identical image: same digest. That's only possible because the build strips out the few things that normally vary between builds (timestamps, package-manager bookkeeping), so the result depends only on the source.

To check it yourself, build the source twice and compare the resulting image digests:

# from a checkout of the source, on a buildx builder:
SOURCE_DATE_EPOCH=$(git log -1 --format=%ct) \
docker buildx build \
  --no-cache --platform linux/amd64 \
  --build-arg SOURCE_DATE_EPOCH=$(git log -1 --format=%ct) \
  --output type=oci,dest=build1.tar,rewrite-timestamp=true .
# build again into build2.tar the same way, then compare the two digests

Two builds that produce the same digest prove the process is deterministic. When a release documents its build command and expected digest, you can rebuild it and confirm the published image matches the public source, with no trust in the maintainer required.

Note: reproducibility landed in the build after the first 2.0.2 image was published, so a from-source rebuild matches the published digest from the reproducible release onward. The signatures above cover the currently published image today.

If a check fails

If a signature doesn't verify, or a rebuild doesn't match a release's documented digest, do not run the image. Stop and ask on the project's channels. A failed check is exactly the signal this is here to give you.

Clone this wiki locally