Verify Virtual Machine Images on Linux

From Whonix
Jump to navigation Jump to search

Instructions for OpenPGP and Signify Verification of Whonix VirtualBox and KVM on the Command Line

Introduction[edit]

  • Digital signatures: A tool enhancing download security. Commonly used across the internet.
  • Learn more: Curious? Learn more about digital software signatures.
  • Optional: Digital signatures are optional. If you've never used them before, there might be no need to start now.
  • No worries: New to digital software signatures? It's okay, no need to worry.
  • Not a requirement: Not mandatory for using Whonix, but an extra security measure for advanced users.

OpenPGP

In order to verify the Whonix image, GnuPG must be installed. GnuPG is the common OpenPGP implementation for Linux: it is installed by default in Debian, Ubuntu, Whonix and many other distributions.

1. Import the signing key.

Whonix VirtualBox

Refer to the more secure, detailed Whonix Signing Key instructions.

Download Whonix VirtualBox Developer OpenPGP Key

2. Download the cryptographic (OpenPGP) signature corresponding to the virtual machine image you want to verify.

3. Save the signature in the same folder as the virtual machine image.

KVM

Refer to the more secure, detailed Whonix Signing Key instructions.

Download Whonix KVM Developer OpenPGP Key

2. Download the cryptographic (OpenPGP) signature corresponding to the virtual machine image you want to verify.

3. Save the signature in the same folder as the virtual machine image.

KVM Xfce image

KVM Xfce signature

4. Start the cryptographic verification.

This process can take several minutes.

cd [the directory in which you downloaded the .ova and the .asc]

VirtualBox

gpg --verify-options show-notations --verify Whonix-*.ova.asc Whonix-*.ova

KVM

gpg --verify-options show-notations --verify Whonix-*.libvirt.xz.asc Whonix-*.libvirt.xz

5. Check the output of the verification step.

If the file is verified successfully, the output will include Good signature, which is the most important thing to check.

VirtualBox

gpg: Good signature from "Patrick Schleizer"

KVM

gpg: Good signature from "HulaHoop"

This output might be followed by a warning as follows.

gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.

This message does not alter the validity of the signature related to the downloaded key. Rather, this warning refers to the level of trust placed in the Whonix signing key and the web of trust. To remove this warning, the Whonix signing key must be personally signed with your own key.

warning Remember to check the GPG signature timestamp. For instance, if you previously saw a signature from 2023 and now see one from 2022, this could indicate a potential rollback (downgrade) or indefinite freeze attack.[1]

Example of signature creation timestamp; see below.

gpg: Signature made Mon 19 Jan 2023 11:45:41 PM CET using RSA key ID ...

warning Remember: OpenPGP signatures sign the contents of files, not the file names themselves. [2]

The file@name OpenPGP notation in Whonix release signatures describes the file name. This helps to confirm that the file name has not been tampered with; see the example below.

VirtualBox

gpg: Signature notation: file@name=Whonix-17.1.3.1.ova

KVM

gpg: Signature notation: file@name=Whonix-17.0.3.0.libvirt.xz

If the Virtual Machine image is not correct, the output will inform that the signature is bad:

gpg: BAD signature

Do not continue if verification fails! This risks using infected or erroneous files! The whole point of verification is to confirm file integrity. This page is strongly related to the pages Placing Trust in Whonix and Verifying Software Signatures.

6. Done.

Digital software signature verification using OpenPGP has been completed.

Troubleshooting[edit]

When a GPG error is encountered, first try a web search for the relevant error. The security stackexchange websitearchive.org can also help to resolve GPG problems. Describe the problem thoroughly, but be sure it is GPG-related and not specific to Whonix.

More help resources are available on the Support page.

Signify

Info Advanced users only!

1. Download the signify Key and save it as derivative.pub.

2. Install signify-openbsd.

Install package(s) signify-openbsd.

A. Update the package lists and upgrade the systemarchive.org.

sudo apt update && sudo apt full-upgrade

B. Install the signify-openbsd package(s).

Using apt command line parameter --no-install-recommendsarchive.org is in most cases optional.

sudo apt install --no-install-recommends signify-openbsd

C. Done.

The procedure of installing package(s) signify-openbsd is complete.

3. Note.

It is impossible to signify sign images (.ova / libvirt.tar.xz) directly.archive.org You can only verify the .sha512sums hash sum file using signify-openbsd and then verify the image against the sha512 sum.

4. Download the .sha512sums and .sha512sums.sig files.

5. Verify the .sha512sums file with signify-openbsd.

signify-openbsd -Vp derivative.pub -m Whonix-*.sha512sums

If the signature is valid, it will output:

Signature Verified

If the signature is invalid, it will output an error.

6. Compare the hash of the image file with the hash in the .sha512sums file.

sha512sum --strict --check Whonix-*.sha512sums

If the hash is correct, it will output:

Whonix-Xfce-17.1.3.1.ova: OK

Do not continue if verification fails! This risks using infected or erroneous files! The whole point of verification is to confirm file integrity. This page is strongly related to the pages Placing Trust in Whonix and Verifying Software Signatures.

7. Done.

Digital signature verification using signify has been completed.

If you are using signify for software signature verification, please consider making a report in the signify-openbsd forum threadarchive.org. This will help developers decide whether to continue supporting this method or deprecate it.

Forum discussion: signify-openbsdarchive.org.

Footnotes[edit]

License[edit]

Whonix Verify the virtual machine images using Linux wiki page Copyright (C) Amnesia <amnesia at boum dot org>
Whonix Verify the virtual machine images using Linux wiki page Copyright (C) 2012 - 2023 ENCRYPTED SUPPORT LP <

This program comes with ABSOLUTELY NO WARRANTY; for details see the wiki source code.
This is free software, and you are welcome to redistribute it under certain conditions; see the wiki source code for details.

We believe security software like Whonix needs to remain open source and independent. Would you help sustain and grow the project? Learn more about our 12 year success story and maybe DONATE!