↓ Skip to main content
Security

So how am I getting ready?

Getting ready for quantum computers - This article is part of a series.
Part 6: This Article
Six posts of reading, running and scanning come down to one question: what will I do on Monday? This is my list, in order, using only open-source tools, with a “done when” for each item so I can tell when it’s finished.
A plan in three phases. Now: CBOM in CI with cbomkit-action, file and image scans with cbomkit-theia, policy with OPA that also grades keys, a ground-truth test file. Next: check TLS negotiates X25519MLKEM768 and remove CurvePreferences pins, put signing and key exchange behind one configurable module, benchmark ML-KEM, FrodoKEM and HQC with liboqs. Later: plan ML-DSA for long-lived signatures. Throughout: report findings upstream. A live check from Linux shows www.google.com negotiating X25519MLKEM768 and github.com only X25519, and the hybrid disappearing when the curve list is pinned.
Now, next, later, and give back

Part 5 showed what CBOMkit finds, and what it misses, on a real repository. This part turns all of it into a plan. It follows the PQCA’s order from part 3: inventory, abstract, hybrid, test alternatives. And it follows a rule I learned in the SSDLC post: measure first, block later.

The plan at a glance
#

#PhaseActionOpen-source toolDone when
1NowGenerate a CBOM on every pushcbomkit-actionEach repo in Java, Python or Go uploads cbom.json
2NowScan files and imagescbomkit-theiaImages scanned, tests and docs ignored
3NowGrade it, including keysOPA + RegoA report lists every quantum-vulnerable item; nothing fails yet
4NowKeep the scanner honesta ground-truth fileCI fails if the known algorithms stop being found
5NextCheck hybrid TLS is onGo, OpenSSL 3.5No CurvePreferences pins without a reason; my endpoints show X25519MLKEM768, measured from outside any inspecting proxy
6NextMake algorithms configurablemy own codeChanging a signing algorithm is a config change
7NextMeasure the alternativesliboqsNumbers for ML-KEM, FrodoKEM and HQC on my hardware
8LaterPlan post-quantum signatures(libraries and CAs)A list of long-lived keys with a replacement date
9AlwaysReport what I findGitHub issues and PRsEach problem from part 5 is filed or fixed upstream

Now: inventory
#

1. A CBOM on every push
#

The cbomkit-action README gives the workflow. This is it for a Python repository, with the version pinned and nothing that blocks the build:

# .github/workflows/cbom.yml
name: CBOM
on:
  push:
    branches: [main]
  workflow_dispatch:

jobs:
  cbom:
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@v5
      # Java repositories: build first (mvn -B package -DskipTests), the scanner needs the jars
      - name: Create CBOM
        id: cbom
        uses: cbomkit/cbomkit-action@v2.3.0
        env:
          CBOMKIT_LANGUAGES: python
      - uses: actions/upload-artifact@v4
        with:
          name: cbom
          path: ${{ steps.cbom.outputs.pattern }}
          if-no-files-found: warn

Running it on GitHub’s Linux runners avoids four of the five problems I hit in part 5.

2. Files and images
#

# in the repository root
printf 'tests/\ndocs/\n*.rst\n' > .cbomkitignore
cbomkit-theia dir . > cbom-files.json
cbomkit-theia image my-app:latest > cbom-image.json   # needs Docker

For an image, theia reads the certificates, keys, openssl.cnf and java.security that actually ship, which the source scan can’t see (theia README).

3. A policy that also grades keys
#

Part 5 showed that CBOMkit’s sample policy grades only algorithm components, so an ECDSA key on its own gets no verdict, and no verdict counts as quantum-safe. I added a second Rego file next to quantum_safe.rego. It adds findings to the same quantum_safe.findings set, so CBOMkit’s viewer would pick them up too:

package policies

# Keys are graded by the algorithm in their name. The stock policy only
# grades "algorithm" components, so a lone ECDSA key got no verdict.
vulnerable_prefixes := ["RSA", "EC", "ED25519", "ED448", "X25519", "X448", "DSA", "DH"]

is_key(component) if {
	component.cryptoProperties.assetType == "related-crypto-material"
	component.cryptoProperties.relatedCryptoMaterialProperties.type in ["private-key", "public-key"]
}

key_result(name) := "quantum-vulnerable" if {
	some p in vulnerable_prefixes
	startswith(upper(name), p)
} else := "unknown"

quantum_safe.findings contains finding if {
	some component in input.components
	is_key(component)
	finding := {
		"rule": "key_algorithm",
		"result": key_result(component.name),
		"value": component.name,
		"bom-ref": object.get(component, "bom-ref", "(none)"),
		"property": "name",
	}
}

On the three keys that came back empty in part 5, it now reports quantum-vulnerable for the ECDSA key and both Ed25519 keys. The command is the same as before, with the directory instead of one file:

opa eval -d policy/ -i cbom.json -f pretty 'data.policies.quantum_safe.findings'

For now this only reports. Once the noise is down (tests and docs ignored, false positives understood), I’ll make new quantum-vulnerable findings fail a pull request, the same way new criticals do.

