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.

example engine log

›

KEY CUSTODY · EXAMPLE k of n set by operator
Root CA: offline Issuing CA: lease active

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. 1
    Verify identities The custodians and the auditor are identified in person.
  2. 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. 3
    Witness The auditor records an attestation. The transcript lists actions and names and contains no key material.
Waiting for identity verification.

Issuing CA key · signing lease

0:00:00 NO LEASE

Operations remaining

0

No active lease. Signing is refused until the custodians open one.

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.

Authorization status none
Select an account and attempt an action. Some actions are refused by design.

Certificate status · CRL and OCSP

  • api.example.myTLS server
    good
  • vpn-gw-02Device · SCEP
    good
  • payroll-releaseCode signing
    good
Current CRL number: 1042. A revocation publishes the next number and is written to the audit log.

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.

AUDIT LOG

    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.

    1. Root CA

      Offline
    2. Issuing CA

      Lease required
    3. RA

      Policy checks
    4. 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

    CA Admin Key Manager CA Auditor

    RA portal

    RA Admin RA Officer RA Auditor
    These rules are enforced in the engine. The interface also hides the actions, but the engine does not depend on it.
    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≈ 72 B
    Public key≈ 65 B

    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.

    Key generation by keystore. The portal shows only the algorithms the selected keystore can generate.
    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.

    ACMERFC 8555, external account binding, ARI (RFC 9773)
    SCEPShared secret
    ESTShared secret
    CMPShared secret
    REST APIAPI key
    RA portalManual request

    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.
    Issuing CA signs Only under an active lease. Expiry notices go to the request email, then to the SCEP, EST or CMP shared-secret contact, then to the ACME account contact.

    06 Key custody and audit

    HSM and audit

    The CA portal has no network path to the HSM

    CA portalKey generation and signing requests
    BYO-HSM agentPolicy file limits what it will perform
    Customer HSMPKCS#11
    01

    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.

    02

    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.

    03

    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.

    04

    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.

    05

    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.

    06

    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.

    1. Create the root CAceremony · 3 of 3
    2. Create the issuing CAsigned by the root
    3. Authorize the RAtwo accounts
    4. Issue a certificateunder a lease
    5. Revoke itCRL number advances