---
title: "pq_audit: a free tool to check whether your servers and laptops already use post-quantum cryptography, and what to do with the results"
date: "2026-12-06T11:00:00+00:00"
modified: "2026-12-05T21:54:03+00:00"
author: "David Carrero"
section: "Cloud"
canonical: "https://cloudnews.tech/pq-audit-post-quantum-cryptography-audit-ssh-tls-openssl/"
site: "Cloud News"
---

# pq_audit: a free tool to check whether your servers and laptops already use post-quantum cryptography, and what to do with the results

> pq_audit is a dependency-free Python script that checks whether SSH, OpenSSL, TLS connections and disk encryption on OpenBSD, FreeBSD, macOS and Linux are ready for post-quantum cryptography. What it checks, how to use it and what to fix first.

**Knowing whether a machine is ready for post-quantum cryptography is not a matter of checking the OS version. You need to see which algorithms SSH actually offers, which TLS groups the installed OpenSSL knows, what real connections negotiate and which keys are used for authentication. That is what pq_audit tries to gather: a Python script published on December 4 by developer Dmitry Kalashnikov under a BSD license. Here is what it checks, how to use it in an audit without surprises and what to do with what it finds.**

## Key points in 30 seconds

- **What it is:** a read-only auditor for OpenBSD, FreeBSD, macOS and Linux, in a single Python 3.10 file with no external dependencies and no need for root.
- **What it checks:** OpenSSL, the SSH client and server, SSH public keys, the certificates and TLS connections you point it at, and disk encryption.
- **What it does not check:** your application code, dependencies, cloud accounts, KMS, firmware or containers.
- **Why now:** NIST’s final roadmap, published in October, deprecates RSA and elliptic curves after 2030 and disallows them in its standards after 2035.
- **Caveat:** a one-person project with a single release (1.0.0), only days old. Read the code before running it in production.

## Why a cryptographic inventory is needed now

The most urgent risk is “harvest now, decrypt later”. An attacker can record an SSH or TLS session protected by classical key exchange today and keep it until a quantum computer can break it. For data that must stay secret for years, the problem starts the day it is captured.