One verdict needs its own treatment: unknown. Both the stock policy and my key rule return it when they can’t tell what something is, and part 5 showed how easily “no verdict” passes for “safe”. When I ran the policy on the full repository CBOM from part 5, it found 2 quantum-vulnerable findings and 8 unknown ones: keys whose name is only private-key@<ref>, with no algorithm in it. So CI doesn’t stay quiet about them, and doesn’t fail on them either: each unknown becomes a warning on the pull request, so a person looks at it.

opa eval -d policy/ -i cbom.json -f raw \
  '[f | some f in data.policies.quantum_safe.findings; f.result == "unknown"]' > unknown.json

python3 - <<'EOF'
import json
for f in json.load(open("unknown.json")):
    print(f"::warning title=Unknown crypto ({f['rule']})::{f['value']} has no quantum-safe verdict; check it by hand")
EOF

The ::warning lines are GitHub Actions workflow commands: each one “will create an annotation” on the run. The script itself exits normally, so the step passes and the warnings stay visible.

::warning title=Unknown crypto (key_algorithm)::private-key@13bee40d-… has no quantum-safe verdict; check it by hand
VerdictIn CI, nowIn CI, later
quantum-vulnerableReportedNew ones fail the pull request
unknownWarning on the pull requestStill a warning, until someone looks at it
quantum-safeNothingNothing

4. A ground-truth file
#

The test file from part 4 uses seven known algorithms directly. Keeping it in the repo, outside tests/ so it isn’t excluded, and checking that all seven still appear in the CBOM, tells me when a scanner update breaks detection. It’s the same idea as a canary.

Next: hybrid, abstract, measure
#

5. Check that TLS already uses hybrid key exchange
#

This is the cheapest win, and for many services it is already done. Go 1.24 enabled X25519MLKEM768 by default “when Config.CurvePreferences is nil”, and OpenSSL 3.5 changed its default keyshares to offer X25519MLKEM768 and X25519. Go 1.25 added ConnectionState.CurveID, which makes it easy to check. After my antivirus fooled my first attempt, the check also prints who issued the certificate, so I know which server I measured:

// tlscheck prints the TLS version, key-exchange group and certificate issuer a server agrees to.
package main

import (
	"crypto/tls"
	"flag"
	"fmt"
)

func main() {
	pinned := flag.Bool("pinned", false, "pin curves the way older code often does")
	flag.Parse()
	cfg := &tls.Config{} // nil CurvePreferences: Go's defaults
	if *pinned {
		cfg.CurvePreferences = []tls.CurveID{tls.X25519, tls.CurveP256}
	}
	for _, host := range flag.Args() {
		conn, err := tls.Dial("tcp", host+":443", cfg)
		if err != nil {
			fmt.Printf("%-26s error: %v\n", host, err)
			continue
		}
		st := conn.ConnectionState()
		fmt.Printf("%-26s %s  %-15s issuer: %s\n", host, tls.VersionName(st.Version), st.CurveID,
			st.PeerCertificates[0].Issuer.Organization)
		conn.Close()
	}
}

Run from Linux (Go 1.27.4, 4 December 2026), with no inspecting proxy in the way:

$ ./tlscheck www.google.com github.com pq.cloudflareresearch.com
www.google.com             TLS 1.3  X25519MLKEM768  issuer: [Google Trust Services]
github.com                 TLS 1.3  X25519          issuer: [Sectigo Limited]
pq.cloudflareresearch.com  TLS 1.3  X25519MLKEM768  issuer: [Google Trust Services]

Two things in three lines. My side is ready: Go offered the hybrid, and Google and Cloudflare took it. GitHub, on that date, didn’t, so a connection is only as post-quantum as both ends.

Then I pinned the curves, the way older code often does:

$ ./tlscheck -pinned www.google.com
www.google.com             TLS 1.3  X25519          issuer: [Google Trust Services]

No error, no warning: the hybrid exchange is gone, even with a server that supports it. So the action item is a search, not an upgrade:

grep -rn "CurvePreferences" --include=*.go .

Each hit either gets tls.X25519MLKEM768 added at the front of its list or a comment saying why not. The same check with OpenSSL 3.5, asking for the hybrid first:

echo | openssl s_client -connect www.google.com:443 -servername www.google.com \
  -groups X25519MLKEM768:X25519 2>/dev/null | grep -E "Negotiated TLS1.3 group|Peer Temp Key"
# Negotiated TLS1.3 group: X25519MLKEM768

Pass -groups explicitly: the OpenSSL 3.5.8 in my Ubuntu offered only plain X25519 unless I asked, so a distribution’s defaults can differ from upstream’s.

6. Make the algorithm a setting
#

Part 5’s lesson was that the application, not the library, chooses the algorithm. So that choice should live in configuration, in one place. For a service that uses PyJWT, that is already possible:

import os
import jwt

JWT_ALG = os.environ.get("JWT_ALG", "ES256")   # one place to change it

def issue(claims: dict, private_key) -> str:
    return jwt.encode(claims, private_key, algorithm=JWT_ALG)

def check(token: str, public_key) -> dict:
    return jwt.decode(token, public_key, algorithms=[JWT_ALG])  # never trust the token's own "alg"

