Can you enable post-quantum key exchange on WireGuard today?
As of the WireGuard documentation checked on 2026-12-03, WireGuard has no setting that turns on post-quantum key exchange. The protocol fixes its algorithms: Curve25519 for the ECDH key exchange, ChaCha20 with Poly1305 for encryption, and BLAKE2s for hashing, all built into the Noise_IKpsk2 handshake. No cipher suite list or certificate setting exists to select a different algorithm. The vendor's known limitations page states that WireGuard is not post-quantum secure by default, and the only documented hook for changing that is the optional pre-shared key.
The pre-shared key is the slot where an external post-quantum handshake result can be placed. The WireGuard known limitations page recommends running a post-quantum handshake on top of WireGuard and inserting the resulting key into that slot, and the wg(8) manual describes the preshared key as included for post-quantum resistance. The protocol page names no post-quantum algorithm for this purpose. Rosenpass is a separate open-source project that pairs with WireGuard through this mechanism, but it is not part of the WireGuard project, and the WireGuard pages checked do not mention ML-KEM, ML-DSA, SLH-DSA, FIPS or CNSA 2.0. Confirm any such support directly with the vendor and in the version you run before recording it as available.
Administrators of WireGuard tunnels and their vendor-risk reviewers should record this as a dependency on an external component, not as a product feature. Check the PresharedKey entries in each /etc/wireguard/INTERFACE.conf file, note whether the pre-shared key came from wg genpsk or an external source, and find out who generates and distributes it between peers, since the quickstart does not document that process. If the key exchange must resist future quantum attacks, ask the vendor in writing for its current position and plan, and treat the pre-shared key as the only documented location for an add-on result.
Which WireGuard settings and components apply to key exchange
This table lists each WireGuard component involved in key exchange, its role, the setting or command that controls it, and the source that documents it. Read it to confirm that no cipher or key exchange setting exists in wg or wg-quick, and that the pre-shared key is the only documented field relevant to post-quantum protection. Verify each entry against the version you run, because the documentation cited here is dated 2026-12-03.
| Component | Role in key exchange | Setting or command | Source |
|---|---|---|---|
| Curve25519 | ECDH key exchange and peer authentication through static public keys | Fixed by protocol, no setting selects it | WireGuard protocol page |
| ChaCha20 with Poly1305 | Authenticated encryption of transport data | Fixed by protocol, no setting selects it | WireGuard protocol page |
| BLAKE2s and HKDF | Hashing and key derivation within the handshake | Fixed by protocol, no setting selects it | WireGuard protocol page |
| Handshake construction | Noise_IKpsk2_25519_ChaChaPoly_BLAKE2s, with the pre-shared key mixed in at the second message | Fixed by protocol, no setting selects it | WireGuard protocol page |
| Pre-shared key field | Optional symmetric layer added to public-key cryptography, the only documented field relevant to post-quantum protection | PresharedKey in wg-quick config, or wg set with a file path | wg(8) manual; wg-quick(8) manual |
| Pre-shared key default | Treated as an all-zero 32-byte value when no pre-shared key is configured | Omit PresharedKey to use the default | WireGuard protocol page |
| genkey | Prints a random private key in base64 | wg genkey | wg(8) manual; WireGuard quickstart |
| pubkey | Derives the base64 public key from a private key on standard input | wg pubkey | wg(8) manual |
| genpsk | Prints a random pre-shared key in base64 | wg genpsk | wg(8) manual |
| Cipher and key exchange settings | No cipher suite list, TLS settings or certificate settings exist in wg or wg-quick | None documented | WireGuard protocol page; wg(8) manual |
How to add a post-quantum pre-shared key to a WireGuard peer
This sequence adds an optional pre-shared key to a WireGuard peer on both ends. WireGuard's protocol and manual describe the pre-shared key as a layer for post-quantum resistance, but the key itself must come from a separate post-quantum handshake such as Rosenpass if post-quantum secrecy is required. Each step ends with a check that confirms the key is in place and matches on both peers.
Generate a random pre-shared key
On one administrator workstation, run
wg genpskto print a random pre-shared key in base64. The wg(8) manual says this key is optional and is included for post-quantum resistance, butgenpskproduces only a random value, not a post-quantum key exchange. If post-quantum secrecy is required, the key should be derived from a separate post-quantum handshake, such as Rosenpass, and not generated this way. Check that the output is a single base64 string and record where it was generated.Store the key in a restricted file
Save the key to a file, for example
/etc/wireguard/peer1.psk, after settingumask 077so the file is created readable only by its owner, following the pattern the WireGuard quickstart shows for private keys. The wg(8) manual says the preshared-key option ofwg settakes a file path, because command line arguments are not considered private on most systems. Check the permissions withls -land confirm that only root or the service account can read the file.Copy the same key to the other peer
Move the key to the other end of the tunnel through a channel you already trust, and store it under the same restricted file settings. The WireGuard quickstart does not describe how peers should exchange keys, so confirm your own distribution method with your security team. Both peers must hold an identical value, because the protocol treats a missing key as an all-zero 32-byte value. Check that the two files match by comparing a hash of each, without printing the key to logs.
Reference the key in both configurations
On each peer, add a
PresharedKeyentry under the matching[Peer]section in/etc/wireguard/INTERFACE.conf, pointing to the restricted file, as shown in the wg-quick(8) manual's example files. If you useSaveConfig = true, the manual says the current interface state is written back to the file on shutdown, so review the file after the change. Check that both configurations reference the same key file and that the entry sits under the correct peer public key.Apply the key to the running interface
Without restarting the tunnel, run
wg set INTERFACE peer PUBLIC_KEY preshared-key /path/to/fileon each peer. The wg(8) manual says the preshared-key option takes a file path, so the key does not appear on the command line. Confirm the command succeeds with no error output, and repeat it on the other peer with the matching public key of its counterpart.Confirm the peer shows a pre-shared key
Run
wg showon each peer and look for apreshared key: (hidden)line under the relevant peer. The output confirms that a pre-shared key is loaded without displaying its value. If the line is absent, recheck the file path and the peer public key used in thewg setcommand. Record the output for your change log.Verify both ends agree and traffic flows
Confirm that both peers show the same pre-shared key status and that the tunnel passes traffic, for example with a ping across the link and a check of the latest handshake time in
wg show. The WireGuard known limitations page says WireGuard is not post-quantum secure by default, so a working tunnel with a pre-shared key does not by itself establish post-quantum secrecy. Confirm with your vendor and the Rosenpass documentation which key source meets your requirement before you describe the result as post-quantum.
Which WireGuard parts the key exchange touches
WireGuard's key exchange uses a small set of keys, each stored in a different place and loaded by a different step. Before you enable the optional pre-shared key, confirm where each key lives on your hosts and how your config files handle it, because the pre-shared key path adds one more secret to manage on every peer pair.
Interface private key
Each WireGuard interface has a private key that is the local half of the Curve25519 ECDH exchange in the handshake. It is generated with wg genkey, and the quickstart says it must be base64 encoded. Keep the file readable only by root (the quickstart uses umask 077), and check that the same key is not reused across interfaces you do not intend to share. Any change to this key requires updating the matching public key on every peer.
Peer public keys
Each peer is identified by its Curve25519 public key, which the handshake uses as static peer authentication. Public keys are derived from private keys with wg pubkey. The sources supplied do not describe how public keys should be distributed between peers, so confirm your distribution method (for example, through your own config management) before you rely on it. A wrong public key on one peer breaks that tunnel.
Optional pre-shared key
The pre-shared key is an optional symmetric key mixed into the handshake for each peer pair. The wg(8) manual describes it as included for post-quantum resistance, and the known limitations page recommends running a post-quantum handshake on top of WireGuard and inserting the resulting key into this slot. When no pre-shared key is set, it is treated as an all-zero 32-byte value, so check that it is actually configured on both sides of each pair. Generate it with wg genpsk.
wg-quick configuration files
The wg-quick tool reads /etc/wireguard/INTERFACE.conf first, then distro-specific paths, and the PrivateKey, PublicKey and PresharedKey entries sit in these files. Because the manual says configuration is read from these paths, a PresharedKey line here must be set on both ends of the pair. Keep these files readable only by root, and do not copy them into shared repositories.
PreUp and PostUp key loading
PreUp, PostUp, PreDown and PostDown entries are script snippets run by bash, and the wg-quick manual suggests using them to keep keys encrypted, for example with pass(1). If your pre-shared key is loaded this way, the key is written to the interface only when the script runs, so confirm that the script finishes before the tunnel comes up. Test the order of these steps on a non-production interface first.
SaveConfig behavior
When SaveConfig is set to true, wg-quick saves the current interface state to the config file on shutdown. This can overwrite your hand-edited keys or your PresharedKey line with the runtime state, so a key loaded through PreUp may be written to disk in plain text. Decide whether SaveConfig should be enabled on hosts that carry the pre-shared key, and check the file after the first shutdown.
Where a post-quantum handshake would feed into WireGuard
The vendor's documented route to post-quantum protection for WireGuard is not a change to the protocol itself. The WireGuard known limitations page recommends running a post-quantum handshake on top of WireGuard and inserting the resulting key into the pre-shared key slot. The protocol page confirms that the handshake, named Noise_IKpsk2_25519_ChaChaPoly_BLAKE2s, mixes the pre-shared key in at the second message position, so the external key becomes part of the tunnel's key material. Administrators who want this path should expect the post-quantum component to live outside WireGuard, with WireGuard consuming its output. The wg tool's genpsk command prints a random pre-shared key, and the PresharedKey entry in the peer section of wg-quick configuration is where a value is set. Confirm with your own deployment whether that key is distributed by hand, by a script, or by another tool, because the quickstart does not document key distribution between peers.
Check the default before you assume protection. The WireGuard protocol page says that when no pre-shared key is configured, the field is treated as an all-zero 32-byte value. A tunnel with an all-zero key therefore gets no additional symmetric layer from the slot, and the optional key is only useful once a real value is set on both peers. The wg(8) manual describes the pre-shared key as an optional symmetric layer included for post-quantum resistance, but it names no post-quantum algorithm, so the strength of the result depends on whatever produced the key. The known limitations page also notes that hashing public keys could enable post-quantum security, but this approach is not part of the Noise Protocol Framework and would not give forward-secure post-quantum secrecy. Plan around that gap rather than treating it as an equivalent option.
Rosenpass is a separate open-source key-exchange project that pairs with WireGuard through pre-shared keys. Its site names Classic McEliece and Kyber and describes the project as meant to pair with WireGuard, but it does not describe Rosenpass as part of the WireGuard project, and it does not mention ML-KEM. The WireGuard home page, protocol page, known limitations page and compilation page, checked on 2026-12-03, do not mention ML-KEM, ML-DSA, SLH-DSA, FIPS or CNSA 2.0. Before choosing a route, confirm with the vendor and your own testing which algorithms a given tool uses, which version you run (Rosenpass lists v0.2.3, dated 3 August 2026, as its latest release), and whether the vendor has published any statement that covers your edition.
How the enablement path differs by deployment
On a standalone Linux host, WireGuard is usually configured in a file at /etc/wireguard/INTERFACE.conf and brought up with wg-quick. According to the wg-quick(8) manual, the tool reads that path first, then distro-specific paths, so confirm which file your host actually loads. The config holds PrivateKey, PublicKey and PresharedKey entries, and the pre-shared key is the slot where a post-quantum key from a separate handshake would be inserted.
- Config location: Check that
/etc/wireguard/INTERFACE.confis the file in use on your host. - Key entries: Each peer section can carry a
PresharedKeyline, which is optional. - Key storage: The wg-quick(8) manual suggests keeping keys encrypted, for example with pass(1) through a
PreUpsnippet. - State saving: With
SaveConfigset to true, the current interface state is written back to the config file on shutdown, so check this setting before editing by hand. - Script hooks:
PreUp,PostUp,PreDownandPostDownrun as bash snippets, which is where a key retrieval step would sit.
Before changing anything, confirm the file path, the SaveConfig setting and the version of wg-quick on your host.
Where wg is called from a script, configuration tool or fleet manager, the key material and interface settings may not live in the wg-quick file at all. The wg(8) manual says the private-key and preshared-key options of wg set take file paths, because command line arguments are not considered private on most systems. A script should therefore pass key files rather than key values on the command line.
- File-based keys: Pass the pre-shared key with a file path to
wg set, not as an inline value. - Key generation: The wg(8) manual says
wg genpskprints a random pre-shared key in base64, which a script can write to a protected file. - Permissions: The quickstart shows
umask 077before generating private keys, and the same care applies to pre-shared key files. - Public keys: The quickstart does not describe how public keys are distributed between peers, so your script must define that step itself.
- Drift: A manager that rewrites interface state can overwrite settings applied by hand, so confirm which tool owns the configuration.
Confirm which script or manager controls each interface, and whether it reads pre-shared keys from files on every run.
The WireGuard known limitations page says WireGuard is not, by default, post-quantum secure, and it recommends running a post-quantum handshake on top of WireGuard and inserting the resulting key into the pre-shared key slot. That handshake is not part of WireGuard itself. Rosenpass is a separate open-source key-exchange project that names Classic McEliece and Kyber and is meant to pair with WireGuard through pre-shared keys. Its site does not describe it as part of the WireGuard project.
- Separate component: The external key source runs alongside WireGuard and writes a key into the pre-shared key slot.
- Refresh behavior: Confirm how often the external source produces a new key and how WireGuard picks it up, because the facts do not describe this.
- Algorithm names: The Rosenpass site names Classic McEliece and Kyber, and does not mention ML-KEM, so confirm which algorithms your chosen project uses.
- Ownership: The WireGuard project does not document this integration, so the external project's documentation is the source for setup.
- Fallback: When no pre-shared key is configured, WireGuard treats it as an all-zero 32-byte value, so a failed key feed must be detected.
Confirm the external project's release, its algorithms and its own support terms before relying on it.
What WireGuard has not published on post-quantum key exchange
The WireGuard project's own pages on the home, protocol, known limitations and compilation topics, checked 2026-12-03, do not name ML-KEM, ML-DSA, SLH-DSA, FIPS or CNSA 2.0, and the quickstart does not explain how pre-shared keys reach peers. Each card below is a gap in the published material and a question to put to the project or to your distributor before you plan a deployment.
No named post-quantum algorithm
The known limitations page says WireGuard is not, by default, post-quantum secure, and the protocol page says the optional pre-shared key could provide post-quantum resistance. Neither page names a post-quantum algorithm, a standard or a parameter set. The home, protocol, known limitations and compilation pages checked on 2026-12-03 do not mention ML-KEM, ML-DSA, SLH-DSA, FIPS or CNSA 2.0. Ask the project which algorithm it would accept for a post-quantum component, which standard it follows, and whether it will publish a specific version or date. Until that answer is written down, record the gap as open in your inventory.
Known limitations pagePre-shared key distribution is undocumented
The wg(8) manual describes genpsk, which prints a random pre-shared key in base64, and the optional PresharedKey setting. The quickstart covers only key generation with wg and says nothing about genpsk, PresharedKey, or how public keys should be exchanged between peers. The protocol page treats an absent pre-shared key as an all-zero 32-byte value. Ask the project for a documented, approved method to create, transfer and rotate a pre-shared key across peers, and ask your distributor whether any tooling does this for you. Without that method, the post-quantum layer that depends on a pre-shared key has no defined path to production.
Quickstart pageRosenpass is not part of the project
The known limitations page recommends running a post-quantum handshake on top of WireGuard and inserting the resulting key into the pre-shared key slot. The separate Rosenpass project names Classic McEliece and Kyber and is meant to pair with WireGuard through pre-shared keys. Its site does not describe it as part of the WireGuard project and does not mention ML-KEM. Ask the WireGuard project whether it endorses, maintains or tests any such pairing, and ask Rosenpass which algorithms and release it supports. Treat the two projects as separate products with separate support, unless each one says otherwise in writing.
Rosenpass siteNo post-quantum signature support
WireGuard uses Curve25519 for ECDH key exchange with static peer public keys, and the protocol page documents no certificates or certificate authorities. Because no signature algorithm is part of the design, there is nothing to swap for a post-quantum signature scheme, so the signature question does not apply to this protocol as documented. Confirm that the same holds for the version and build you run, and ask the project to state in writing that no signature or certificate path exists. Do not treat that as a completed migration, since peer authentication still rests on the elliptic-curve static keys.
Protocol pageHashed public keys are not a full answer
The known limitations page says that hashing public keys before sending them could enable post-quantum security, but that the approach is not part of the Noise Protocol Framework and would not give forward-secure post-quantum secrecy. The project has therefore described this option without adopting it. Ask whether the project plans to adopt this technique, what it would mean for compatibility with existing peers, and what it protects against. Record that no published design delivers forward-secure post-quantum secrecy for the current handshake.
Known limitations pageWhat goes wrong when a pre-shared key is used for post-quantum protection
The most common failure is a mismatched or missing pre-shared key on one side of a tunnel. WireGuard's protocol treats an unset pre-shared key as an all-zero 32-byte value, so a peer that has no PresharedKey entry will not fail the way a peer with the wrong key does. If one end has a real key and the other has none, or the two keys differ, the handshake cannot complete and the tunnel stays down. If the key is absent on both ends, the tunnel comes up with no added symmetric layer at all. Check each peer's configuration on both sides, and confirm with wg show that the expected peer shows a preshared key before you treat the tunnel as protected.
The key itself has to be distributed and rotated like any other secret. The wg(8) manual describes genpsk for generating a random key, and the wg(8) manual says the preshared-key option takes a file path rather than a value on the command line, because arguments are not considered private on most systems. The quickstart does not document how peers should exchange these keys, so the transfer method, storage permissions and rotation schedule are decisions your team has to make and record. Keep the key file readable only by root, and plan a rotation procedure before you deploy rather than after.
The pre-shared key adds only symmetric-key protection on top of the existing Curve25519 exchange. It does not replace the public-key handshake, so the key exchange and peer authentication still rest on elliptic-curve keys, and the wg(8) manual frames the pre-shared key as a layer intended for post-quantum resistance without naming an algorithm. If you feed a key from an external handshake tool into this slot, that tool becomes an additional dependency. Its own key exchange, its update cadence, its process restarts and its failure behavior all become part of your tunnel's availability, and the WireGuard known limitations page does not describe how such tools should be deployed or monitored. Confirm the tool's version, its upstream status and its failure behavior with its project before you rely on it.
Questions about enabling post-quantum key exchange on WireGuard
Is WireGuard quantum safe by default?
No. The WireGuard known limitations page says WireGuard is not, by default, post-quantum secure. Its handshake uses Curve25519 elliptic-curve Diffie-Hellman with static peer public keys, and that public-key layer is what a future quantum computer could threaten. The protocol also has no certificates or signature algorithms, so there is nothing else to switch. The one built-in hook is the optional pre-shared key, which the protocol page says could provide post-quantum resistance without naming any algorithm. Adding a key to that slot does not make a tunnel quantum safe on its own. Whether a given setup meets your requirements depends on how the key is produced and distributed, which you need to confirm for your own deployment.
Is there a WireGuard setting that turns on post-quantum support?
No. The wg(8) manual and the WireGuard protocol page describe no cipher suite list, TLS settings or certificate options, and the algorithms are fixed by the protocol. The only related option is the preshared key, which is optional and is described in the manual as an added layer of symmetric-key cryptography included for post-quantum resistance. The WireGuard project's own pages checked on 2026-12-03 do not mention ML-KEM, ML-DSA, SLH-DSA, FIPS or CNSA 2.0. The known limitations page recommends running a post-quantum handshake on top of WireGuard and inserting the resulting key into the pre-shared key slot. Ask the vendor directly whether a native option is planned, since none is documented.
Does adding post-quantum key exchange to WireGuard cost extra?
The facts supplied do not state a price, and no licence fee is documented for WireGuard, which is open source. The costs that matter are effort costs. Someone has to choose and run the separate key-exchange process, generate and rotate the resulting key, and place it in the pre-shared key slot on every peer. Each peer needs the same secret, so the effort grows with the number of tunnels and the number of clients. Ask any party quoting this work to break down who does each step, what runs once and what recurs with each key rotation, and which peers and platforms the work covers. Quotes from DeployOpen follow from a written scope, and we do not publish a price list.
Which WireGuard version adds post-quantum key exchange?
The facts supplied do not name any WireGuard version that adds post-quantum key exchange, and the project's pages checked on 2026-12-03 document none. What is documented is the pre-shared key mechanism, which is part of the protocol design, and the known limitations page's advice to layer a post-quantum handshake over it. Do not assume a newer release changes this. Check the release notes and the project's current pages for your installed version, and confirm with the vendor or project maintainers before you plan around any version number.
What can an administrator do today to prepare?
Start with an inventory of every tunnel, interface and peer, and record which ones use a pre-shared key today. The quickstart shows how keys are generated with wg, and the wg(8) manual shows that genpsk prints a random pre-shared key. Keep private keys and pre-shared keys in files with restricted permissions, and pass them by path, because the manual notes that command-line arguments are not considered private on most systems. The wg-quick manual suggests keeping keys encrypted, for example through PreUp with pass(1). Then decide how a post-quantum key exchange would feed the pre-shared key slot and who owns that key lifecycle. Test any chosen method in a lab before changing production peers.
What should I ask the vendor about post-quantum plans for WireGuard?
Ask whether a native post-quantum or hybrid key exchange is planned, which algorithms it would use, and which version would first include it. Ask whether the project will document a supported key-distribution method for pre-shared keys, because the quickstart does not describe one. Ask what the project's position is on the external option named in its known limitations page, and whether any third-party tool is endorsed. Ask for the release notes and any transition guidance in writing, with dates. Also confirm whether the project will address certificates and signatures in future, since the current design uses none. Record each answer with its date, because the project's pages can change.
How DeployOpen helps with WireGuard post-quantum readiness
DeployOpen works on WireGuard post-quantum key exchange as a fixed-scope engagement inside your own infrastructure. We start by agreeing in writing which WireGuard interfaces, peers and key files are in scope, then build and test any pre-shared key process against your environment and hand over documented, reviewable results.
How we scope
- Agree in writing which WireGuard interfaces, peers and hosts are covered by the work
- List where private keys, public keys and pre-shared keys are stored and who can read them
- Confirm the peer software versions and whether each peer can accept a pre-shared key
How we build
- Set up key file handling with restricted permissions and paths passed to wg set rather than inline values
- Test any pre-shared key distribution in a lab copy before changing production peers
- Check each peer after the change to confirm handshakes complete and traffic flows as expected
How we hand over
- Deliver a written record of each interface, peer and key location and the settings changed
- Document the test steps, results and rollback procedure so your team can repeat them
- Walk your administrators through the configuration files and key handling process
How we support
- Offer ongoing support and upgrades as a retainer after the initial handover
- Retest peer configuration after WireGuard, kernel or tooling upgrades if you request it
- Agree the support scope and response expectations in writing alongside the original work

