Skip to content

A hands-on lab guide for building a quantum-resistant Certificate Authority (CA) infrastructure using OpenSSL 3.0+ with learning paths for NIST FIPS 203/204/205, NSA CNSA 2.0, and alternate oqsprovider supported algorithms (currently HQC, FrodoKEM, BIKE)

License

Notifications You must be signed in to change notification settings

f5devcentral/openssl-pqc-stepbystep-lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

34 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

License OpenSSL NIST PQC CNSA 2.0 OQS

Post-Quantum Cryptography Certificate Authority Lab

Hands-On Learning for Quantum-Resistant PKI Infrastructure

This hands-on lab guide provides tutorials for building quantum-resistant Certificate Authority (CA) infrastructure using OpenSSL. This repository provides three distinct learning paths based on your compliance requirements and algorithm interests. Who's ready to party?


🎯 Choose Your Learning Path

This repository offers three learning paths. Select the path that aligns with your organization's requirements:

FIPS 203/204/205 Path CNSA 2.0 Path Alternative Algorithms Path
Target Audience Commercial organizations Government contractors, classified systems Researchers, international compliance, defense-in-depth
Compliance Standard NIST FIPS standards NSA CNSA 2.0 Non-NIST algorithms, international standards
Algorithm Coverage ML-DSA, ML-KEM, SLH-DSA ML-DSA-65/87, ML-KEM-768/1024 FrodoKEM, BIKE, HQC
Use Case General quantum-resistant infrastructure National security systems Algorithm diversity, conservative security

For commercial organizations implementing quantum-resistant cryptography using NIST standards.

This path uses OpenSSL 3.5.3's native post-quantum cryptography supportβ€”no external quantum library providers required. So nice, so easy.

Modules

Module Description
00 - Introduction Overview of FIPS 203/204/205, prerequisites, and lab objectives
01 - Environment Setup Verifying OpenSSL 3.5.x with PQC support
02 - Root CA Building a Root CA with ML-DSA-87
03 - Intermediate CA Creating an Intermediate CA with ML-DSA-65
04 - Certificates Issuing end-entity certificates for servers and users
05 - Revocation Implementing OCSP and CRL certificate revocation
06 - Hybrid Methods IETF hybrid PQC methods (X25519MLKEM768, composite signatures)

Algorithms Covered

  • ML-DSA-44/65/87 (FIPS 204) - Lattice-based signatures
  • ML-KEM-512/768/1024 (FIPS 203) - Lattice-based key encapsulation
  • SLH-DSA variants (FIPS 205) - Hash-based signatures
  • X25519MLKEM768 - Hybrid TLS 1.3 key exchange (IETF-based bonus lab)

For government contractors and organizations requiring CNSA 2.0 compliance.

This path uses OpenSSL 3.2+ with user-compiled Open Quantum Safe (OQS) providers for strict CNSA 2.0 algorithm compliance.

Modules

Module Description
01 - Introduction Overview of CNSA 2.0 requirements and compliance deadlines
02 - Root CA Building a Root CA with ML-DSA-87
03 - Intermediate CA Creating an Intermediate CA with ML-DSA-65
04 - Certificates Issuing CNSA 2.0 compliant certificates
05 - Revocation Implementing OCSP and CRL certificate revocation

Algorithms Covered

Algorithm Type Approved Algorithms NIST Designation
Digital Signatures ML-DSA-65, ML-DSA-87 FIPS 204
Key Establishment ML-KEM-768, ML-KEM-1024 FIPS 203
Hash Functions SHA-384, SHA-512 FIPS 180-4

Note: CNSA 2.0 currently does NOT support ML-DSA-44, SLH-DSA, or Falcon algorithms.


For researchers, organizations requiring algorithm diversity, and those interested in international PQC implementations.

This path explores post-quantum algorithms outside the primary NIST FIPS standards, providing options and understanding of the broader PQC landscape. We'll use OpenSSL 3.5.x with OQS provider for alternate algorithm access. The addendum to enable these algorithms is super fun and can be found here addendum_updating_openssl_pqc.

Modules

Module Description
00 - Introduction Overview of non-NIST algorithms, international standards, use cases
01 - Environment Setup Ubuntu 25.10, OpenSSL 3.5.x, OQS provider configuration
02 - FrodoKEM Conservative unstructured lattice KEM (European recommended; BSI, ANSSI)
03 - BIKE and HQC Code-based KEMs (HQC is NIST-selected backup)
04 - International PQC EU, South Korean, and Chinese algorithm standards
05 - Performance Analysis comparing algorithms, latency impacts, use cases, nerd stats

Algorithms Covered

Algorithm Type Mathematical Basis Key Characteristic
FrodoKEM KEM Unstructured lattice (LWE) Conservative security, European endorsed (BSI, ANSSI)
BIKE KEM Code-based (QC-MDPC) NIST Round 4 candidate
HQC KEM Code-based (Quasi-cyclic) NIST-selected backup to ML-KEM

πŸ”§ Prerequisites

System Requirements

  • Operating System(S): CNSA 2.0 - Ubuntu 25.04 with OpenSSL 3.2+. NIST FIPS and Alt PQC - Ubuntu 25.10 with OpenSSL 3.5.3.
  • Permissions: Root or sudo access
  • Note: The CNSA guide is intended to require using external OQS libraries with earlier versions of OpenSSL (in this case 3.2). The FIPS and Alt PQC labs rely on a more curent release of Ubuntu (25.10) with current version of OpenSSL (3.5.3) which has all FIPS PQC requirements built in and will support newer versions of the OQS libraries. See the addendum link below for compiling OQS.

Required Knowledge

  • Basic Linux command line familiarity
  • Understanding of PKI concepts (certificates, CAs, chains)
  • Familiarity with X.509 certificate structure
  • TLS/SSL fundamentals (for KEM testing)

πŸ“– Environment Setup

For detailed instructions on setting up your PQC environment, including building the OQS provider from source, see:

This addendum covers:

  • OQS provider installation for Ubuntu 25.10
  • Building liboqs with HQC enabled
  • Enabling HQC in oqs-provider
  • Troubleshooting common installation issues

⚠️ Important Notes

Educational Use

This lab is designed for educational and internal testing purposes. Production deployments should:

  • Use Hardware Security Modules (HSMs) for key storage
  • Implement air-gapped Root CAs, offline secured storage preferred... on zip drives
  • Enable comprehensive audit logging
  • Follow organizational security policies

Manual Command Entry

All learning paths use manual command entry onlyβ€”no scripts. This approach ensures you:

  • Understand each step of the PKI workflow
  • Learn proper OpenSSL syntax and options
  • Build troubleshooting skills
  • Develop muscle memory for cryptographic operations
  • You COULD copy/paste but you're only cheating yourselves... "sigh"

πŸ“– Additional Resources

NIST Standards

NSA CNSA 2.0

OpenSSL and OQS

IETF Standards

International PQC


🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request with clear documentation

Please refer to contributing for more details.


πŸ“„ License

This lab guide is provided under the MIT License. See LICENSE file for details.

About

A hands-on lab guide for building a quantum-resistant Certificate Authority (CA) infrastructure using OpenSSL 3.0+ with learning paths for NIST FIPS 203/204/205, NSA CNSA 2.0, and alternate oqsprovider supported algorithms (currently HQC, FrodoKEM, BIKE)

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published