Where WireGuard uses cryptography: Curve25519 handshake, pre-shared keys

WireGuard fixes its algorithms in the protocol, so the inventory is mostly about static keys, optional pre-shared keys and the files and scripts that hold them. This entry lists where each sits and what to record.

On this page

Where WireGuard uses cryptography in your environment

If you are building a cryptographic inventory, WireGuard needs its own entry, and the algorithms it uses are fixed by the protocol. WireGuard does not offer a cipher suite list, TLS settings, certificates or certificate authorities, so there is no configuration setting that selects a different algorithm. The public-key work is done by Curve25519 for Diffie-Hellman key exchange, with ChaCha20 with Poly1305 for authenticated encryption, BLAKE2s for hashing and HKDF for key derivation, as named on the WireGuard protocol page. Record these as protocol properties tied to the WireGuard version you run, not as settings your team chose.

The entry should cover five areas: the handshake, static keys, pre-shared keys, configuration files, and management and updates. The handshake uses the Noise_IKpsk2_25519_ChaChaPoly_BLAKE2s construction, and peer authentication rests on static Curve25519 public keys, so the protocol has no signature algorithms or certificates to inventory. Static keys are generated with wg genkey and derived with wg pubkey, and they live in files such as /etc/wireguard/INTERFACE.conf as PrivateKey and PublicKey entries. Pre-shared keys are optional and are created with wg genpsk. When none is configured, the protocol treats it as an all-zero 32-byte value, which your inventory should note explicitly.

Assign ownership to the engineer who runs the WireGuard endpoints, with the security lead signing off on the record. Confirm in your own environment which key files exist, whether any PresharedKey entries are set, and whether PreUp or PostUp scripts read or write key material. The WireGuard known limitations page states that WireGuard is not, by default, post-quantum secure, and the vendor has published no ML-KEM, ML-DSA or FIPS statements on its pages checked on 2026-12-03, so record that status as of that date and recheck before your review.

Every place WireGuard uses cryptography, row by row

This table lists each cryptographic area in WireGuard, what it protects, the algorithm family the protocol page names, whether it depends on public-key algorithms, and where it is configured. Read the public-key column first, since the Curve25519 handshake and static keys are the parts that a post-quantum migration must address.

AreaWhat it protectsAlgorithm familyDepends on public-key algorithmsWhere configured
HandshakeMutual peer authentication and session key agreement between two peersCurve25519 ECDH within the Noise_IKpsk2_25519_ChaChaPoly_BLAKE2s constructionYes, the key exchange rests on Curve25519 with static peer public keysFixed by the protocol; no setting selects it
Static keysIdentity of each peer, established by its long-term private and public key pairCurve25519 key pairs, base64-encodedYes, these keys are the public-key identity of each peerGenerated with wg genkey and pubkey; stored in PrivateKey and PublicKey entries in the interface config file
Pre-shared keyOptional extra symmetric secret mixed into the handshake, which the project says may add post-quantum resistanceSymmetric key, base64-encoded, generated with wg genpskNo, but it does not replace the Curve25519 exchange, which stays in placePresharedKey entry per peer; the wg set option takes a file path
Hashing and key derivationHandshake transcript integrity and derivation of session keysBLAKE2s for hashing, HKDF for key derivationNoFixed by the protocol; no setting selects them
Data protectionConfidentiality and integrity of tunnel traffic after the handshakeChaCha20 with Poly1305 for authenticated encryptionNo, data packets use symmetric keys derived from the handshakeFixed by the protocol; no setting selects it
Key storage in config filesProtection of private keys and pre-shared keys on disk and in scriptsNot a cryptographic algorithm; depends on file permissions and any encryption the administrator addsNot applicable to the algorithm; the stored keys are the Curve25519 and symmetric keys abovewg-quick config files under /etc/wireguard, PreUp and PostUp script snippets
Management, firmware and updatesKey rotation, firmware signing and update integrity for WireGuard builds and toolsNot documented by the vendor in the facts suppliedNot documented by the vendorNot documented by the vendor

Which WireGuard primitives protect each flow

WireGuard does not offer a cipher suite list, TLS settings or certificates. Each flow is protected by a fixed set of primitives defined by the protocol, so the question is which primitive covers which job and whether any of them can be changed. The cards below map each primitive to its role and the sources that document it.

Curve25519 ECDH for key exchange

Curve25519 provides the Diffie-Hellman key exchange that establishes shared secrets during the handshake, using each peer's static public key. Because peer authentication rests on these static keys, this is the primitive that carries the public-key dependence on an elliptic curve. The WireGuard protocol page documents it as fixed, and the wg(8) manual shows no setting that selects another curve. Check that no configuration key or wg option changes it before you record it in an inventory.