The rule I’m applying everywhere: no algorithm names in business logic. One module per job (sign, verify, agree a key), the algorithm read from configuration, and a test that runs the module with every allowed value.

7. Measure the alternatives
#

The PQCA suggests finding out “now, on your own protocols and devices, what switching would cost”. liboqs ships speed_kem and speed_sig benchmark programs, so I’ll build it once and record ML-KEM-768, FrodoKEM and HQC on the machines I actually run, plus key and ciphertext sizes. Numbers, not opinions, for the day ML-KEM needs a backup.

Later: signatures
#

Signatures aren’t exposed to harvest-now-decrypt-later (part 1), so they can wait for libraries, certificate authorities and hardware to support ML-DSA widely. What can’t wait is the list: every long-lived signing key (code signing, root certificates, firmware, tokens with long expiry), its algorithm, and the date it must be replaced. NIST deprecates these algorithms after 2030 and disallows them after 2035 (IR 8547).

Always: give back
#

Everything in part 5 that wasn’t my own environment is worth reporting. My list of issues and pull requests to open:

ProjectWhatKind
cbomkit-libDefault exclude patterns use /, so tests aren’t excluded on WindowsBug, small fix (normalise the separator)
cbomkit-actionPer-module CBOM empty while the consolidated one has findingsBug, needs a reproduction
cbomkit-theiaBuilt from a release tag, it reports version edgeBug
cbomkitSample quantum_safe.rego doesn’t grade keys or certificatesEnhancement, the Rego above as a PR
cbomkit-actionDocument that building from source needs a read:packages tokenDocs

I checked the trackers first: a related issue about Python test files was closed in May 2025 (cbomkit-action #13), and I found none about Windows paths. Filing these is my next step, after one more run to confirm each on a clean checkout.

My checklist
#

  • cbomkit-action in CI for every Java, Python and Go repository
  • .cbomkitignore in each repository; theia run on each image I publish
  • Policy with the key rule; weekly report of quantum-vulnerable findings
  • Ground-truth file in each language I scan
  • grep CurvePreferences across my Go code; TLS check on every endpoint
  • Signing and key exchange behind configurable modules
  • liboqs numbers for ML-KEM, FrodoKEM and HQC
  • List of long-lived signing keys with replacement dates
  • Five upstream issues or PRs filed

Keywords
#

KeywordMeaning here
X25519MLKEM768The hybrid TLS key exchange: classical X25519 plus post-quantum ML-KEM-768. Breaking it needs both broken
CurvePreferencesGo’s tls.Config field that lists allowed key-exchange groups; setting it replaces Go’s defaults
KeyshareThe key-exchange offer a TLS 1.3 client sends in its first message
Policy as codeRules written in a language a machine runs, here Rego for OPA, instead of in a document
Ground-truth fileA small file whose correct scan result I know, used to check that the scanner still works
liboqsOpen Quantum Safe’s C library; it ships speed_kem and speed_sig benchmark programs
UpstreamThe original open-source project, where fixes should go

Takeaways
#

  • Start with the inventory and make it automatic: cbomkit-action in CI, cbomkit-theia for files and images.
  • Grade the CBOM with a policy you’ve read, and extend it to keys; report before you block.
  • Hybrid ML-KEM is already the default in Go 1.24+ and OpenSSL 3.5; the work is finding configs that pin it off, and checking the other end (GitHub didn’t accept it on 4 December 2026).
  • Put algorithm choice in configuration, so the next change is cheap.
  • Report what breaks upstream. Open-source tools get better because users write things down.

References
#

Author
Samarthya
Engineer, learner, tinkerer. This is my trophy shelf of everyday work and leisure.
Getting ready for quantum computers - This article is part of a series.
Part 6: This Article

Related

What broke when I scanned a repo

I expected one command and one report. I got a TLS error, a 401, a “filename too long”, test files that wouldn’t stay excluded, and an empty file, before the first useful CBOM. Then the CBOM found one algorithm out of fourteen. Five problems, then three surprises Part 4 explained what a CBOM is and how to read one. This part generates real ones from an existing open-source repository, with the problems written down as they happened. All versions and numbers are from 4 December 2026.

Where is my crypto?

In part 1 I admitted that I couldn’t list the cryptography in my own projects. An SBOM didn’t help: it tells me which libraries I ship, not that line 13 of one file signs with ECDSA on P-256, or that an old certificate is still sitting in a container image. A CBOM is the list that does. Where a CBOM’s data comes from, and what it holds Part 3 ended with the PQCA’s first recommendation: start with an inventory. A CBOM is the standard format for that inventory. This part explains the format and how to read it.

Who's already working on it?

The new locks I ran in the last post didn’t appear by themselves. Somebody wrote that code, tested it, proved parts of it correct, and built the tools that tell you where the old locks are hiding. When I went looking for who, a lot of roads led to one place: the PQCA. Four projects, four recommendations Part 1 covered what breaks and what replaces it, and part 2 ran the replacements. Standards bodies decide which algorithms to use; this part is about who builds them in the open, and what they tell the rest of us to do.