With the rise of quantum computing, current TLS implementations using Elliptic Curve Cryptography (ECC) face future risks. Post-Quantum Cryptography (PQC) offers resistance against quantum attacks, but introduces operational overhead during deployment. AWS has published a migration plan, and this article explores startup, connectivity, and latency aspects of PQC implementation.
This article references and utilizes the open-source projects oqs-provider and oqs-demos available on GitHub.
MacBook Air M2 arm64
Post-Quantum Cryptography integration in TLS handshake:
TLS Handshake with PQC:
Client → Server: ClientHello ("Can you use PQC algorithms?")
Client ← Server: ServerHello ("Yes, let's use Kyber for key exchange")
Client → Server: PQC Key Exchange (quantum-resistant algorithms)
Client ← Server: Certificate (signed with PQC digital signature)
Client ↔ Server: Secure communication established with quantum-resistant keys
# Clone the OQS demo repository
git clone https://github.com/open-quantum-safe/oqs-demos.git
cd oqs-demos
# Build PQC-enabled OpenSSL container
docker build -t oqs-openssl -f openssl/Dockerfile .
# Start PQC-enabled HTTPS server
docker run -it --rm --name oqs-server \
-p 4433:4433 \
oqs-openssl \
openssl s_server \
-cert /opt/oqs-provider/certs/server.crt \
-key /opt/oqs-provider/certs/server.key \
-port 4433 \
-groups kyber512 \
-verify_return_error
# Traditional ECDSA connection test
time openssl s_client -connect server:443 -cipher ECDHE-ECDSA-AES256-GCM-SHA384
# PQC Kyber connection test
time openssl s_client -connect server:4433 -groups kyber512
Comparing message sizes in TLS handshake:
Algorithm | Public Key Size | Signature Size | Handshake Overhead |
---|---|---|---|
ECDSA P-256 | 64 bytes | 72 bytes | Baseline |
Kyber512 | 800 bytes | 768 bytes | +10-12x |
Dilithium2 | 1,312 bytes | 2,420 bytes | +15-20x |
# Monitor resource usage during PQC operations
docker stats oqs-server
# Measure handshake performance
curl -w "@curl-format.txt" -o /dev/null -s "https://localhost:4433/"
version: '3.8'
services:
pqc-web-server:
build:
context: .
dockerfile: Dockerfile.pqc
ports:
- "443:4433"
environment:
- PQC_ALGORITHM=kyber512
- SIGNATURE_ALGORITHM=dilithium2
volumes:
- ./certs:/opt/certs
command: >
openssl s_server
-cert /opt/certs/server-pqc.crt
-key /opt/certs/server-pqc.key
-port 4433
-groups kyber512
-sigalgs dilithium2
Testing Post-Quantum Cryptography with Docker reveals both the promise and challenges of quantum-resistant security. While PQC algorithms provide necessary protection against future quantum threats, they introduce significant operational overhead in terms of bandwidth, latency, and computational requirements.
Key findings from this exploration:
Organizations should begin testing and planning for PQC migration now, as quantum computing capabilities continue to advance. The transition will require careful balance between security requirements and performance constraints.