WireGuard protocol page

ChaCha20-Poly1305 for data encryption

ChaCha20 with Poly1305 provides authenticated encryption for the tunnel's data packets once the handshake completes. This is symmetric cryptography keyed from the handshake, so it does not by itself create the public-key exposure. Record it as a fixed component in your inventory, since the protocol page lists it without any option to select an alternative.

WireGuard protocol page

BLAKE2s for hashing

BLAKE2s serves as the hash function within the handshake and key derivation steps. It is part of the fixed Noise_IKpsk2_25519_ChaChaPoly_BLAKE2s construction, so it appears in every tunnel regardless of configuration. Confirm this against the protocol page for your WireGuard version, since the hash is not exposed as a setting in the wg(8) manual.

WireGuard protocol page

SipHash24 for hashtable keys

SipHash24 protects internal hashtable keys and is not used for transport security or key exchange. Its role is local to the implementation, so it is unlikely to need a post-quantum review on its own. Listing it in the inventory still helps reviewers see every primitive the protocol page names, and it confirms that no setting changes it.

WireGuard protocol page

HKDF for key derivation

HKDF derives the session keys from the shared secrets produced by the handshake, including the step where the optional pre-shared key is mixed in. Because the pre-shared key enters through this derivation, HKDF is the point where a post-quantum secret could be combined with the classical exchange. Check your deployment's use of PresharedKey against the protocol page, since the quickstart does not document distribution of that value.

WireGuard protocol page

Noise_IKpsk2 handshake construction

Noise_IKpsk2_25519_ChaChaPoly_BLAKE2s names the full handshake that combines the primitives above, with the pre-shared key mixed in at the second message. The name is the single record to cite when documenting the protocol in an inventory, because it lists every primitive in one place. The known limitations page says WireGuard is not post-quantum secure by default, and the protocol page says the pre-shared key could add post-quantum resistance without naming an algorithm.

WireGuard known limitations

Static keys, pre-shared keys and where each is stored

Each WireGuard interface has a static Curve25519 private key that identifies it in the handshake. The wg genkey command prints a random private key in base64. The quickstart sets umask 077 before writing it, so the file is readable only by its owner. In a standard wg-quick setup, the key sits in the PrivateKey entry of /etc/wireguard/INTERFACE.conf, and the wg set option takes a file path rather than the key itself.

  • Generation: wg genkey prints a random base64 private key, usually written to a file under a restrictive umask.
  • Location: the PrivateKey entry in /etc/wireguard/INTERFACE.conf, or a file path passed to wg set.
  • Rotation: the administrator of the host generates a new key and updates every peer that holds the matching public key.
  • Protection: the wg-quick(8) manual suggests keeping keys encrypted, for example by decrypting them with pass in a PreUp script.
  • Interface state: if SaveConfig is true, wg-quick writes the current interface state back to the config file on shutdown.

Confirm the file mode, owner and backup location of each private key on every host, since the protocol does not check them.

How administrators reach WireGuard and what protects each path

Administrators reach WireGuard through two command-line tools. wg handles the interface and peer state, and wg-quick brings interfaces up and down from configuration files, typically /etc/wireguard/INTERFACE.conf. The private keys sit in these files, so the file permissions and the account that can read them are the first controls to confirm. The wg(8) manual notes that wg set takes the private-key and preshared-key options as file paths rather than key values, because command-line arguments are not considered private on most systems. Check that scripts and runbooks follow that pattern and do not paste key material into shell history or process listings.

The PreUp, PostUp, PreDown and PostDown entries in a configuration run as bash snippets with the privileges of the wg-quick run, so any script there can read, hold or print keys. The wg-quick(8) manual suggests keeping keys encrypted and fetching them at run time, for example through pass(1) in PreUp. Review every hook for logging, outbound calls and file writes. Separately, SaveConfig, when set to true, rewrites the config file on shutdown with the current interface state, which can change the file's contents and comments. Confirm whether it is enabled on each host, and keep a copy of the file under version control so a rewrite does not silently drop keys or settings.

The vendor documents no web interface, API or central management layer for WireGuard. Any dashboard, orchestration tool or fleet manager that pushes configuration is set by the customer or by a third-party tool, and its own authentication, storage of keys and logs must be recorded separately from the WireGuard inventory. Ask who operates each such layer, where it keeps private keys, and whether its administrator logins use multi-factor authentication. Record those answers as their own rows in the inventory, because a compromise of that layer reaches the same keys that wg and wg-quick use.