The official timelines are set. On October 27 NIST published the final version of IR 8547: quantum-vulnerable public-key algorithms (RSA, ECDSA, EdDSA and Diffie-Hellman, including elliptic-curve variants) are deprecated after 2030 and disallowed in its standards after 2035. The EU’s coordinated roadmap asks for high-risk systems to migrate before 2030 and the rest before 2035, and the UK’s NCSC sets 2028 for completing discovery. NIST also notes that previous cryptographic transitions took 10 to 20 years. We covered the enterprise side in our [post-quantum roadmap for enterprises](https://cloudnews.tech/post-quantum-cryptography-roadmap-enterprises/). Every guide starts the same way: find out where cryptography is used and which kind.

## What pq_audit checks

The script runs tools already on the system (openssl, ssh, sshd, fdesetup, lsblk, geli or zfs, depending on the OS) and parses their output. It does not infer anything from version numbers: if OpenSSL does not list an algorithm, the auditor treats it as absent.

| Area | What it checks | Limit acknowledged by the author |
| --- | --- | --- |
| OpenSSL | KEMs, signatures and TLS groups listed by the selected OpenSSL, and its providers | Only that binary’s capability, not each application’s |
| SSH client | Supported algorithms and defaults | Does not evaluate your ssh_config (to avoid running Match exec) |
| SSH server | On-disk configuration via sshd -G | Does not test the running service or every Match block |
| SSH public keys | Algorithm of .pub files (up to 100) | A key existing does not mean it is used |
| SSH sessions | Negotiated key exchange, from a debug log you provide | Historical evidence only |
| X.509 certificates | Key algorithm and issuer signature in a PEM file | Does not validate chain or revocation |
| TLS connections | Group negotiated in a verified handshake | Only with –tls, against services you name |
| Disks | FileVault, GELI, ZFS or LUKS depending on the OS | One encrypted volume does not mean the whole machine is covered |

It uses closed lists to call a key exchange post-quantum. For SSH it recognizes *mlkem768x25519-sha256* and *sntrup761x25519-sha512*; for TLS, groups such as *X25519MLKEM768*, *SecP256r1MLKEM768* or *SecP384r1MLKEM1024*; and for SSH signatures, the new *ssh-mldsa44-ed25519*. Anything not on the list is reported as unknown, never as approved.

## How to use it in an audit

No installation is required: clone the repository and run it with Python 3.10 or later. These are the documented uses:

```
python3 pq_audit.py
python3 pq_audit.py --format json --output baseline.json
python3 pq_audit.py --tls service.example.com:443
python3 pq_audit.py --ssh-log ssh-debug.log --certificate server.pem
python3 pq_audit.py --fail-on action
```

- **It only makes network connections with –tls**, and you should use it only against services you are allowed to test.
- **For SSH, capture a real connection yourself** with ssh -vv and pass the log. The author recommends disabling connection multiplexing and never disabling host key checking to make the test pass.
- **Save a JSON report before and after** each change. Files are created owner-only and the script refuses to overwrite an existing one. Treat them as confidential anyway: they include paths and service names.
- **In CI**, –fail-on action returns exit code 1 if it finds something to fix.

## Reading the report

Each finding gets one of four states: **pq_ready** (that specific item uses or supports a recognized post-quantum algorithm, never a verdict on the whole machine), **action** (classical-only, should be fixed, or FileVault off), **review** (fallback to classical allowed or information missing) and **info** (inventory only). The author stresses that exit code 0 only means the report was generated. It is not a pass.

## What to fix first

### Now: key exchange

- **SSH.** OpenSSH has used hybrid post-quantum key exchange by default since 9.0, and since 10.0 the preferred one is *mlkem768x25519-sha256*. If SSH gets flagged, the usual cause is an old version at one end or a KexAlgorithms list “hardened” years ago that excludes the new algorithms. We saw a real case in [Macs managing cloud servers](https://cloudnews.tech/managing-cloud-servers-from-a-mac-your-ssh-sessions-may-not-be-post-quantum/).
- **TLS.** OpenSSL 3.5 offers *X25519MLKEM768* by default in the TLS 1.3 handshake. That the openssl tool supports it does not mean your reverse proxy, application or service runtime does: every TLS termination point, including cloud load balancers and CDNs, has to be updated and the real negotiation checked.
- **Unencrypted disks.** Symmetric encryption (AES) does not fall to Shor’s algorithm, but a laptop without FileVault or LUKS is a problem today, quantum or not.

### With a plan: authentication

RSA, ECDSA and Ed25519 keys used to authenticate servers and users are still classical, and bumping RSA to 4096 bits does not change that. OpenSSH 10.6, released October 6, enabled the hybrid *ssh-mldsa44-ed25519* signature; its release notes warn that keys created with the earlier experimental implementation (with the @openssh.com suffix) must be regenerated or removed. Test first with a new user key on a lab server and always keep a recovery path. The same applies to TLS: a post-quantum group does not make the certificate chain post-quantum, which is where moves like [Let’s Encrypt’s post-quantum certificates](https://cloudnews.tech/lets-encrypt-post-quantum-certificates-february-2027-cdn-load-balancers-kubernetes/) come in.

## What it does not cover

The author is explicit: it does not scan the file system for cryptography, review application code or dependencies, touch cloud accounts, KMS, HSMs, containers, firmware or Secure Boot, or fix anything. A full inventory needs other pieces, such as **CycloneDX CBOM** to document the algorithms, keys and certificates of each component, **ssh-audit**, which according to its release notes already flags non-post-quantum SSH key exchanges, and a manual **openssl s_client** test forcing *X25519MLKEM768* against a service.

## Before running it in production

The approach is cautious: read-only, no root, no telemetry, no automatic network scans, with each test’s limits documented. Still, the repository was created on December 4, has a single release, a handful of stars and one author, and has not been independently audited. We have not run it. It is a roughly 44 KB file that is easy to read, so the sensible path is to review it, try it on a lab machine and then use its reports as one more piece of evidence in your inventory.

## FAQ

### Does it work on Windows?

No. According to its code it only runs on OpenBSD, FreeBSD, macOS and Linux, and exits with an error elsewhere.

### If everything shows pq_ready, is my machine protected?

Not necessarily. Each result covers only what was checked, and applications, cloud services and certificate-based authentication are left out.

### Does it need admin rights or internet access?

According to its documentation, it does not require root and only opens network connections with the –tls option.

**Sources:** [pq_audit repository](https://github.com/klimb/post-quantum-crypto-safety-check) (README, ARTICLE.md and code); [OpenSSH post-quantum cryptography](https://www.openssh.com/pq.html); [OpenSSH 10.6 release notes](https://www.openssh.com/txt/release-10.6); [OpenSSL 3.5 news](https://github.com/openssl/openssl/blob/openssl-3.5/NEWS.md); [Help Net Security on NIST IR 8547](https://www.helpnetsecurity.com/2026/10/28/nist-post-quantum-cryptography-migration-roadmap/); [AWS summary of regulatory timelines](https://aws.amazon.com/security/post-quantum-cryptography/migrating-to-post-quantum-cryptography/); [CycloneDX CBOM](https://cyclonedx.org/capabilities/cbom/); [ssh-audit](https://github.com/jtesta/ssh-audit/releases); OpenSecurity, [Un auditor gratuito para saber si tus servidores ya usan criptografía poscuántica](https://www.opensecurity.es/pq-audit-auditor-criptografia-poscuantica-ssh-tls-openssl/) (Spanish).

---

Source: https://cloudnews.tech/pq-audit-post-quantum-cryptography-audit-ssh-tls-openssl/
