Post-Quantum Cryptography (PQC) self-signed certificates

Using Post-Quantum Cryptography (PQC) self-signed certificates such as those based on NIST-standardized lattice algorithms like ML-DSA (formerly CRYSTALS-Dilithium) requires tools that natively understand PQC signature identifiers (such as OpenSSL 3.5+ or specialized PKI tooling like orapki). Because public Certificate Authorities (CAs) are still rolling out widespread commercial PQC issuance, self-signed or private local CAs are currently the primary way to test and implement quantum-resistant authentication.

Step 1: Generate a Self-Signed Post-Quantum Root CA

To issue and manage PQC certificates, you first need a self-signed root certificate using a PQC algorithm.

Make sure using Gnoppix OpenSSL (version 3.5.0 or later with appropriate provider configuration):

  1. Generate the private key:

    Bash

    openssl genpkey -algorithm mldsa44 -provparam ml-dsa.output_formats=seed-only -out pq-root-ca.key
    
    
  2. Create the self-signed root certificate:

    Bash

    openssl req -new -x509 -key pq-root-ca.key -out pq-root-ca.crt -days 3650 -subj "/CN=Post-Quantum Root CA"
    
    

Step 2: Issue a Server/Service Certificate

Next, generate a server key and a Certificate Signing Request (CSR), then sign it using your newly created post-quantum root CA:

  1. Generate server private key and CSR:

    Bash

    openssl genpkey -algorithm mldsa44 -provparam ml-dsa.output_formats=seed-only -out server.key
    openssl req -new -key server.key -out server.csr -subj "/CN=myserver.internal"
    
    
  2. Sign the CSR with your PQ Root CA:

    Bash

    openssl x509 -req -in server.csr -CA pq-root-ca.crt -CAkey pq-root-ca.key -CAcreateserial -out server.crt -days 365
    
    

Step 3: Configure Trust on Client and Server Systems

Because self-signed certificates lack a globally recognized chain of trust, client applications and operating systems will reject them unless explicitly configured. To establish trust:

  1. Install the Root CA into the Trust Store: Copy your pq-root-ca.crt file to the target machine and add it to the local system or application trust store. For example, on Linux systems using system-wide trust:

    Bash

    sudo cp pq-root-ca.crt /etc/pki/ca-trust/source/anchors/
    sudo update-ca-trust
    
    
  2. Configure Your Server (e.g., NGINX): Point your server configuration to use the generated PQC certificate and key files, ensuring it restricts protocols to TLS 1.3 or higher:

    Nginx

    server {
        listen 443 ssl;
        server_name myserver.internal;
    
        ssl_certificate /path/to/server.crt;
        ssl_certificate_key /path/to/server.key;
        ssl_protocols TLSv1.3;
    }