Software, kernel module and update channels to record

WireGuard's cryptography is fixed by the protocol, so the software you run determines what you can verify. Record the kernel module, userspace tools, packaging channel and scripts that touch keys, since each one can change how keys are generated, stored and applied.

Kernel module or implementation in use

Record whether you run the in-kernel WireGuard module or a userspace implementation, along with its exact version. The protocol primitives (Curve25519, ChaCha20-Poly1305, BLAKE2s, HKDF) and the Noise_IKpsk2 handshake live in the implementation, and the WireGuard protocol page documents no setting that changes them. Confirm the version with your distribution or the project before scoping any change. Note that the protocol has no post-quantum algorithm by default.

WireGuard protocol page

Userspace tools and their versions

Inventory the wg and wg-quick binaries on every host, including the version reported by each. The wg tool generates private keys, derives public keys and generates pre-shared keys (genkey, pubkey, genpsk), so its version determines how those keys are produced. Record each tool's source package so you can trace where its key-handling code came from.

wg(8) manual

Distribution packaging channel

Record which repository or package source delivers the WireGuard module and tools on each host, and whether the packages are signed by the distribution. The WireGuard project's documentation does not describe package signing or secure boot, so confirm package signing and secure boot behavior with your distribution or platform vendor. Also note the update cadence the channel follows, since that sets when a changed key-handling default could reach you.

Script hooks in wg-quick configs

List every PreUp, PostUp, PreDown and PostDown entry in each INTERFACE.conf, since wg-quick runs these as bash snippets. A hook can read or write key material, so review any that touch files or external commands. The wg-quick manual suggests keeping keys encrypted, for example through pass(1) in PreUp. Also record whether SaveConfig is enabled, because it writes the live interface state back to the config file on shutdown.

wg-quick(8) manual

Key files and their locations

Record where each private key and pre-shared key file lives, its permissions and which hosts hold copies. The wg manual notes that key arguments take file paths because command line arguments are not private on most systems, and the quickstart creates keys under umask 077. Check that files sit where your configs expect, since wg-quick reads /etc/wireguard/INTERFACE.conf first and then distro-specific paths.

Vendor statements on image and update signing

Record what your distribution or platform vendor has published about signing images, kernel modules and updates that include WireGuard. The WireGuard project's home page, protocol page and known limitations page do not describe image or update signing, and they do not mention FIPS or CNSA 2.0. Treat this as an open item to confirm in writing with each vendor, dated on the day you ask.

Fields to record for each WireGuard item in your inventory

This table lists the fields to capture for each WireGuard interface and peer, with what to record and where to find it. Use it as a checklist when building the inventory, and confirm values in your own environment, since the protocol fixes the algorithms and the configuration files hold the key material.

FieldWhat to recordWhere to confirm
Product, version and patch levelWireGuard implementation (kernel module or userspace), its version and any applied patchesOutput of your installed wg tools and kernel module version, plus your distribution's package record
Owner and host locationTeam responsible for the interface and the host or cloud account where it runsYour asset register and the host's configuration management records
Protocol and construction nameNoise_IKpsk2_25519_ChaChaPoly_BLAKE2s, the handshake the protocol namesWireGuard protocol page, which fixes this construction for each session
Algorithm familyCurve25519 for key exchange, ChaCha20 with Poly1305 for encryption, BLAKE2s for hashingWireGuard protocol page, since no setting selects these algorithms
Key length (Curve25519 and pre-shared key)32 bytes for each Curve25519 key and each pre-shared keywg(8) manual and key file contents, which hold base64 keys
Key file location and permissionsPath of each private key and pre-shared key file, and its owner and modewg-quick(8) config location and file system permissions on each host
Pre-shared key setYes or no for each peer, noting that an all-zero 32-byte value applies when none is configuredPresharedKey entries in each interface or peer config, and the WireGuard protocol page default
Confidentiality period of protected dataHow long the traffic carried by this tunnel must stay confidential, set by your data ownerYour data classification records and retention rules, not a WireGuard setting
Configurable or fixed by protocolMark algorithms and handshake as fixed by protocol, and pre-shared key and key file paths as configurableWireGuard protocol page and wg(8) manual, which name no cipher suite list or certificate settings

Which WireGuard items depend on public-key algorithms

