Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 124 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,130 @@ rejection, trust/name validation and MQTT authentication/ACLs. Network/setup
errors never count as successful rejection. See [server-test instructions and
result meanings](docs/server-tests.md), including prerequisites and exit codes.

## Example live test output

Captured on **3 December 2026** against the Dynamic Devices lab: **16 passed,
0 failed, 0 errors**. Timings and certificate lifetime below are a snapshot,
not current monitoring. Interactive terminals colour PASS green, FAIL red and
ERROR amber; this Markdown example is plain text. Use `--color always` to
force terminal colour or `--color never` to disable it.

<details>
<summary>Show the full report, including protocols and verified certificate details</summary>

```text
PQC SERVER CHECK
────────────────────────────────────────────────────────────────────────────────────────────────────
16 PASS | 0 FAIL | 0 ERROR
Server: mqtt.dynamicdevices.co.uk
Client CLI: OpenSSL 3.5.5 27 Jan 2026 (Library: OpenSSL 3.5.5 27 Jan 2026)
Python TLS: OpenSSL 3.5.5 27 Jan 2026

HTTPS :8090
────────────────────────────────────────────────────────────────────────────────────────────────────
Protocol: HTTP/1.1 / HTTP 200
Transport: TLSv1.3
Hybrid group: X25519MLKEM768
TLS authentication: mldsa65
Cipher: TLS_AES_256_GCM_SHA384
Certificate subject: commonName=mqtt.dynamicdevices.co.uk
Issued by: commonName=Dynamic Devices PQC Test CA
DNS / SAN: DNS:mqtt.dynamicdevices.co.uk
Certificate algorithms: key ML-DSA-65; signature ML-DSA-65
Valid from: Dec 3 14:39:22 2026 GMT
Expires: Jan 2 14:39:22 2027 GMT (29 full days remaining)
Leaf SHA256: 91e46ac6a90bd5886b529a1ccd58fe189861673e554b6dae5f50b5210129afc7
Trust: CA chain and hostname verified against supplied lab CA

RESULT TEST TIME
PASS HTTPS PQC TLS 223 ms
Observed: TLS1.3; X25519MLKEM768; mldsa65; TLS_AES_256_GCM_SHA384
Means: Verified hybrid key exchange AND ML-DSA-65 server authentication.

PASS HTTPS reject classical group 102 ms
Observed: Expected rejection — Server sent fatal TLS rejection alert
Means: X25519-only key exchange must fail: no classical-only fallback.

PASS HTTPS reject classical signature 103 ms
Observed: Expected rejection — Server sent fatal TLS rejection alert
Means: RSA-only authentication must fail: ML-DSA-65 capability is required.

PASS HTTPS reject TLS1.2 111 ms
Observed: Expected rejection — Server sent fatal TLS rejection alert
Means: Older TLS protocol must fail: this listener requires TLS1.3.

PASS HTTPS reject wrong name 101 ms
Observed: Expected rejection — Certificate verification rejected (code 62)
Means: Client must reject a certificate for another DNS name.

PASS HTTPS reject untrusted CA 106 ms
Observed: Expected rejection — Certificate verification rejected (code 19)
Means: Client with an empty trust store must reject the lab chain.

PASS HTTPS page 255 ms
Observed: HTTP 200; page matched; group 0x11ec; leaf SHA256 91e46ac6a90bd588…; expires Jan 2
14:39:22 2027 GMT
Means: A verified Python TLS connection transfers the expected lab page.


MQTTS / MQTT :8890
────────────────────────────────────────────────────────────────────────────────────────────────────
Protocol: MQTT 5 / QoS 1 / exact payload delivered
Transport: TLSv1.3
Hybrid group: X25519MLKEM768
TLS authentication: mldsa65
Cipher: TLS_AES_256_GCM_SHA384
Certificate: Same verified leaf as HTTPS :8090

RESULT TEST TIME
PASS MQTTS PQC TLS 202 ms
Observed: TLS1.3; X25519MLKEM768; mldsa65; TLS_AES_256_GCM_SHA384
Means: Verified hybrid key exchange AND ML-DSA-65 server authentication.

PASS MQTTS reject classical group 101 ms
Observed: Expected rejection — Server sent fatal TLS rejection alert
Means: X25519-only key exchange must fail: no classical-only fallback.

PASS MQTTS reject classical signature 91 ms
Observed: Expected rejection — Server sent fatal TLS rejection alert
Means: RSA-only authentication must fail: ML-DSA-65 capability is required.

PASS MQTTS reject TLS1.2 108 ms
Observed: Expected rejection — Server sent fatal TLS rejection alert
Means: Older TLS protocol must fail: this listener requires TLS1.3.

PASS MQTTS reject wrong name 116 ms
Observed: Expected rejection — Certificate verification rejected (code 62)
Means: Client must reject a certificate for another DNS name.

PASS MQTTS reject untrusted CA 106 ms
Observed: Expected rejection — Certificate verification rejected (code 19)
Means: Client with an empty trust store must reject the lab chain.

PASS MQTT publish/subscribe 604 ms
Observed: MQTT5; QoS1; 58 bytes delivered exactly; group 0x11ec
Means: Real authenticated delivery, not merely a successful TLS handshake.

PASS MQTT reject bad password 227 ms
Observed: Expected rejection — CONNACK 0x87: bad credentials/not authorised
Means: TLS encryption does not replace MQTT authentication.

PASS MQTT reject forbidden topic 357 ms
Observed: Expected rejection — PUBACK 0x87: Not authorised
Means: Test user may publish to lab/#, not arbitrary broker topics.


HOW TO READ THIS
────────────────────────────────────────────────────────────────────────────────────────────────────

PASS on a rejection test means the unwanted connection was refused for the expected reason.
FAIL means the expected behaviour was not observed.
ERROR means no security conclusion: fix client setup/network and rerun.
These tests are not a compliance certificate.
```

