# Post-Quantum Readiness

Which connections of an environment use post-quantum key exchange, measured by Brewless with a TLS handshake, and what a certificate is judged on.


An attacker can record encrypted traffic today and decrypt it once a large enough quantum computer exists ("harvest now, decrypt later"). The key exchange of a TLS connection decides whether that works. **Post-Quantum Readiness** shows, for every environment, which of the connections Brewless runs use a post-quantum key exchange, as measured, and what rests on a provider's word instead.

Open it on the **Shield** page of the console, under **Quantum**. Whoever may see the applications may see it; starting a scan takes the right to manage them.

## Key exchange and certificates are judged apart

A connection has two parts that a quantum computer would attack differently:

- **Key exchange.** A hybrid group such as `X25519MLKEM768` combines a classical exchange with ML-KEM (FIPS 203). Traffic exchanged this way stays protected even if it is recorded now. This can be measured, and it is what decides whether a connection is **Protected**.
- **The certificate.** It proves who the server is at the moment of the handshake, so it cannot be broken after the fact. No browser accepts a post-quantum certificate yet, so every certificate on the public web is classical. Brewless judges a certificate on its classical strength and on what browsers are about to refuse, and never calls it post-quantum.

## Which connections are checked

Only connections Brewless itself set up for the environment. You cannot type in a name to scan.

| Connection | What it is | How it is judged |
| --- | --- | --- |
| Visitor to bunny.net | Your domains on the pull zone, and the pull zone's own `b-cdn.net` name | Measured |
| Visitor to Scaleway | The preview address, a domain routed straight to the container, or the container itself when there is no pull zone | Measured |
| bunny.net to Scaleway | The container's own name, where bunny.net connects to the origin | Measured from Brewless; that bunny.net offers the hybrid group there rests on bunny.net's statement |
| Application to object storage | The S3 endpoint of the environment's region, when it has a bucket | Measured |
| Application to database | The environment's database, when Brewless made one | From the environment's settings only |

A scan does not contact the database: a handshake could wake a Serverless SQL Database. Brewless reads the `sslmode` the application uses from the environment's variables, in memory, and keeps only that mode. The database connection is therefore always **Unknown**, and an environment with a database is never shown as protected end to end.

Wildcard domains have no single address and are listed as not scanned. A scan covers at most 12 names; the rest are listed as not scanned too.

## How a scan works

For each name, Brewless looks up its address once and only connects when every address of the name is on the public internet. It then opens up to three TLS handshakes with `openssl s_client`, from the Brewless application itself, each with a timeout of 8 seconds:

1. As a current browser does: the hybrid groups first, then the classical ones. The server picks.
2. Only when the server picked a classical group: again with only the post-quantum groups, to see whether the server supports one at all.
3. For a visitor's connection: with TLS 1.1, to see whether old versions are still accepted. Not towards the origin, where only bunny.net connects.

Nothing is sent over the connection after the handshake: no page is requested, so your application is not measured and no request reaches it. The scanner needs OpenSSL 3.5 or later to offer post-quantum groups; when it cannot, the page says so and those connections are **Unknown**, never safe or unsafe.

A scan runs when someone who manages the applications starts it with **Scan now**, and once by itself:

- two minutes after a release goes live,
- when a domain becomes active or points at Brewless again,
- two minutes after bunny.net issued a certificate for a domain.

There is no schedule. A second request while a scan waits or runs gets that scan. After a scan started by hand, the next one can be started after 5 minutes. Starting a scan is recorded in the audit trail.

## Statuses

| Status | Means |
| --- | --- |
| Protected | Negotiated a quantum-safe key exchange, with TLS 1.0 and 1.1 refused and no problem with the certificate |
| Partially protected | Post-quantum key exchange, but the server picks a classical group when it may, still accepts TLS 1.0 or 1.1, or has a certificate problem. For an environment: some connections are protected and others are not |
| Not protected | Measured, and the server knows no post-quantum group |
| Unknown | Could not be measured, or is judged from settings only |

A pre-standard group such as `X25519Kyber768Draft00`, or a group Brewless does not know, never counts as quantum-safe.

## Score

Every measured connection gets a score of 100, by policy `pq-2026.12`:

| Part | Points |
| --- | --- |
| Key exchange | 50 for a quantum-safe group a browser gets; 35 when the server supports one but picks a classical one; 0 otherwise |
| Protocol | 15 for TLS 1.3 with TLS 1.0 and 1.1 refused; 10 when that could not be checked; 5 otherwise |
| Certificate trusted and not expired | 15 |
| Certificate key | 10 for ML-DSA or SLH-DSA; 8 for ECDSA P-384 or P-521, or RSA of 3072 bits or more; 5 for ECDSA P-256, RSA-2048 or EdDSA |
| Chain | 5 when no CA in the chain has a P-256 key and none is signed with SHA-1 or MD5 |
| Lifetime | 5 when more than 14 days are left and the certificate lives 200 days or less |

The environment's score is the average of its measured connections, where a visitor's connection counts three times, the origin twice and storage once. A connection that could not be measured has no score and does not pull the average up or down; it does keep the environment from being protected end to end.

The policy has a version. A scan keeps the version it was judged by, and scans are only compared within one version.

> [!NOTE]
> Chrome stops trusting CA keys on P-256 from 15 March 2027. A chain with such a CA is shown as a problem now, so there is time to act.

## What changed, and mail

Each scan is compared with the scan before it. The page lists what changed: post-quantum key exchange gained or lost, a worse status, an origin that is no longer protected, a new certificate problem, a renewed certificate, a changed protocol or group, a connection added or removed, and a score that dropped by 5 points or more. A connection that could not be reached is not counted as lost protection.