The items in scope for a post-quantum review are the static Curve25519 keys that each WireGuard peer holds. WireGuard's handshake uses Curve25519 elliptic-curve Diffie-Hellman (ECDH) with the peers' static public keys, so the key exchange and peer authentication rest on an elliptic-curve algorithm. The protocol has no certificates, certificate authorities or signature algorithms, so the public-key dependency is limited to these key-exchange keys. Each peer's private key, the matching public key that other peers are configured with, and the PrivateKey and PublicKey entries in wg and wg-quick configuration files are the inventory items to record.

The other primitives in the protocol are symmetric or hash functions and fall outside the public-key question. The protocol page lists ChaCha20 with Poly1305 for authenticated encryption, BLAKE2s for hashing, SipHash24 for hashtable keys, and HKDF for key derivation. None of these is a public-key algorithm, so they do not need to be listed as public-key dependencies, though the reader should still note that the handshake name, Noise_IKpsk2_25519_ChaChaPoly_BLAKE2s, is the record that identifies them.

The optional pre-shared key is symmetric. The wg(8) manual says it adds a layer of symmetric-key cryptography on top of the public-key cryptography and is included for post-quantum resistance, and the protocol page says it could provide post-quantum resistance without naming an algorithm. Confirm with the project whether any specific post-quantum algorithm is intended before relying on it. The known-limitations page states that 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. For the detail on RSA and elliptic-curve dependence, see the sibling page on which WireGuard functions depend on RSA and elliptic-curve keys. For what the project supports today, see the sibling page on whether WireGuard supports post-quantum cryptography.

How to gather WireGuard cryptography details from your hosts

This sequence records which WireGuard interfaces run on each host, which keys and pre-shared keys peers use, and where the configuration and private key files live. The result is an inventory of the cryptographic inputs that the Curve25519 handshake and optional pre-shared keys depend on, which you can then check against the vendor questions.

  1. Confirm WireGuard version and kernel implementation

    On each host, identify whether WireGuard runs as the in-kernel module or as a userspace implementation, and record the version of the wg and wg-quick tools. Run the wg command with no arguments to confirm the tool is installed and to see which interfaces are active. Record the output with the hostname and the date, so later changes can be compared. The step is done when you have a version string and the implementation type for every host in scope.

  2. List active interfaces and their public keys

    Run wg show to list each active WireGuard interface, and for each one record the interface name, its public key, and its listening port. The public key is derived from the private key using Curve25519, so this value identifies the interface during the handshake. Save the output to a file in a restricted location. The step is done when every active interface appears in your record with its public key.

  3. Record peer entries and pre-shared key presence

    For each interface, note every peer entry shown by wg show, including the peer public key and allowed IPs. For each peer, check whether the output reports a preshared key. The wg manual says the preshared key is optional, and when none is configured the protocol treats it as an all-zero value. Mark each peer as having or lacking a pre-shared key. The step is done when every peer has a recorded status.

  4. Inspect configuration files under etc wireguard

    Locate the interface configuration files, which wg-quick reads first from /etc/wireguard/INTERFACE.conf and then from distribution-specific paths. Open each file and note the PrivateKey, PublicKey and PresharedKey entries, along with any SaveConfig setting. If a PresharedKey value is written inline in the file, flag it for review, since the wg manual shows file paths as the safer option for key material. The step is done when every interface configuration file is located and its key entries are listed.

  5. Check file permissions on private keys

    For every file that holds a private key or pre-shared key, run ls -l to check the permissions and owner. The WireGuard quickstart sets a umask of 077 before generating keys, so private key files should be readable only by root or the service account. Note any file with broader permissions. The step is done when each key file has a recorded mode and owner and any file that is more open than expected is flagged.

  6. Review PreUp and PostUp scripts for key handling

    Open each configuration file and read any PreUp, PostUp, PreDown and PostDown entries, which the wg-quick manual says are run by bash. Look for commands that read, write, decrypt or copy key material, and record each one. The manual suggests keeping keys encrypted and fetching them through a tool such as pass in PreUp, so note whether any script does this or places keys in plaintext. The step is done when every script entry is listed with a note on how it touches keys.

  7. Send vendor questions for details not visible on the host

    The host can show which keys exist, but not how public keys are distributed between peers, how software updates are signed, or what the project plans for post-quantum support. The quickstart does not document a key-distribution mechanism, and the WireGuard pages checked on 2026-12-03 do not mention ML-KEM, ML-DSA or FIPS. Send these questions to the WireGuard project or your distributor in writing, and record the date and the answer received. The step is done when each open question has a written request and a response or a note that none was given.

Questions inventory owners ask about WireGuard cryptography

Is WireGuard post-quantum secure?