</details>

## What has been tested

The following results come from the original local experiments. Ported-source
Expand Down
28 changes: 26 additions & 2 deletions docs/server-tests.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Test a running strict-PQC lab

`server_test.py` prints a table of 16 tests, their observations and what each
result means. Only run it against a lab you are authorised to test. It publishes
result means. HTTPS and MQTTS/MQTT have separate sections, with a colour-coded
summary at the top. Each test has a result/name/timing row, followed by wrapped
`Observed` and `Means` lines. Expected rejections are explicitly labelled.
Output fits the terminal width (40–120 columns). Only run it against a lab you
are authorised to test. It publishes
a small message on a unique `lab/pqc-check/…` topic and attempts a forbidden
publish. Do not point it at a production broker.

Expand Down Expand Up @@ -35,10 +39,30 @@ mechanism; do not put its value in shell command history. A command-line
read/write access to `lab/#`, but no access to `forbidden/#`.

Use `--openssl /path/to/openssl` for a specific executable. Add `--json` for
structured results and environment versions, without credentials.
structured results, environment versions and verified endpoint/certificate
details, without credentials. Existing `environment` and `tests` fields are
retained; `endpoints` is an additional field.
Exit codes: **0** all pass; **1** a behaviour failed; **2** setup, transport or
client errors (including runs which also have failures).

## Colours, protocols and certificates

Interactive terminals use green **PASS**, red **FAIL**, amber **ERROR** and cyan
section headings. Status words remain visible without colour. Redirection,
`NO_COLOR` and `TERM=dumb` disable automatic colour. Override with
`--color always` or `--color never`; `--json` never contains colour escapes.

Each endpoint shows the observed application protocol (HTTP version/status or
MQTT5/QoS1), TLS version, cipher, hybrid key exchange and TLS handshake signature.
Certificate information comes from the actual CA/name-verified Python TLS peer:
subject, issuer, DNS SANs, public-key algorithm, certificate-signature algorithm,
validity dates, full days remaining and full leaf SHA256 fingerprint. The TLS
handshake signature and X.509 certificate signature are labelled separately.
If both endpoints present the same leaf, its details are shown once and the
other endpoint references it. Missing verified information is not filled in
from an expected/configured profile. This is leaf inspection, not a complete
certificate-chain or revocation audit.

## Reading the results

| Test | Expected observation | What it establishes |
Expand Down
Loading