OpenBSD Handbook

    Theme
    • Part I. Install & Configure
      • Introduction to OpenBSD
      • Installing OpenBSD
      • The X Window System
      • The Wayland Display System
      • Networking on OpenBSD
      • System Configuration
      • OpenBSD Basics
      • Managing Software: Packages and Ports
    • Part II. Daily Operations
      • OpenBSD Desktop Environments
      • Multimedia
      • Printing
      • Linux Compatibility
      • Windows Compatibility
      • Games
    • Part III. System Administration
      • Virtualization
      • Storage and File Systems
      • Updating and Upgrading
      • Localization
      • The OpenBSD Boot Process
      • Security
        • Post-Quantum Cryptography on OpenBSD
    • Part IV. Networking & Daemons
      • Services
        • Database
          • MariaDB
          • PostgreSQL
          • Redis
          • memcached
        • Directory
          • YP (NIS)
          • LDAP
        • File
          • NFS
          • Samba
        • FTP Services
          • ftpd
          • ProFTPD
          • vsftpd
          • Pure-FTPd
          • TFTP
        • Mail
          • OpenSMTPD Mail Server
          • Dovecot IMAP and POP3 Server
          • Postfix
          • Exim
          • Rspamd
        • Name
          • Unbound DNS Resolver
          • NSD Authoritative DNS Server
          • BIND DNS Server
        • Networking
          • OpenBGPD
          • rad
          • DHCP on OpenBSD
          • slaacd
        • Web
          • Apache HTTP Server
          • nginx Web Server
          • OpenBSD httpd Web Server
          • relayd Reverse Proxy
        • Logging
          • syslogd
        • Monitoring
          • SNMP
        • Remote Access
          • Audit OpenSSH
          • OpenSSH Server
        • File Synchronization
          • rsync
        • Messaging
          • RabbitMQ Message Broker
        • Time
          • NTP Time Synchronization
        • Load Balancing
          • Build Redundant Load-Balanced Gateways
          • Load Balance Services with NAT or DSR
          • Build an HA HTTPS Load Balancer
      • PF
        • pfctl cheat sheet
        • PF Anchors
        • PF Filter Rules
        • PF Forwarding
        • PF Lists and Macros
        • PF Load Balancing
        • PF Logging
        • PF NAT
        • PF Options
        • PF Policies
        • PF Shortcuts
        • PF Tables
      • Advanced Networking
        • High Availability and State Replication
        • Multi-WAN and Policy-Based Routing
        • VPN and Cryptographic Tunneling
        • Classic and Lightweight Tunnels
        • IPv6 at Scale
        • QoS and Traffic Shaping
        • MPLS and Label Distribution
        • Network Services at Scale
        • Virtualization and Host Networking
        • Large-Scale L2 and L3 Design
        • Telemetry, Logging, and Flow Export
        • Hardening and Operational Safety
        • Reference Architectures
        • Troubleshooting Playbooks
      • Serial Communication
    • Part V. Miscellaneous
      • Virtualization Cheat Sheet
      • OpenBSD Cheatsheet
      • How-to Guides
        • Installation and First Boot
          • Complete the First 30 Minutes After Installation
          • Check Hardware Compatibility Before Installing
          • Bootstrap Wi-Fi Firmware Without Ethernet
          • Run OpenBSD as a Virtual Machine Guest
          • Install OpenBSD on a VPS or Cloud Server
          • Install OpenBSD with Full-Disk Encryption
          • Run FreeBSD on OpenBSD with vmd
          • Dual-Boot OpenBSD on a UEFI System
          • Automate OpenBSD Installation with Autoinstall and PXE
        • Desktops and Laptops
          • Set Up OpenBSD as a Laptop or Workstation
          • Configure Laptop Power Management
          • Troubleshoot Web Browsers on OpenBSD
          • Run Sway on OpenBSD
          • Use Plan 9 Tools on OpenBSD
          • Build a Minimal Desktop with suckless Tools
          • Install Z shell (zsh)
        • Networking and Remote Access
          • Create an Administrator Account with doas and SSH Keys
          • Configure Secure Remote Access with OpenSSH
          • Use FIDO Security Keys with OpenSSH
          • Configure Wi-Fi Roaming and Wired Failover
          • Troubleshoot PF, NAT, and Routing
          • Route Multiple VLANs with PF
          • Configure a Road-Warrior WireGuard VPN
          • Route IPv6 Networks without NAT
          • Test OpenBGPD with Two Providers
          • Unlock an Internal Service with an SSH Key
          • Build a Simple Router and Firewall
        • Servers and Services
          • Set Up WordPress on OpenBSD
          • Build a Mail Server with OpenSMTPD, Dovecot, and Rspamd
        • Security, Maintenance and Recovery
          • Establish a Conservative Security Baseline
          • Recover Access and Reset the Root Password
          • Collect OpenBSD Diagnostic Evidence
          • Troubleshoot Package Installation and Update Failures
          • Schedule Recurring Maintenance
          • Monitor an OpenBSD System
          • Back Up and Restore an OpenBSD System
          • Configure softraid RAID1
          • Recover an OpenBSD System That Does Not Boot
        • Building, Automation and Virtual Machines
          • Manage OpenBSD with Ansible
          • Build Third-Party Software from Ports
          • Build OpenBSD from Source
          • Plan a Docker Workload Migration to OpenBSD
      • OpenBSD for Linux Users
      • OpenBSD for FreeBSD Users
      • OpenBSD for macOS Users
    • OpenBSD FAQ
    • OpenBSD Handbook Style Guide
    • OpenBSD Architectures
      • OpenBSD Package Search
        • Synopsis
        • Release and Service Support
        • Administrative Priorities
        • Signatures and Interoperability

        Post-Quantum Cryptography on OpenBSD

        Synopsis #

        A party can record an encrypted SSH or TLS connection today and retain it until a future quantum computer can recover a classical key exchange. This harvest-now, decrypt-later risk matters most for credentials, backups and records that must remain confidential for years. Hybrid key exchange combines a classical shared secret with a post-quantum one. A connection can use it with an existing classical host key or certificate.

        On OpenBSD 7.9 and 8.0, base OpenSSH already prefers ML-KEM/X25519. The important TLS distinction on 7.9 is between libssl and the group list selected by libtls applications. OpenBSD 8.0 brings the hybrid group into the libtls default and adds composite SSH authentication. See the 7.9 release notes and 8.0 release notes.

        Release and Service Support #

        TechnologyOpenBSD 7.9OpenBSD 8.0Operational check
        SSH key exchangeOpenSSH 10.3 prefers ML-KEM/X25519OpenSSH 10.6 retains that preferenceAudit the negotiated SSH exchange
        SSH authenticationClassical host and user keysComposite ML-DSA-44/Ed25519 permitted. Both peers need the algorithm and the signer needs a composite key.Check host and user signatures
        Base HTTPSLibreSSL 4.3 implements the TLS 1.3 hybrid group. The libtls default omits it.LibreSSL 4.4 and libtls prefer X25519MLKEM768 with compatible peers.httpd and relayd
        Packaged web serversCheck the linked TLS library and configured groups.Packaged nginx with LibreSSL 4.4 negotiated hybrid TLS using defaults. Check Apache’s module separately.nginx and Apache
        TLS authenticationExisting RSA or ECDSA certificates remain classical.Same. Ports OpenSSL 3.5 can authenticate with ML-DSA in a controlled trust domain.Check the peer signature
        Mail transportOpenSMTPD uses base libtls. Inspect packages separately.A capable TLS peer can agree on the hybrid group. Each SMTP or IMAP connection has its own policy.SMTP and IMAP probes
        IKEv2Optional private sntrup761x25519 group in base ikedSame. The ordinary IKE authentication PSK serves a different purpose.IKE proposal on both gateways
        WireGuardOptional per-peer random symmetric secretSame. The public-key handshake remains classical.WireGuard peer configuration
        OpenVPNPackage and TLS backend determine available control-channel groups.Same. Verify both peers and any explicit tls-groups setting.OpenVPN 2.7 manual
        DNSSEC and disk encryptionDNSSEC signs records. Disk encryption uses symmetric keys.Same. Each has a separate key lifecycle.DNSSEC signing policy and encrypted volumes

        For SSH configuration, inspect the server policy, verify host identity before changing credentials, and distinguish hardware-backed user keys from the transport key exchange.

        For a complete mail installation, test the integrated stack. Check the individual listeners for OpenSMTPD, Postfix and Dovecot.

        Administrative Priorities #

        1. Start with long-lived secrets. Test a new administrative SSH connection and a backup connection with the account, hostname and client used in production.
        2. Probe each public TLS endpoint and each separately encrypted backend. Record the negotiated group, peer signature, certificate result, service build and date. Repeat after OS, package or proxy upgrades.
        3. For VPNs, agree on the exchange or independent shared-secret provisioning with the other operator. Establish a fresh tunnel and test traffic in both directions.
        4. Inventory signing and recovery keys separately. Pilot new signature types with a second trusted credential and a tested recovery path.

        Signatures and Interoperability #

        ML-KEM (FIPS 203) specifies key encapsulation. ML-DSA (FIPS 204) and SLH-DSA (FIPS 205) specify signatures. Certificate formats exist for ML-DSA and SLH-DSA. Deployment also requires a signing authority, protocol support, and clients that trust and validate the resulting chain. A classical certificate can remain in service while the key exchange changes.

        The amd64 7.9 packages include OpenVPN 2.7.2 and the 8.0 packages include 2.7.7. The standard binaries require base libssl. The -mbedtls flavor uses a different library. Use openvpn --version to identify the installed backend. On a separate test profile, require TLS 1.3 with tls-version-min 1.3 and restrict tls-groups to X25519MLKEM768. A successful fresh, certificate-validated OpenVPN control connection demonstrates that the two peers accept that group. A forced test does not show normal selection. The upstream OpenSSL backend’s --show-groups output can omit hybrid groups.

        OpenVPN’s tls-crypt wraps its TLS control channel with a shared key. Compromise of that wrapping key removes its additional protection for recorded control traffic. It does not change the certificate signature scheme. Check the TLS library, group policy and peer negotiation before assigning any protection to an OpenVPN deployment. See the OpenVPN 2.7 manual.

        The IANA DNSSEC algorithm registry lists algorithm 18 (ML-DSA-44) with an informational reference. Check the authoritative signer, validating resolvers, registrar and parent before changing a zone. DNSSEC signs DNS data and provides no transport encryption.

        OpenPGP RFC 9980 specifies composite encryption and signature algorithms for messages. Existing recipient keys and encrypted archives retain their original algorithms. Before issuing new keys, verify compatible implementations, key formats and a complete decrypt-and-verify round trip with each recipient.

        Report a bug
        • Synopsis
        • Release and Service Support
        • Administrative Priorities
        • Signatures and Interoperability