No, not by default. The WireGuard project's known limitations page says WireGuard is not, by default, post-quantum secure. Its handshake uses Curve25519 ECDH with static peer public keys for key exchange and peer authentication, and the protocol has no signatures or certificates. For the inventory, record WireGuard's default key exchange as elliptic-curve based and classify it as not post-quantum secure by default. The project's protocol page names an optional pre-shared key as a route to post-quantum resistance, but that is a configuration choice you would need to verify and document separately.

Does a pre-shared key change WireGuard's post-quantum position?

It can, but only if you configure it and the key material comes from a suitable source. The wg(8) manual says the preshared key is optional and adds a symmetric-key layer on top of the public-key cryptography, included for post-quantum resistance. 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 project names no post-quantum algorithm for this, and the quickstart does not document how PresharedKey values should be generated or distributed. Record whether PresharedKey is set on each peer, where that value comes from, and who holds it, since an unset key is treated as an all-zero 32-byte value.

Does WireGuard have a cipher suite or TLS setting I can change?

No. WireGuard does not expose a cipher suite list, TLS settings, certificates or certificate authorities. The protocol page and the wg(8) manual describe a fixed construction, Noise_IKpsk2_25519_ChaChaPoly_BLAKE2s, using ChaCha20 with Poly1305, Curve25519, BLAKE2s, SipHash24 and HKDF. No configuration key selects these algorithms, so an inventory entry should list them as fixed by the protocol. The settings you can change are the key files, the PresharedKey entry and the interface options in wg-quick(8). Any change to the primitives would come from the project and the kernel or tool version you run, so record those versions alongside the entry.

Do WireGuard certificates need to be tracked in the inventory?

Generally no certificates exist to track, because the protocol uses no certificates or certificate authorities. Peers authenticate each other with static Curve25519 keys listed as PublicKey entries, and the private keys stay on each host. Your inventory should instead track the key material: the private keys generated with wg genkey, the public keys derived with wg pubkey, and any PresharedKey values from wg genpsk. Note the file location, for example /etc/wireguard/INTERFACE.conf, and who can read it. If a peer's key is replaced, every other peer that lists it must be updated, so record those dependencies.

What should a CBOM entry for WireGuard say?

A cryptographic bill of materials entry for WireGuard should name the component, its version and the handshake construction, Noise_IKpsk2_25519_ChaChaPoly_BLAKE2s. List the primitives as the protocol page gives them: Curve25519 for ECDH, ChaCha20 with Poly1305, BLAKE2s, SipHash24 and HKDF. Mark the public-key dependency as Curve25519 key exchange with static peer keys, with no signatures or certificates. Add a field for the pre-shared key state per peer, set or unset, and the source of that key. Record the post-quantum position as not supported by default, with the optional pre-shared key noted as unverified until your configuration is checked. Date the entry and tie it to the versions you tested.

What should I ask WireGuard's vendor or project about post-quantum support?

Ask what the project has published on post-quantum algorithms, and whether a timeline or roadmap exists in writing. The project's 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, so confirm whether anything newer has been released. Ask how the project expects post-quantum key material to enter the pre-shared key slot, and whether it supports or plans any hybrid mode. Also ask who maintains the Linux kernel module and wg tools in your distribution, because those components determine what you can upgrade. Request the answers in writing and date them.

How DeployOpen supports a WireGuard cryptographic inventory

DeployOpen approaches a WireGuard cryptographic inventory as implementation work on your own infrastructure. The inventory records where the Curve25519 handshake, the optional pre-shared key and the key files on each peer are used, so your team can plan a post-quantum move from documented facts.

How we scope

  • Engagements are fixed-scope, with the peers, interfaces and config paths to inventory agreed in writing before work starts.
  • The written scope lists which WireGuard versions, kernel or userspace implementations and distributions are covered.
  • Scope confirms how private keys, public keys and pre-shared keys are stored and distributed across each peer in your environment.

How we build

  • We record the protocol primitives in use and map the Curve25519 key exchange to each peer's configuration and key material.
  • We check each interface for PresharedKey entries and document how many peers run with the optional pre-shared key set.
  • We review PreUp and PostUp scripts for any key handling, since wg-quick runs these snippets through bash.

How we hand over

  • Deliverables include a written inventory of every peer, key file, pre-shared key and config path in scope.
  • Each finding notes which WireGuard component and version it applies to, so the record stays accurate for your team.
  • We document open points, such as key distribution steps the vendor's documentation does not describe, for your team to confirm.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, so the inventory can be refreshed as peers change.
  • We can re-run the inventory after a WireGuard upgrade or a change to key storage, and update the written record.
  • Your team should confirm any vendor statement on post-quantum support directly with the WireGuard project before relying on it.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.