Technologies / PQC PKI for AI

PQC PKI for AI

A post-quantum public-key cryptography infrastructure stack built for AI factories and their workloads: certificate issuance, real-time revocation checking and trusted timestamping, all using NIST-standardised post-quantum algorithms.

Built for automation

A major goal is to let automated agents and code that operate under AI control request and use PKI services in the most robust and safe way possible, without sacrificing productivity at scale. The APIs and workflows are built so that machines can enrol, renew, check status and timestamp evidence automatically, while the security controls remain strict enough for high-stakes AI factory environments.

Apache License 2.0Written in C++Security codingNIST post-quantum cryptography algorithms
01 / At a glance

At a glance

What it is

Post-quantum cryptography (PQC) PKI for AI is a post-quantum public-key infrastructure stack built for AI factories and their workloads. It provides certificate issuance, real-time revocation checking and trusted timestamping, all using NIST-standardised post-quantum algorithms. The stack is designed to be exposed to the Internet directly, operated through APIs, and scaled to thousands of operations per second.

Compiled policy

Automation may include the utilisation of SCEP, the Simple Certificate Enrolment Protocol. Enrolment requests are evaluated against pre-compiled certificate profiles rather than parsed at runtime. Compiling profiles ahead of time gives fast, deterministic issuance and removes an entire class of runtime policy errors. A dedicated policy compiler turns YAML policy definitions into signed, hashed binary objects that the signing components accept.

Three foundations

The stack consists of three foundations, provided as separate code packages:

Secure by construction

The code for all three foundations is written in C++ and developed according to secure-coding standards, with memory-safe patterns, strict input validation, hardening flags and exploit mitigations built into every release. All three code packages are released under the Apache License 2.0.

Together they give AI factories, model-serving endpoints, data guards and customers the cryptographic identities, status checks and timestamped evidence needed for a zero-trust, post-quantum environment.

02 / Components

The three foundations in detail

bastion-pki

bastion-pki is a certificate authority written in C++23, designed primarily for small and mid-size enterprises, with a modular design that can be extended to cover the needs of large enterprises. It is built for post-quantum signatures from the root down.

The reference hierarchy has an offline ML-DSA-87 root, two ML-DSA-65 subordinate CAs, and one issuing CA under the first subordinate. RSA and ECDSA CAs are supported only for keys imported from an existing PKI.

Design goal

The design goal is that no single person, and no single compromised host, can issue a certificate the officers did not approve, undo a revocation, or take a CA key. Every rule that decides what is signed lives in the signer, which has no network and is reached only through a Unix socket. Everything in front of it, including the admin API, the publisher and the object store, is treated as untrusted.

Technical capabilities
  • Offline root operated in ceremonies, with requests and results carried on transfer media.
  • Subordinate signers without a network, reached only through a Unix socket.
  • At least three security officers per CA; the officer who assembles a request counts as one approval.
  • Signer-issued challenges, single-use request IDs, and approvals bound to the CA key, the profile set and the requester.
  • Certificate profiles compiled from YAML into deterministic binary objects, pinned by hash in the signer.
  • One signing object per certificate, containing the complete certificate content, computed independently by the RA, the approving officer and the signer.
  • Hash-chained journal with signed checkpoints, witnesses and rollback detection.
  • Revocation with certificateHold and release; every CRL is a superset of the previous one.
  • OCSP served by bastion-ocspd from the CA's CRL only.
  • 2-of-n backup of the CA key, sealed to each officer's ML-KEM-1024 key, and journaled restore.
  • Automated issuance through compiled rules with API keys, limits and an end date.
  • SCEP (RFC 8894) enrolment for devices.
  • Publication of CA certificates and CRLs through 389 Directory Server over LDAPS.

bastion-ocspd

bastion-ocspd is a hardened, high-performance OCSP responder written in C++20 on top of OpenSSL 3. It is built to face the Internet directly.

One process serves any number of independent Certificate Authorities, each with its own delegated responder. Responses are signed on a pool of worker threads, and signing capacity is shared fairly between issuers and clients under attack.

Technical capabilities
  • RFC 6960 compliant OCSP responder.
  • Multiple independent CAs in one process, each with its own delegated responder.
  • Per-CA chain validation against a pinned trust anchor.
  • CRL validation, rollback protection and hot reload without dropping requests.
  • Explicit error answers: unauthorized for unknown CAs, malformedRequest for unsupported CertIDs, tryLater when the CRL is past its nextUpdate.
  • Post-quantum delegated responders with OpenSSL 3.5+: ML-DSA and SLH-DSA, per CA, alongside ECDSA CAs.
  • HTTP POST and GET, with GET answers carrying RFC 5019 cache headers.
  • Pre-signed responses for serials the CA has issued, so floods of distinct serials cost no signature.
  • Built for direct Internet exposure: non-blocking request reading, strict HTTP parsing, per-client rate and connection limits, allow and deny lists, and a signed-response cache.
  • Admin API over mutual TLS 1.3 to onboard CAs, rotate chains and responders, and decommission CAs.
  • Prometheus metrics on a separate listener.