When something got worse, the owners and admins of the organisation get a mail. The first scan of an environment never sends one.

## What Brewless sets for you

Three settings make the connections stronger. None of them changes the key exchange, which the providers decide:

- **The certificate's key at bunny.net.** Brewless asks for an ECDSA key for every domain it adds, before the first certificate is issued. A domain on RSA can be switched on the **Domains** block; see [Key type](/running/domains#key-type). bunny.net states that it issues a certificate with a P-256 key again with an ECDSA P-384 key. On 4 December 2026 Brewless measured otherwise: bunny.net issued `second.test.brewless.eu` a new certificate that day, again with a P-256 key. Asking bunny.net for a new certificate therefore does not give a stronger key today, and Brewless offers no button for it.
- **bunny.net checks the origin's certificate.** A deploy turns on bunny.net's *Verify origin SSL* for the pull zone when the origin is a Scaleway container and the newest scan of the last 30 days verified the origin's certificate. Without such a scan nothing changes, so a deploy never makes the edge refuse an origin it cannot check. Brewless never turns the setting off; it is listed with the other edge settings the deploy changed.
- **The application checks the database's certificate.** By default a Laravel application encrypts the connection to its database (`sslmode=require`) without checking whose certificate it gets. On the database's row of a scan, someone who manages the applications can choose **Check the database's certificate**. Brewless first connects to the database itself, with the PostgreSQL `STARTTLS` handshake, and changes nothing unless the certificate verifies against the public CAs for the database's name. It then writes `DB_SSLMODE=verify-full` and `PGSSLROOTCERT=/etc/ssl/certs/ca-certificates.crt` into the environment's Secret Manager, as a new revision, and the containers use it from the next deploy. **Only encrypt, without checking** goes back to `require`. Linking the database again keeps the check, and a [database import](/applications/moving-a-database) checks the certificate the same way. That handshake can wake a Serverless SQL Database. Only Laravel applications on a Serverless SQL Database can be changed this way, and the button only shows for those; when `brewless.yml` sets `DB_SSLMODE` or `PGSSLROOTCERT`, change it there. The change is in the audit trail with the mode, never with a value of the secret.

## Certificates with a P-384 key

Because bunny.net still issues P-256 keys, Brewless can issue the certificates of an environment itself. Someone who manages the applications chooses **Use P-384 certificates** on the environment's row. For every domain of the environment, Brewless then:

1. asks Let's Encrypt for a certificate, with an account of its own whose key is stored encrypted;
2. proves the domain is yours with a `TXT` record `_acme-challenge` at Bunny DNS, gives the record 30 seconds to reach every Bunny DNS server before Let's Encrypt looks, and removes it afterwards, also when the proof fails;
3. makes a new ECDSA P-384 key and has Let's Encrypt sign it;
4. installs the certificate with its key at bunny.net for that hostname.

Each step is an operation that can be retried and is listed with the others. The private key goes from Brewless straight to bunny.net: it is not stored in Brewless's database, the operation or the audit trail. The audit trail does record that a certificate was issued, with its hostname, key type and end date.

Every night Brewless renews a certificate that has 30 days or less left. A domain whose DNS is not at Bunny DNS cannot be proven this way; it keeps bunny.net's certificate and its row says why. Wildcard domains are skipped. Choosing **Use P-384 certificates** again tries a domain that failed once more, at most once an hour per domain, because Let's Encrypt allows only a few failed proofs of a name an hour. A scan follows each new certificate, so the page shows what visitors actually get.

**Back to bunny.net certificates** removes Brewless's certificates at bunny.net and has bunny.net load its own again.

## What the providers say

Some things cannot be measured from outside, such as bunny.net's own connection to your origin. The page lists what Brewless relies on, with the day it was read and a link to the source:

| Statement | Value |
| --- | --- |
| bunny.net offers hybrid post-quantum key exchange to visitors and to origins | Yes, read 4 December 2026 |
| bunny.net reissues managed certificates with a P-384 key at renewal | bunny.net says yes (read 4 December 2026); a certificate it issued on 4 December 2026 had a P-256 key |
| Browsers accept post-quantum certificates | No |
| Scaleway Serverless Containers, Object Storage and databases offer hybrid key exchange | Not stated by Scaleway |

Where a provider says nothing, Brewless measures what it can and shows the rest as unknown.

## From the API

The console reads these routes with its session. The same routes answer under `/cli/api/…` to the command line client signed in as you, with your rights. A [pipeline token](/deployments/from-a-pipeline) for one application may read the newest scan, the list of scans and one scan of its own application's environments, for instance to stop a run when an environment is no longer protected. It may not list every environment, start a scan, change the database setting or the certificates.

| Route | Returns |
| --- | --- |
| `GET /api/readiness` | Every environment with its newest finished scan; `?environment=<id>` for one, `?missing=1` for the ones not protected end to end |
| `GET /api/environments/<id>/readiness` | The newest finished scan of one environment, with its connections |
| `GET /api/environments/<id>/readiness-scans` | The last 50 scans of one environment |
| `GET /api/readiness-scans/<id>` | One scan with its connections |
| `POST /api/environments/<id>/readiness-scans` | Starts a scan (202), or answers 429 within the 5 minutes |
| `POST /api/environments/<id>/database-tls` | With `sslmode` `verify-full` or `require`: whether the application checks the database's certificate, as above |
| `POST /api/environments/<id>/own-certificates` | With `enabled` `true` or `false`: whether Brewless issues the environment's certificates with a P-384 key, as above; answers with what happened per domain |
