Private CA and RA · Single-tenant
A private CA and RA with threshold key custody and dual control.
MyPQC Certificate Authority is a CA and registration authority for organisations that run their own PKI. In production, CA keys are generated in an HSM. Root key operations need a quorum of named custodians. Privileged actions need two separate accounts.
You set the algorithm per CA key and per certificate profile: RSA, ECDSA, ML-DSA, SLH-DSA or KAZ-SIGN.
›
Defaults and limits
k of n
custodian quorum for root key operations
4 h
signing lease duration, limited to 100 operations
2
different accounts to authorize an RA key
24 h
CRL validity, with delta CRLs between full lists
Simulator
CA workflow simulator
The simulator runs in your browser and does not contact a CA. It follows the order of operations and the access checks for a key ceremony, a signing lease, RA key authorization and revocation. Each action is appended to a hash-chained audit log. The demo uses a short digest, not the production hash.
Root key ceremony · 3 custodians shown
-
1
Verify identities The custodians and the auditor are identified in person.
-
2
Key entry Each custodian sets a ceremony PIN. The HSM slot PIN becomes a random token that is Shamir-split across the custodians.
-
3
Witness The auditor records an attestation. The transcript lists actions and names and contains no key material.
Issuing CA key · signing lease
Operations remaining
0
The simulation clock runs 600 times faster than real time. Defaults are 4 hours and 100 operations. The lease ends at whichever limit is reached first and exists only in memory.
RA authorization for an issuer key
A Key Manager proposes and a CA Admin approves. The engine reads each actor's role from the database on every call and does not rely on the session.
Certificate status · CRL and OCSP
-
api.example.myTLS servergood
-
vpn-gw-02Device · SCEPgood
-
payroll-releaseCode signinggood
Accepted revocation reasons: key_compromise, ca_compromise, affiliation_changed, superseded, cessation_of_operation, privilege_withdrawn, aa_compromise, unspecified. Hold and unhold are separate operations from revocation.
Each entry stores the hash of the previous entry. Editing any entry invalidates the chain from that point.
Hierarchy
Signing hierarchy
Scroll to step through each component.
-
Root CA
Offline -
Issuing CA
Lease required -
RA
Policy checks -
Certificates
CRL and OCSP
01 / 04
Root CA: offline by default
The key is generated inside the HSM. The slot PIN is replaced with a random token, Shamir-split across the custodians, and the static PIN is discarded. After the ceremony the root goes offline and refuses to sign. Signing a subordinate CA means an operator brings it online deliberately. Offline roots publish pre-signed CRLs, so CRL renewal never needs the root online.
Issuing CA: signs under a lease
A custodian quorum re-authenticates to open a signing lease. The lease is held in memory and ends at its time limit (default 4 hours) or its operation limit (default 100), whichever is reached first. After that, signing requests are refused until the custodians open a new lease. CRLs and OCSP responses are signed with the same key, so they also stop: the CRL endpoint returns 503 and OCSP answers tryLater. Keys configured as online keys are a documented exception and sign without the custodians.
RA: policy checks
The RA checks requests against certificate profiles, SAN policy and domain control. It has no access to CA private keys and cannot issue certificates itself. It can request signatures only with an issuer key authorized for that RA, and that authorization takes two different accounts.
Status: CRL and OCSP
Status is published through CRLs and an OCSP responder. A revocation increments the CRL number and is recorded in the audit log. Delta CRLs carry the changes between full lists. The OCSP responder answers from a cache of pre-signed responses.
03 Roles
Roles and approvals
There are six roles. The CA portal has CA Admin, Key Manager and CA Auditor. The RA portal has RA Admin, RA Officer and RA Auditor. The two portals run as separate endpoints, and an account for one cannot sign in to the other.
CA portal
RA portal
| Action | Initiated by | Requirement |
|---|---|---|
| Authorize an RA to use an issuer key | Key Manager proposes | A different account with the CA Admin role approves |
| Rotate an HSM PIN | CA Admin initiates | A second CA Admin approves |
| Reset a privileged account | An admin of the same portal requests the reset | Another admin, who is neither the requester nor the target, approves with password and MFA. Requests expire after 24 hours |
| Revoke, hold or unhold a certificate | CA Admin only | A reason is required. A revocation regenerates the CRL |
| Approve a certificate request | RA Officer | The account that submitted the request cannot approve it |
| Read audit records | CA Auditor or RA Auditor | Read-only, and limited to that auditor's own portal |
04 Algorithms
Signature algorithms
Post-quantum signatures and public keys are larger than ECDSA and RSA ones, so certificate chains and handshakes grow. The algorithm is set per CA key and per certificate profile. An operator allow-list limits what the portal offers.
Classical
ECDSA P-256
All keystores
Signature size · one square is 64 bytes
The smallest signature and key in this list. Not secure against Shor's algorithm. P-384 and P-521 are also available.
Sizes are approximate, in bytes, on a log scale.
| Family | Algorithms | Keystores |
|---|---|---|
| Classical | RSA 2048, 3072, 4096, 6144, 8192. ECDSA P-256, P-384, P-521 | Software, Thales Luna, Utimaco, Entrust nShield |
| EdDSA | Edwards-curve signatures | Software only |
| NIST post-quantum | ML-DSA-44, ML-DSA-65, ML-DSA-87 (FIPS 204). SLH-DSA-SHA2-128s (FIPS 205) | Software, Thales Luna, Utimaco, Entrust nShield |
| Malaysian | KAZ-SIGN-128, KAZ-SIGN-192, KAZ-SIGN-256 | Software, Thales Luna, Utimaco, Entrust nShield |
| Hybrid | MLDSA65-ECDSA-P256, KAZSIGN128-ECDSA-P256, KAZSIGN192-ECDSA-P384, KAZSIGN256-ECDSA-P384 | Thales Luna, Utimaco, Entrust nShield only |
Post-quantum support on a vendor HSM depends on that module's firmware. Thales, Entrust and Utimaco report ML-DSA support, and SLH-DSA availability differs by vendor. Confirm both with the vendor before you generate a production root. CRLs and OCSP responses are signed with the issuing key, so each of these algorithms also works for status signing.
05 Issuance
Enrollment and RA checks
Every request path ends at the same RA checks and approval rules. The protocol only decides how the requester authenticates.
RA policy checks
- Certificate profile: TLS server, TLS client, code signing, S/MIME or custom.
- SAN policy per type: optional, required or prohibited, with a maximum count and a wildcard setting for dnsName.
- Domain control validation for TLS server requests, by HTTP-01 or DNS-01. Challenges that resolve to private or loopback addresses are rejected. Pending checks retry every five minutes.
- Approval by an RA Officer. The account that submitted a request cannot approve it.
06 Key custody and audit
HSM and audit
The CA portal has no network path to the HSM
PKCS#11 keystores
Keys are generated and used through PKCS#11. Adapters exist for Thales Luna, Utimaco and Entrust nShield. None has been qualified against this code yet, so test your module and firmware before it holds a production root.
BYO-HSM agent
A Rust agent runs next to a customer-owned HSM. The CA portal sends key generation and signing requests to the agent and has no network path to the HSM. A policy file on the agent limits what it will perform. The agent has been tested against a mock, not against HSM hardware.
PIN handling
The process reads HSM PIN variables once at boot and clears them from its environment. Threshold keys keep no static PIN. Rotating an HSM PIN needs one CA Admin to initiate and a different CA Admin to approve.
Hash-chained audit log
Each entry stores the hash of the previous entry. Events record the actor and that actor's role, which is read from the database when the event is written. The chain check reports the first entry that fails verification.
Ceremony records
Each ceremony produces a printable transcript and an HTML report. The transcript lists actions and names only. The custodians and the auditor sign the printed copy.
Auditor accounts
CA Auditor has read access to the CA portal and RA Auditor to the RA portal. Neither can sign in to the other portal, and neither can change data.
Software keystores
A software keystore is available for development. Outside development the portal asks the operator to acknowledge the risk before it creates a software key.Licensing
The controls follow requirements in the Digital Signature Act 1997 and MCMC licensing for certification authorities. Legally recognised signatures also need an X.509 certificate from an MCMC-licensed CA. The operator holds the licence. This software does not provide one.07 Deployment
Deployment and limits
- Tenancy single-tenant
- Single-tenant. Each deployment serves one organisation and shares no database or process with another deployment.
- Runtime containers · PostgreSQL
- Runs as containers with a PostgreSQL store on your infrastructure. The CA portal and the RA portal are separate endpoints. A health endpoint reports store connectivity and migration state.
- High availability not available
- Not available yet. The CA runs as one node on one database. Multi-node operation and failover are designed but not implemented. If you need either, ask for the current design before you plan around it.
- Backups postgres · hsm
- Postgres backups cover the CA data. Keys held in an HSM are covered only by that HSM's own backup mechanism, so plan both.
See it on a demo instance
The walkthrough covers creating a root and an issuing CA, authorizing an RA, issuing a certificate and revoking it.
- Create the root CAceremony · 3 of 3
- Create the issuing CAsigned by the root
- Authorize the RAtwo accounts
- Issue a certificateunder a lease
- Revoke itCRL number advances