Chapter 10
QKD Integration
In this chapter
For Highest-Assurance Environments
Every chapter up to this point has covered the migration from classical cryptography to post-quantum cryptography — algorithms that run on classical hardware and resist quantum attacks. PQC is the right migration path for the vast majority of systems. This chapter is about what comes after that, and alongside it, for the systems where computational security alone is not sufficient.
Quantum Key Distribution uses the laws of physics — specifically the no-cloning theorem and the measurement disturbance principle — to make key exchange provably secure against any adversary, regardless of their computational power. An adversary with a quantum computer, unlimited time, and unknown mathematical breakthroughs cannot break QKD-secured key exchange. That is a categorically different guarantee from PQC, and it comes with a price: specialized hardware, dedicated fiber, relatively low key generation rates, and — for U.S. National Security Systems — an explicit NSA policy decision not to authorize QKD for NSS use.
This chapter covers when QKD is justified, what the 2026 vendor landscape looks like, how to integrate QKD key material into existing IPsec infrastructure using the ETSI GS QKD 014 standard API, how to manage the insider threat risk introduced by trusted relay nodes, and a hands-on lab exercise that simulates QKD key exchange using software — demonstrating the integration pattern without requiring $200,000 of optical hardware.
| What You Will Learn A four-dimension decision framework for determining when QKD is justified. The 2026 QKD vendor landscape: hardware, software, and cloud options. How to consume QKD-generated keys via the ETSI GS QKD 014 REST API. How to inject QKD key material into an IPsec/IKEv2 gateway. Trusted node architecture and insider threat risk management. Lab exercise: simulated QKD key exchange and IPsec integration. |
|---|
| U.S. NSS Scope: Read This First NSA guidance explicitly states that QKD is not approved for use in National Security Systems and will not be certified for NSS use unless specific limitations are overcome. CNSA 2.0 and the DoW PQC Strategy both confirm QKD exclusion from NSS. If your systems are NSS-scope, this chapter is informational context — your migration path is PQC-only per Chapter 4 through 9. For non-NSS environments, international deployments, and commercial high-assurance applications, QKD is a legitimate architectural option. |
|---|
10.1 Decision Framework: When QKD Is Justified
QKD is not a general-purpose replacement for PQC. It is a specialized tool for specific deployment scenarios. The decision to invest in QKD infrastructure should be driven by four dimensions, evaluated in sequence.
Dimension 1: Data Sensitivity and Longevity
QKD’s primary advantage over PQC is that its security guarantee does not depend on any mathematical assumption remaining unbroken. This matters when:
- The data requires confidentiality for 20+ years — beyond any optimistic estimate of when PQC assumptions might fall to future cryptanalytic advances.
- The data is already subject to harvest-now-decrypt-later collection and even the residual risk of a future PQC break is unacceptable given the consequences of disclosure.
- The adversary is a sophisticated nation-state with both long planning horizons and the resources to invest in quantum computing at scale.
For data with a sensitivity window under 10 years, PQC alone provides more than adequate protection given realistic quantum computing timelines. QKD becomes increasingly justified as the sensitivity window extends beyond 15–20 years.
Dimension 2: Link Characteristics
QKD requires fixed or semi-fixed endpoints connected by a dedicated optical channel — either dedicated dark fiber or a free-space optical link. It cannot be deployed on:
- Mobile endpoints or dynamically assigned network addresses
- General internet connections or shared fiber infrastructure
- Wireless links other than purpose-built free-space optical QKD systems
- Virtualized or software-defined network overlays
Before considering QKD, verify that your link is physically fixed, that dedicated fiber is available or can be provisioned, and that the distance is within the operating range of the QKD hardware you are evaluating (typically 10–200 km for fiber-based systems without trusted-node relay).
Dimension 3: Regulatory and Policy Scope
| Environment | QKD Status | Recommendation |
|---|---|---|
| U.S. National Security Systems (NSS) | Not authorized per NSA guidance | PQC only. Do not deploy QKD. See Chapters 4–9. |
| U.S. Federal Civilian (non-NSS) | Not mandated; not prohibited | Evaluate on merit. PQC first; QKD for highest-value links if justified by Dimensions 1 and 2. |
| DoD supply chain / cleared contractors | Not authorized for classified systems | Follow NSS guidance for classified networks; non-classified networks may use QKD at organizational discretion. |
| EU / EuroQCI-aligned environments | Supported; ETSI standards in place | Legitimate architectural choice. ETSI GS QKD 014 provides the integration standard. |
| Commercial high-assurance (finance, healthcare) | No regulatory restriction | Evaluate on merit. Justified for longest-sensitivity-window data on fixed links. |
| International joint operations (non-NSS) | Varies by partner nation | Consult applicable agreements. EU partners may expect or prefer QKD for highest-sensitivity links. |
Dimension 4: Cost and Infrastructure Justification
QKD infrastructure is a significant capital investment. A point-to-point fiber QKD system from a major vendor runs $50,000–$300,000 for the optical hardware alone, plus dedicated fiber provisioning, installation, KMS software, and ongoing maintenance. The justification calculus:
- What is the cost of a data breach for the information this link carries? For classified information, long-lived intelligence, or critical national infrastructure control, the potential cost of disclosure dwarfs the infrastructure investment.
- What is the expected operational lifetime of the link? A QKD investment that protects a 20-year link is a different calculation than one protecting a 3-year contract.
- Is dedicated fiber already in place or easily provisioned? Dark fiber between owned facilities (data centers, campuses, government buildings) is the lowest-friction deployment scenario. Leased dark fiber adds ongoing cost.
| The Justification Summary QKD is justified when: the data sensitivity window exceeds 15–20 years AND the link is fixed with dedicated fiber available AND the environment is non-NSS or outside U.S. national security scope AND the cost-benefit analysis supports the infrastructure investment. If all four conditions are met, QKD adds a physics-based security layer that PQC cannot provide. If any condition is not met, PQC alone is the appropriate migration path. |
|---|
10.2 Vendor Landscape (2026)
The QKD vendor landscape has matured significantly since 2020. Commercial products are available from multiple vendors with documented performance specifications, ETSI GS QKD 014 API support, and reference deployments. The following covers the primary vendors and their products as of mid-2026.
QKD Hardware Vendors
| Vendor | Product | Technology | Max Distance | Key Rate (typical) | ETSI API | Notes |
|---|---|---|---|---|---|---|
| ID Quantique (IDQ) | Cerberis XGR | DV-QKD (BB84) | 80 km direct; 200+ km with relay | 10–100 kbps at 50 km | Yes — GS QKD 014 | Longest-deployed commercial QKD system; reference deployments in banking and government |
| Toshiba Quantum | Long Distance QKD LD | DV-QKD (twin-field variant) | 600 km demonstrated | 1–10 kbps at 200 km | Yes — GS QKD 014 | Record fiber distance; rack-mounted form factor for data center interconnect |
| Quantinuum | Quantum Origin + QKD | Integrated platform | Metropolitan scale | Varies by link | Partial | Integrated PQC + QKD platform; focus on enterprise key management |
| QuantumCTek | QKD Series | DV-QKD | 100–200 km | Varies | Yes | Primary supplier for China national backbone; limited Western market availability |
| Corning / Telefonica (EuroQCI) | EuroQCI pilot nodes | DV-QKD | Metropolitan | Pilot phase | Yes — ETSI | EuroQCI government pilot infrastructure; not commercial product |
Key Management System (KMS) Software
The KMS layer sits between QKD hardware and consuming applications. It ingests quantum-generated key material via the ETSI GS QKD 014 API, manages key pools and lifetimes, and delivers keys to applications. Several standalone KMS platforms support QKD integration:
- ID Quantique Centauris CN8000: Network encryption appliance that integrates directly with IDQ QKD hardware and supports ETSI GS QKD 014 key delivery to consuming applications including IPsec gateways.
- Thales CipherTrust Manager: Enterprise KMS platform with roadmap support for ETSI GS QKD 014 key ingestion. Supports integration with high-speed network encryptors for QKD key injection into existing infrastructure.
- Open-source: OpenQKDNetwork KMS: Reference KMS implementation from the OpenQKDNetwork project, suitable for research and pilot environments. Implements ETSI GS QKD 014 v2.1.
| ETSI GS QKD 014: The Integration Standard ETSI GS QKD 014 defines a REST-based Key Delivery API that allows QKD hardware to expose generated key material to consuming applications in a vendor-neutral way. Any QKD hardware that implements GS QKD 014 can supply key material to any application that consumes it — regardless of vendor. When evaluating QKD hardware, verify GS QKD 014 compliance explicitly. Section 10.3 provides the full API integration pattern. |
|---|
10.3 Integration Pattern: QKD Key Injection into IPsec Gateways
The most common enterprise QKD integration pattern is injecting QKD-generated key material into IPsec IKEv2 gateways as pre-shared keys. This allows existing IPsec infrastructure to benefit from QKD key material without replacing the entire VPN stack — the VPN hardware stays in place; only the key source changes.
Architecture Overview
The integration has three layers:
- QKD hardware generates quantum-secure key material and exposes it via the ETSI GS QKD 014 REST API on the local KMS.
- A key injection agent running on or adjacent to the IPsec gateway polls the KMS for fresh PSK material before each IKEv2 session establishment.
- The IPsec gateway uses the QKD-derived PSK for IKEv2 authentication, establishing the IPsec SA with physics-based key material.
Both endpoints (Site A and Site B) must have their own QKD hardware and KMS, connected by the QKD fiber link. The key injection agent at Site A retrieves a key ID and key material from the Site A KMS. Site A transmits the key ID (not the key material) to Site B over the classical channel. Site B’s agent retrieves the same key material from the Site B KMS using the key ID. Both sites now hold the same PSK, derived from quantum key exchange.
The ETSI GS QKD 014 REST API
ETSI GS QKD 014 defines two primary endpoints:
# Endpoint 1: Request new key material (Site A -- initiating side)
GET https://kms-site-a.example.gov/api/v1/keys/{slave_SAE_ID}/enc_keys
# Request body (optional parameters)
{
"number": 1,
"size": 256
# Request 1 key of 256 bits (AES-256 sized)
}
# Response
{
"keys": [{
"key_ID": "a3f8c2d1-4b7e-4c9a-8d2f-1e5b6c3a7d9e",
"key": "<base64-encoded 256-bit quantum key>",
"key_ID_extension": {}
}]
}
# Endpoint 2: Retrieve key by ID (Site B -- responding side)
POST https://kms-site-b.example.gov/api/v1/keys/{master_SAE_ID}/dec_keys
{
"key_IDs": [{
"key_ID": "a3f8c2d1-4b7e-4c9a-8d2f-1e5b6c3a7d9e"
# Same key_ID transmitted by Site A over classical channel
}]
}
# Response: same key material as Site A received
{
"keys": [{
"key_ID": "a3f8c2d1-4b7e-4c9a-8d2f-1e5b6c3a7d9e",
"key": "<same base64-encoded quantum key>"
}]
}
Key Injection Agent Implementation
The key injection agent is the software component that bridges the QKD KMS and the IPsec gateway. It handles key retrieval, format conversion, and injection into the gateway’s PSK configuration. The following Python reference implementation demonstrates the core pattern:
#!/usr/bin/env python3
# qkd_key_injection_agent.py
# Retrieves QKD key material and injects into StrongSwan PSK configuration
import requests, base64, subprocess, json, logging, time
from pathlib import Path
KMS_BASE_URL = "https://kms-site-a.example.gov/api/v1"
SLAVE_SAE_ID = "site-b-ipsec-gateway"
PSK_CONFIG_PATH = "/etc/swanctl/conf.d/qkd-psk.conf"
REFRESH_INTERVAL_SECONDS = 3600
# Rotate PSK every hour; adjust to QKD key generation rate
def get_qkd_key():
"""Request a fresh 256-bit key from the QKD KMS."""
response = requests.get(
f"{KMS_BASE_URL}/keys/{SLAVE_SAE_ID}/enc_keys",
params={"number": 1, "size": 256},
# In production: use mTLS client certificate for KMS authentication
verify="/etc/ssl/certs/kms-ca.pem"
)
response.raise_for_status()
key_data = response.json()["keys"][0]
return key_data["key_ID"], base64.b64decode(key_data["key"])
def write_swanctl_psk(key_id: str, key_bytes: bytes):
"""Write QKD key as PSK in StrongSwan swanctl format."""
psk_hex = key_bytes.hex()
config = f"""secrets {{
ike-qkd-{key_id[:8]} {{
id = site-b.example.gov
secret = 0x{psk_hex}
# QKD-derived PSK -- Key ID: {key_id}
}}
}}"""
Path(PSK_CONFIG_PATH).write_text(config)
Path(PSK_CONFIG_PATH).chmod(0o600)
def reload_strongswan():
"""Signal StrongSwan to reload PSK configuration."""
subprocess.run(["swanctl", "--load-creds"], check=True)
logging.info("StrongSwan PSK reloaded with QKD key material")
def main():
logging.basicConfig(level=logging.INFO)
while True:
key_id, key_bytes = get_qkd_key()
logging.info(f"Retrieved QKD key: {key_id[:8]}..."
write_swanctl_psk(key_id, key_bytes)
reload_strongswan()
# Transmit key_id to Site B over authenticated classical channel
# Site B retrieves same key from its KMS using this key_id
logging.info(f"Key ID for Site B: {key_id}")
time.sleep(REFRESH_INTERVAL_SECONDS)
if __name__ == "__main__":
main()
ML-DSA Authentication of the Classical Channel
The key ID must be transmitted from Site A to Site B over an authenticated classical channel — without authentication, an adversary could inject a false key ID, causing Site B to use a different key than Site A and disrupting or intercepting the session. Use ML-DSA signatures to authenticate the key ID transmission:
# Sign the key ID before transmission (Site A)
echo -n "$KEY_ID" | openssl dgst \
-sign ml-dsa-site-a-key.pem \
-provider oqsprovider -provider default \
-out key_id_signature.bin
# Verify the key ID on receipt (Site B)
echo -n "$RECEIVED_KEY_ID" | openssl dgst \
-verify ml-dsa-site-a-pub.pem \
-provider oqsprovider -provider default \
-signature key_id_signature.bin
# Only accept key_id if verification returns: Verified OK
Combining QKD and PQC Keys: HKDF Combination
For the highest-assurance hybrid architecture (WP4 Pattern 1), combine the QKD-derived key with a simultaneously established ML-KEM key using HKDF:
#!/usr/bin/env python3
# hkdf_key_combination.py -- combine QKD and ML-KEM key material
from cryptography.hazmat.primitives.kdf.hkdf import HKDF
from cryptography.hazmat.primitives import hashes
import secrets
def combine_qkd_pqc_keys(qkd_key: bytes, mlkem_shared_secret: bytes) -> bytes:
"""
Combine QKD-derived key and ML-KEM shared secret using HKDF-SHA384.
The combined key is protected unless BOTH are compromised simultaneously.
"""
hkdf = HKDF(
algorithm=hashes.SHA384(),
length=32,
# 256-bit combined key for AES-256
salt=None,
info=b"hybrid-qkd-pqc-ipsec-key-v1"
)
return hkdf.derive(qkd_key + mlkem_shared_secret)
# Concatenate both key inputs; HKDF provides strong mixing
# Example usage
qkd_key = get_qkd_key_material()
# From ETSI GS QKD 014 API
mlkem_secret = perform_mlkem_encapsulation()
# From ML-KEM-1024 key exchange
combined_key = combine_qkd_pqc_keys(qkd_key, mlkem_secret)
# Use combined_key for AES-256-GCM session encryption
10.4 Trusted Node Risk Management
Fiber-based QKD systems at practical distances — beyond 100–200 km — require trusted relay nodes: intermediate points where the quantum key is decrypted to classical form, re-encrypted, and forwarded to the next segment. Each trusted node is a point where the key exists in classical form and must be physically and operationally protected. Trusted nodes are the primary security limitation of deployed QKD networks, and managing them correctly is essential to the security of the deployment.
The Trusted Node Threat Model
A trusted node that is compromised — whether by physical intrusion, insider threat, supply chain attack, or cyber intrusion — can expose the session keys for all connections that route through it. The attacker does not need to break any cryptography; they simply need to read the key material in classical form during the re-encryption process.
This is the primary objection cited by the NSA in its QKD guidance: trusted nodes introduce infrastructure risk and insider threat exposure that a purely computational solution like PQC does not have. The objection is technically valid. The response is not to avoid trusted nodes but to manage their risk systematically.
Trusted Node Security Controls
| Control Category | Specific Controls | Priority |
|---|---|---|
| Physical security | Locked, access-controlled equipment rooms. Tamper-evident seals on all hardware. Motion sensors and camera surveillance. Two-person integrity rule for physical access. Alarm systems tied to 24/7 monitoring. | Critical |
| Access control | Role-based access with least privilege. Multi-factor authentication for all administrative access. Privileged access workstations for trusted node management. No shared credentials. | Critical |
| Network segmentation | Trusted node management interfaces on isolated management VLANs. No direct internet access. Firewall rules permitting only required KMS-to-KMS communication. IDS/IPS on all trusted node network interfaces. | High |
| Key handling | Key material in classical form only within HSM boundaries — never in software memory or logs. Key material zeroized immediately after forwarding. Audit log of every key access operation. | Critical |
| Monitoring and alerting | Real-time QBER monitoring with anomaly alerting. Key usage rate monitoring (sudden spike may indicate key material exfiltration). Physical intrusion alerts. Remote attestation of trusted node software integrity. | High |
| Insider threat | Background investigation requirements for trusted node operators. Two-person rule for key management operations. Separation of duties between key generation, key delivery, and network operations roles. | High |
Minimizing Trusted Node Exposure
Where possible, reduce the number and exposure of trusted nodes through architectural choices:
- Minimize the number of hops. Every trusted node is an additional attack surface. Choose fiber routes that minimize relay requirements even if they are not the shortest path.
- Prefer owned and operated facilities for trusted nodes. A trusted node in a government-owned and -operated facility with cleared personnel is substantially lower risk than a co-located node in a commercial carrier facility.
- Evaluate twin-field QKD for extended distances. Twin-field QKD (TF-QKD) extends the direct fiber range to 500+ km without trusted nodes. For links where a twin-field system is available and the distance is within range, eliminating trusted nodes entirely removes the insider threat exposure.
- Apply PQC encryption at every trusted node hop. Even if the key is in classical form at the trusted node, encrypt it with ML-KEM-1024 during transit between nodes. An adversary who compromises the classical channel between nodes still cannot recover the key without breaking ML-KEM.
| ⚠ QBER Monitoring Is Not Optional A QKD deployment without continuous QBER monitoring is operationally blind. The Quantum Bit Error Rate is the primary security and health metric for a QKD link. A sudden QBER increase may indicate fiber tampering, optical component degradation, or an eavesdropping attempt. Configure QBER alerts before the system goes into production, and treat QBER anomalies with the same urgency as a security intrusion event. |
|---|
10.5 Lab Exercise: Simulated QKD Key Exchange
| Lab Prerequisites Python 3.10+ with the following packages: pip install requests cryptography flask OpenSSL 3.5 with oqs-provider (from Chapter 8 lab, or install per Chapter 8 instructions). StrongSwan 6.0+ (optional, for IPsec integration testing). Two terminals (can be on the same machine for this simulation). Estimated time: 45–60 minutes. Note: This lab simulates QKD key generation using a software random number generator. Real QKD hardware uses quantum optical phenomena. The integration pattern demonstrated is identical to production QKD integration. |
|---|
Step 1: Implement a Simulated QKD KMS (ETSI GS QKD 014 API)
This Flask server simulates the ETSI GS QKD 014 REST API that QKD hardware exposes. In production, this server is provided by the QKD vendor; here we implement it to demonstrate the integration pattern:
# simulated_kms.py -- ETSI GS QKD 014 API simulator
from flask import Flask, request, jsonify
import secrets, base64, uuid
from datetime import datetime
app = Flask(__name__)
key_store = {}
# Shared key pool: key_id -> key_bytes
@app.route('/api/v1/keys/<slave_sae_id>/enc_keys', methods=['GET'])
def get_enc_keys(slave_sae_id):
"""Site A endpoint: generate and return new key material."""
num_keys = int(request.args.get('number', 1))
key_size_bits = int(request.args.get('size', 256))
key_size_bytes = key_size_bits // 8
keys = []
for _ in range(num_keys):
key_id = str(uuid.uuid4())
key_bytes = secrets.token_bytes(key_size_bytes)
# In production: these bytes come from the quantum channel
key_store[key_id] = key_bytes
keys.append({
'key_ID': key_id,
'key': base64.b64encode(key_bytes).decode()
})
return jsonify({'keys': keys})
@app.route('/api/v1/keys/<master_sae_id>/dec_keys', methods=['POST'])
def get_dec_keys(master_sae_id):
"""Site B endpoint: retrieve key by ID."""
key_ids = request.json.get('key_IDs', [])
keys = []
for kid in key_ids:
key_id = kid['key_ID']
if key_id in key_store:
keys.append({
'key_ID': key_id,
'key': base64.b64encode(key_store[key_id]).decode()
})
return jsonify({'keys': keys})
if __name__ == '__main__':
app.run(host='127.0.0.1', port=8888, debug=False)
# Production: use HTTPS with mutual TLS client authentication
# Terminal 1: Start the simulated KMS
python3 simulated_kms.py
# Running on http://127.0.0.1:8888
Step 2: Site A -- Request a QKD Key
# Terminal 2: Site A requests a key for Site B
KEY_RESPONSE=$(curl -s \
'http://127.0.0.1:8888/api/v1/keys/site-b-gateway/enc_keys?number=1&size=256')
KEY_ID=$(echo $KEY_RESPONSE | python3 -c \
'import sys,json; print(json.load(sys.stdin)["keys"][0]["key_ID"])')
KEY_MATERIAL=$(echo $KEY_RESPONSE | python3 -c \
'import sys,json; print(json.load(sys.stdin)["keys"][0]["key"])')
echo "Site A received QKD Key ID: $KEY_ID"
echo "Site A key material (first 16 chars): ${KEY_MATERIAL:0:16}..."
Step 3: Sign the Key ID with ML-DSA and Transmit to Site B
# Generate ML-DSA signing key for Site A (if not already done)
openssl genpkey -algorithm ML-DSA-65 \
-provider oqsprovider -provider default \
-out site-a-signing-key.pem 2>/dev/null
openssl pkey -in site-a-signing-key.pem -pubout \
-provider oqsprovider -provider default \
-out site-a-signing-pub.pem 2>/dev/null
# Sign the key ID
echo -n "$KEY_ID" | openssl dgst \
-sign site-a-signing-key.pem \
-provider oqsprovider -provider default \
-binary > key_id_signature.bin
echo "Key ID signed with ML-DSA-65. Signature: $(wc -c < key_id_signature.bin) bytes"
# In production: transmit KEY_ID + signature to Site B over authenticated channel
# Here we simulate by using the same variable in the next step
Step 4: Site B -- Verify Signature and Retrieve Key
# Site B receives KEY_ID and verifies ML-DSA signature
RECEIVED_KEY_ID="$KEY_ID"
# In production: received over network from Site A
# Verify the ML-DSA signature on the key ID
VERIFY_RESULT=$(echo -n "$RECEIVED_KEY_ID" | openssl dgst \
-verify site-a-signing-pub.pem \
-provider oqsprovider -provider default \
-signature key_id_signature.bin 2>&1)
if echo "$VERIFY_RESULT" | grep -q 'Verified OK'; then
echo "ML-DSA signature verified. Retrieving key from KMS..."
else
echo "ERROR: ML-DSA signature verification FAILED. Aborting."
exit 1
fi
# Site B retrieves key material from KMS using verified key ID
SITE_B_KEY=$(curl -s -X POST \
'http://127.0.0.1:8888/api/v1/keys/site-a-gateway/dec_keys' \
-H 'Content-Type: application/json' \
-d "{\"key_IDs\": [{\"key_ID\": \"$RECEIVED_KEY_ID\"}]}" \
| python3 -c 'import sys,json; print(json.load(sys.stdin)["keys"][0]["key"])')
echo "Site B received key material (first 16 chars): ${SITE_B_KEY:0:16}..."
Step 5: Verify Both Sites Hold the Same Key
# Compare key material at Site A and Site B
if [ "$KEY_MATERIAL" = "$SITE_B_KEY" ]; then
echo "SUCCESS: Both sites hold identical QKD-derived key material"
echo "Key ID: $KEY_ID"
echo "Key length: $(echo -n "$KEY_MATERIAL" | base64 -d | wc -c) bytes"
else
echo "FAIL: Key material mismatch between Site A and Site B"
exit 1
fi
Step 6: Use the QKD Key Material for AES-256-GCM Encryption
# Decode the base64 key to hex for OpenSSL
KEY_HEX=$(echo -n "$KEY_MATERIAL" | base64 -d | xxd -p -c 256 | tr -d '\n')
IV_HEX=$(openssl rand -hex 12)
# 96-bit IV for AES-256-GCM
# Site A encrypts a message using the QKD-derived key
echo 'Classified message: quantum-secured payload' > plaintext.txt
openssl enc -aes-256-gcm \
-K $KEY_HEX \
-iv $IV_HEX \
-in plaintext.txt \
-out encrypted.bin
echo "Encrypted payload: $(wc -c < encrypted.bin) bytes"
# Site B decrypts using the same QKD-derived key
SITE_B_KEY_HEX=$(echo -n "$SITE_B_KEY" | base64 -d | xxd -p -c 256 | tr -d '\n')
openssl enc -aes-256-gcm -d \
-K $SITE_B_KEY_HEX \
-iv $IV_HEX \
-in encrypted.bin \
-out decrypted.txt
echo "Decrypted at Site B: $(cat decrypted.txt)"
# Expected: Classified message: quantum-secured payload
Step 7: HKDF Combination with ML-KEM (Hybrid Pattern)
# Combine QKD key with a ML-KEM-derived secret using HKDF
python3 << 'EOF'
from cryptography.hazmat.primitives.kdf.hkdf import HKDF
from cryptography.hazmat.primitives import hashes
import base64, secrets
# Simulate QKD key and ML-KEM shared secret
qkd_key = base64.b64decode("$KEY_MATERIAL")
mlkem_secret = secrets.token_bytes(32) # Simulated ML-KEM shared secret
# Combine via HKDF-SHA384
hkdf = HKDF(
algorithm=hashes.SHA384(),
length=32,
salt=None,
info=b'hybrid-qkd-pqc-v1'
)
combined_key = hkdf.derive(qkd_key + mlkem_secret)
print(f'Hybrid combined key (hex): {combined_key.hex()[:32]}...')
print(f'Combined key length: {len(combined_key)} bytes (AES-256)')
print('Security: Protected unless BOTH QKD channel AND ML-KEM are broken.')
EOF
| Lab Takeaway This lab demonstrates the complete QKD integration pattern: The ETSI GS QKD 014 API provides a vendor-neutral interface for consuming quantum key material. ML-DSA authenticates the classical channel key ID transmission -- preventing man-in-the-middle attacks. Both sites independently derive the same key material without transmitting the key over the network. QKD-derived keys feed directly into AES-256-GCM symmetric encryption -- QKD secures the key, not the data. HKDF combination with ML-KEM provides defense-in-depth: both must be compromised for the session to be broken. In production, replace the simulated KMS with your QKD vendor's hardware-backed KMS implementing ETSI GS QKD 014. |
|---|
Chapter 10 Summary
Before moving to Chapter 11, you should be able to answer these questions:
- Have I evaluated whether QKD is justified for any links in my environment using the four-dimension framework?
- Do I understand that QKD is excluded from U.S. National Security Systems per NSA guidance?
- Can I explain the ETSI GS QKD 014 API integration pattern to a network engineer?
- Have I identified trusted nodes in any QKD architecture I am evaluating and assessed their physical security requirements?
- Have I completed the lab exercise and verified that simulated QKD key exchange produces identical key material at both endpoints?
- Do I understand how HKDF combines QKD and ML-KEM key material into a hybrid session key?
| QKD Is a Complement, Not a Replacement QKD does not replace PQC. It cannot authenticate parties, sign software, or protect data at rest. It secures key exchange for point-to-point links where the infrastructure investment is justified. The right architecture for highest-assurance environments is hybrid: PQC providing the broad foundation (authentication, key exchange, signing) and QKD adding the physics-based key exchange layer for the links that warrant it. For the vast majority of federal systems, PQC alone -- deployed correctly per Chapters 4 through 9 -- is the right answer. QKD is for the cases where the 'vast majority' is not enough. |
|---|
What’s Next
Chapter 11 covers testing, validation, and compliance — how to prove that your migration worked. PQC interoperability testing, FIPS 140-3 considerations, penetration testing quantum-safe configurations, building your compliance evidence package, and continuous monitoring post-migration.
References
[1] ETSI GS QKD 014 v2.1.1. (2022). Quantum Key Distribution (QKD) — Protocol and data format of REST-based Key Delivery API. European Telecommunications Standards Institute. Available at: etsi.org/committee/qkd. [The GS QKD 014 REST API specification implemented in the lab exercise.]
[2] NSA. (2020). Quantum Key Distribution (QKD) and Quantum Cryptography (QC). NSA Cybersecurity Guidance. Available at: nsa.gov. [NSA position: QKD not approved for NSS use; specific limitations cited.]
[3] NSA. (2022, updated December 2024). CNSA 2.0 Cybersecurity Advisory Ver. 2.1. [Confirms QKD exclusion from NSS and DoW systems.]
[4] ID Quantique. (2025). Cerberis XGR QKD System — Technical Specification. Available at: idquantique.com. [Fiber QKD hardware specification; ETSI GS QKD 014 compliance confirmed.]
[5] Toshiba Quantum. (2023). Long-Distance QKD System LD — Product Specification. Available at: toshiba.eu/quantum. [Twin-field QKD 600 km demonstration; rack-mounted form factor.]
[6] RFC 5869. (2010). HMAC-based Extract-and-Expand Key Derivation Function (HKDF). IETF. [HKDF specification used for QKD + ML-KEM key combination in Section 10.3 and lab exercise.]
[7] Wehner, S., Elkouss, D. & Hanson, R. (2018). “Quantum internet: A vision for the road ahead.” Science, 362(6412). [QKD network architecture and trusted node discussion context.]
[8] Huttner, B. et al. (2022). “Long-range QKD without trusted nodes is not possible with current technology.” npj Quantum Information, 8, 108. [Trusted node limitations and twin-field QKD as the path to trusted-node-free long-range QKD.]
[9] OpenQKDNetwork Project. Reference KMS Implementation. Available at: openqkdnetwork.ca. [Open-source ETSI GS QKD 014 KMS reference implementation for research and pilot deployments.]