This hands-on guide provides basic understanding and a wee tutorial for building a quantum-resistant Certificate Authority (CA) infrastructure using OpenSSL 3.0+ with compliance to NSA's Commercial National Security Algorithm Suite 2.0 (CNSA 2.0) standards. Fun times
Learn to build a complete Public Key Infrastructure (PKI) that is resistant to quantum computing attacks, following NSA and NIST requirements for evolving quantum-resistant mechanisms.
This lab uses NSA-approved quantum-resistant algorithms:
Component | Algorithm | NIST Designation | OpenSSL Name | Security Level |
---|---|---|---|---|
Root CA | ML-DSA-87 | FIPS 204 | mldsa87 | Level 5 (Highest) |
Intermediate CA | ML-DSA-65 | FIPS 204 | mldsa65 | Level 3 (Standard) |
End-Entity Certificates | ML-DSA-65/87 | FIPS 204 | mldsa65/87 | Level 3/5 |
Hash Function | SHA-512 | FIPS 180-4 | sha512 | 256-bit security |
- Prerequisites and system requirements
- Installing OpenSSL with quantum-resistant support
- Understanding CNSA 2.0 requirements
- Setting up the lab environment
- Creating directory structures and users
Duration: 30 minutes
- Creating a 10-year Root CA with ML-DSA-87 (mldsa87)
- Configuring OpenSSL for quantum resistance
- Implementing proper Unix file permissions
- Setting up Subject Alternative Names (SANs)
- Creating Certificate Revocation Lists (CRL)
- Backing up the Root CA
Duration: 45 minutes
- Creating a 5-year Intermediate CA with ML-DSA-65 (mldsa65)
- Establishing the certificate chain
- Configuring CRL Distribution Points
- Setting up OCSP responder certificates
- Implementing Authority Information Access (AIA)
- Creating certificate bundles
Duration: 45 minutes
- Generating server certificates for web services
- Creating user certificates for authentication
- Building high-security certificates with ML-DSA-87
- Configuring SANs (DNS, IP, email, URI)
- Exporting certificates in multiple formats
- Managing certificate inventory
Duration: 60 minutes
- Implementing Certificate Revocation Lists (CRL)
- Setting up OCSP responders
- Revoking certificates with reason codes
- Testing revocation mechanisms
- Configuring OCSP stapling
- Creating revocation reports
Duration: 60 minutes
After completing this lab, hopefully you will be able to:
- β Build a complete PKI hierarchy
- β Generate quantum-resistant certificates using ML-DSA algorithms
- β Implement both CRL and OCSP revocation mechanisms
- β Apply security best practices with proper file permissions
- β Manage certificate lifecycle from creation to revocation
- β Prepare infrastructure for the post-quantum era
SassyCorp PKI Hierarchy
β
βββ Root CA (ML-DSA-87 / mldsa87)
β βββ Validity: 10 years
β βββ Security Level: 5 (Highest)
β βββ Purpose: Sign Intermediate CAs only
β
βββ Intermediate CA (ML-DSA-65 / mldsa65)
βββ Validity: 5 years
βββ Security Level: 3 (Standard)
βββ Purpose: Issue end-entity certificates
β
βββ Server Certificates
β βββ Web Servers (ML-DSA-65 / mldsa65)
β βββ Database Servers (ML-DSA-87 / mldsa87)
β βββ API Servers (ML-DSA-65 / mldsa65)
β
βββ User Certificates (ML-DSA-65 / mldsa65)
β βββ Email Protection
β βββ Client Authentication
β
βββ OCSP Responder (ML-DSA-65 / mldsa65)
βββ Certificate Status
- Quantum-Resistant Algorithms: ML-DSA-65 and ML-DSA-87 only
- SHA-512 Hashing: Throughout the infrastructure
- Secure Permissions: 400 for keys, 444 for certificates
- Complete Revocation: CRL and OCSP support
- CNSA 2.0: Full compliance with NSA requirements
- RFC 5280: Internet X.509 PKI standards
- RFC 6960: OCSP implementation
- FIPS 204: Module-Lattice Digital Signature Standard
This lab guide uses a manual, hands-on approach where you:
- Type each command directly
- Observe the output in real-time
- Understand what each parameter does
- Learn to troubleshoot issues
- Build muscle memory for OpenSSL commands
Throughout the lab, we use the fictional SassyCorp organization:
- Organization: SassyCorp
- Country: US
- State: Washington
- Locality: Glacier
- Email Domain: sassycorp.internal
- DNS Domain: sassycorp.lab
This lab is for educational and internal testing purposes only. In production:
- Use Hardware Security Modules (HSMs)
- Implement air-gapped Root CAs
- Enable audit logging
- Conduct regular security assessments
The OQS provider has updated to use NIST standard names:
- Current:
mldsa65
andmldsa87
- Legacy:
dilithium3
anddilithium5
Check your version and use the appropriate names. The lab guide uses the current NIST standard names.
This lab uses ONLY the following algorithms:
- β ML-DSA-65 (mldsa65) - Standard security
- β ML-DSA-87 (mldsa87) - Highest security
- β SHA-512 - Hashing
The following are NOT used (not CNSA 2.0 compliant):
- β ML-DSA-44 (mldsa44/dilithium2)
- β Falcon algorithms
- β SPHINCS+ algorithms
- β Classic RSA/ECDSA
- Total Lab Duration: 4-5 hours
- Module 1: 30 minutes (Setup)
- Module 2: 45 minutes (Root CA)
- Module 3: 45 minutes (Intermediate CA)
- Module 4: 60 minutes (Certificates)
- Module 5: 60 minutes (Revocation)
- NIST Post-Quantum Cryptography
- NSA CNSA 2.0 Suite
- FIPS 204: Module-Lattice-Based Digital Signature Standard
- RFC 5280: Internet X.509 PKI
- RFC 6960: OCSP
This lab guide is provided under the Apache 2.0 License. See LICENSE file for details.
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
For questions or issues:
- Open an issue in this repository
- Check the troubleshooting sections in each module
- Review the verification commands
- Ask us a quetion @DevCentral!
Begin your journey into quantum-resistant PKI:
Hack the planet! ππ