bastion-tsa-server

bastion-tsa-server is an RFC 3161 Time-Stamp Authority built for direct Internet exposure. It runs several named signers side by side, including ECDSA, RSA, Ed25519, and post-quantum ML-DSA or SLH-DSA.

Clients POST a DER TimeStampReq to /tsa/<signer id> and receive a TimeStampResp. Each signer has its own key, TSA certificate, issuer chain pinned to a trust anchor, policy OID, accuracy and accepted digests.

Technical capabilities
  • Multiple signers in one server, each independently configurable and rotatable.
  • Post-quantum ML-DSA and SLH-DSA signers alongside classical ones.
  • Admin API over mutual TLS 1.3 for installing and rotating signers at runtime.
  • Degraded mode: the server starts and stays manageable even when no signer is usable.
  • Tokens issued only while the clock is synchronised and within the signer's accuracy.
  • HSM support through PKCS#11.
  • Prometheus metrics and readiness endpoint.
03 / Cryptography

Post-quantum cryptography

The stack uses the NIST post-quantum standards as implemented in OpenSSL 3.5:

  • ML-DSA (FIPS 204) for digital signatures.
  • SLH-DSA (FIPS 205) for conservative, hash-based signatures.
  • ML-KEM (FIPS 203) for key encapsulation in backups and key sealing.

This means certificates, revocation responses and timestamps can be verified by relying parties that are preparing for a post-quantum world, while classical algorithms remain available for backwards compatibility during transition.

04 / AI factories

Relevance to AI factories

AI factories handle sensitive training data, model weights, inference requests and customer agreements. A PKI for such an environment must do more than issue TLS certificates:

01

Identity for data guards and model-serving endpoints

Each component can receive a short-lived, post-quantum certificate tied to a tenant or a customer contract.

02

Revocation that keeps up

bastion-ocspd answers status requests in real time, so a compromised endpoint can be blocked without waiting for a CRL to propagate.

03

Timestamped evidence

bastion-tsa-server provides RFC 3161 timestamps for model releases, dataset versions, audit log entries and signed customer agreements.

04

Cross-federation trust

The CA hierarchy, OCSP responders and TSA can be shared by a federation of AI factories, each running its own contract store and validators, with one root of trust.

05 / Automation

API access and automation

The stack is built for API-driven operation.

bastion-pki provides
  • Admin API over mutual TLS 1.3 for officers and automation.
  • Enrolment listener for automated certificate issuance by rule.
  • SCEP listener for device enrolment.
bastion-ocspd provides
  • Admin API over mutual TLS 1.3 to onboard CAs and rotate responders at runtime.
  • Public OCSP endpoint over HTTP.
bastion-tsa-server provides
  • Admin API over mutual TLS 1.3 to create signers, generate keys, upload certificates and activate generations.
  • Public timestamp endpoint.

All admin APIs use TLS 1.3 with client certificates, and every change is logged with the client's common name.

06 / Performance

Performance

bastion-ocspd and bastion-tsa-server are designed for high-throughput, low-latency environments.

On server-class hardware, bastion-ocspd scales with worker threads and event loops; the exact throughput depends on the responder key type and the fraction of requests that can be answered from the pre-signed cache.

bastion-tsa-server throughput

On a server with 2 x AMD EPYC 7H12 (128 cores), with the load generator on a second node over InfiniBand:

Signer keyTimestamp tokens per second
ECDSA P-256about 135,000
Ed25519about 137,000
ECDSA P-384about 64,000
ML-DSA-44 / -65 / -87about 20,200 / 12,800 / 11,500
RSA 3072about 12,000
SLH-DSA-SHA2-128f / -128sabout 3,600 / 160

This makes the TSA suitable for high-volume timestamping of inference logs, model checkpoints and audit events.

07 / Security

Security design

The stack follows a bastion model: the hardened parts face the network, while the keys stay behind.

  • CA keys live in signers with no network access, reached only through Unix sockets.
  • Responder and TSA keys live in OpenSSL's secure heap, locked in memory and excluded from core dumps.
  • Admin APIs require mutual TLS 1.3 with authorised client certificates.
  • Every signing decision is independently verified by the signer, the officer tool and the RA.
  • Journals are hash-chained and checkpointed, with rollback detection.
  • Backups are split with Shamir's scheme and sealed to officers' ML-KEM-1024 custody keys.
  • Builds use hardening flags and exploit mitigations: PIE, full RELRO, stack protector, fortified libc calls and CET markings on x86_64.
Secure coding

Secure-coding practices for each component are documented explicitly:

08 / Deployment

Deployment

The components are built with CMake and installed under /opt/<component>-<version> by default. They are designed to run and be operated as non-root users: each service runs under its own unprivileged account in a hardened systemd unit, and routine administration is done without root access. This non-root design removes a common privilege escalation path and strengthens the overall product.

Container images are built with Podman, pinned by image ID, and deployed with firewall rules in a dedicated nftables table.

Typical deployment layout
  • pkisign runs the signers on a volume of their own.
  • pkidev runs the admin API and directory server.
  • pkipub runs the responders and repositories that face the network.