Why an IKEv2 tunnel with a post-quantum pre-shared key will not connect
The tunnel fails to authenticate once the post-quantum pre-shared key (PPK) is enabled. This is an authentication failure, and it usually means the two gateways do not hold the same PPK under the same PPK_ID, or that one side requires a PPK while the other does not use one. Fixing it is work for the network or VPN administrator on both gateways, because a change on one side alone cannot restore the tunnel. The negotiation stops before the tunnel is established, so no traffic is carried while the failure persists. The log message usually names the PPK_ID involved, which is the first identifier to compare on each side. This page covers strongSwan and Libreswan only, as the sources list them. How quickly you need to act depends on whether the tunnel carries production traffic: a tunnel that is down for live services is an immediate incident, while a lab or standby tunnel gives more room to investigate.
The protocol defines how a failed PPK exchange should behave, and that behavior explains what you see. Under RFC 8784, a responder that expects a PPK and receives no PPK_IDENTITY, or an unknown PPK_ID while PPK use is mandatory, sends AUTHENTICATION_FAILED and the negotiation fails. An initiator that requires a PPK must abort if the response lacks USE_PPK. Where PPK use is optional and the initiator sent NO_PPK_AUTH, the responder may continue without the key, so a tunnel can come up on one configuration and fail on another. Confirm on both gateways whether PPK is required or optional, because a mismatch in that setting is as common a cause as a mismatched key. An initiator that aborts a mandatory-PPK negotiation should also cache the negative result and wait at least a few minutes before retrying, so repeated restarts may not change the outcome during that window.
Who has to act on each end of the tunnel
A PPK mismatch is fixed on whichever side holds the wrong key or PPK_ID, and both peers must hold the same PPK under the same identity. Work out which administrator controls each end before you change anything.
Gateway administrator at the first end
This administrator edits the connection and secret files on the first gateway, which is swanctl.conf with the secrets.ppk block on strongSwan, or ipsec.conf and ipsec.secrets on Libreswan. They set ppk_id or ppk-ids, ppk_required or ppk, and the PPK value itself. Check that the PPK_ID and key match the peer exactly, and that the key is at least 256 bits of entropy, as RFC 8784 recommends. Reload after editing, since Libreswan only reads ipsec.secrets at startup and needs ipsec rereadsecrets.
Gateway administrator at the second end
The administrator on the peer gateway must hold the same PPK under the same PPK_ID, because a responder that receives an unknown PPK_ID while PPK use is mandatory fails with AUTHENTICATION_FAILED. Confirm the identity string character for character, since the PPK_ID is compared exactly. Make the same edits on this gateway, then reload its credentials with swanctl --load-all or ipsec rereadsecrets. Both administrators should confirm the change with each other before retesting.
Client administrator holding the PPK
On a remote-access setup, the administrator who manages client devices holds a copy of the PPK, and it must match the gateway's PPK for the same identity. Clients often store the key in a profile or device configuration, so a key rotated on the gateway but not pushed to clients will fail authentication. Ask whether the client profile carries the PPK and PPK_ID, and whether it was updated after the last gateway change.
Vendor or hosted gateway owner
On a hosted or vendor-managed gateway, you may not be able to change PPK settings yourself. Check whether the management console exposes PPK fields at all, and whether the vendor restricts them. If you cannot edit the gateway, you must ask the vendor or the administrator who controls it to confirm the PPK_ID and key, or to enable PPK use on their side. Send them the exact PPK_ID and the error line from your logs, not a general description of the failure.
Who decides whether the PPK is required
Whether a PPK is optional or mandatory is set on each side, and the two settings must not conflict. A responder with PPK use optional may continue without it when the initiator sends NO_PPK_AUTH, but an initiator that requires a PPK aborts if the response lacks USE_PPK. Ask each administrator which setting their gateway uses, since a mandatory setting on one side and an absent PPK on the other produces the failure you see.
How to check which PPK_ID and key each peer is using
This sequence confirms which post-quantum pre-shared key (PPK) identity and secret each gateway is actually using, so you can find the mismatch behind a failed IKEv2 authentication. You record versions, check whether an IKE_SA formed, read the trace log lines for PPK negotiation, and compare the identifiers and key lengths on both ends.
Record the software version on each gateway
On each gateway, run
swanctl --version(orswanctl -Von strongSwan 6.0.5 and later) for strongSwan, oripsec versionfor Libreswan, and save the output with the hostname. Version differences matter because PPK support was added in strongSwan 5.7.0 and in Libreswan v5.0 for theppk-idsoption, so confirm both peers run a release that supports the PPK settings you configured. The step is done when you have a recorded version string from both ends.Check whether an IKE_SA was established
On each gateway, run
swanctl --list-sasto list active IKE_SAs and confirm whether the tunnel reached an established state. If no IKE_SA appears on either side, the failure happened during IKE_AUTH and the following log checks are the next step. If an IKE_SA exists but the child SA is missing, record that result before continuing, since the PPK problem may sit in a different place. The step is done when you know, for each gateway, whether an IKE_SA exists.Enable trace logging for the connection attempt
Run
swanctl --logon each gateway to show trace logging output, then retry the connection so the PPK messages are written during IKE_AUTH. Keep the trace running during the attempt and capture the lines to a file on each side so the two logs can be read together. The step is done when each gateway has a log covering one full failed attempt with its timestamps.Read the PPK log lines on the initiator
Search the initiator log for the PPK lines strongSwan writes in ike_auth.c. "PPK required but peer does not support PPK" means the responder never offered PPK. "PPK required but no PPK_ID configured" means the initiator has no
ppk_idset in swanctl.conf. "PPK required but no PPK found for '%Y'" means no secret matches the configured PPK_ID, where %Y is that identifier. "PPK required but peer didn't use PPK for PPK_ID '%Y'" means the required PPK was not used, and the peer sends AUTHENTICATION_FAILED. "using PPK for PPK_ID '%Y'" confirms a successful PPK use. The step is done when you have identified which of these lines appears, or confirmed the success line.Read the PPK log lines on the responder
Search the responder log for "no PPK found for '%Y'", which appears when a PPK_IDENTITY arrives but no matching key exists on that gateway, with %Y showing the identifier it received. If the log instead shows "no PPK found for '%Y', ignored because PPK is not required", the responder continued without the PPK, which means PPK is optional on that side. Also look for "selected peer config '%s' unacceptable: PPK policy mismatch", which points to a policy difference between the two configurations. The step is done when you know whether the responder received an unknown identifier or rejected the policy.
Compare the PPK_ID values on both ends
Write down the PPK_ID configured on each gateway, reading
connections.<conn>.ppk_idand theidentries undersecrets.ppkin swanctl.conf on strongSwan, or theppk-idslist and PPKS entries in ipsec.secrets on Libreswan. Compare the two values character for character, since RFC 8784 says a PPK_ID that does not match the peer's identifier causes the negotiation to fail. Note any case difference, extra whitespace, or a PPK_ID that appears on one side only. The step is done when you have two identifier lists and either confirmed they match or marked each difference.Confirm both ends hold the same PPK secret length
On each gateway, check the length of the PPK secret stored for the matching PPK_ID, without printing the key itself into shared logs. RFC 8784 recommends at least 256 bits of entropy, and both peers must hold the same PPK under the same identifier for the negotiation to succeed. Confirm the secret format, which may be an ASCII string, a hex string with a 0x prefix, or Base64 with a 0s prefix in strongSwan, and check that both sides decode to the same length. Note that strongSwan reads secrets on load, so run
swanctl --load-allafter changing a secret, and that Libreswan reads ipsec.secrets only at startup until you runipsec rereadsecrets. The step is done when both gateways report the same secret length for the same PPK_ID.
Which configuration mismatch causes the failure
This table pairs each configuration mismatch with the symptom it produces in the logs and the setting to correct. Find the row that matches your log line, then compare the PPK_ID, secret and policy values on both peers. Most failures come from a PPK_ID that differs between peers or from secrets that were edited but never reloaded.
| Mismatch | Symptom | Fix |
|---|---|---|
| PPK_ID differs between peers | Responder logs no PPK found for the received PPK_ID, and the negotiation fails with AUTHENTICATION_FAILED | Set the same PPK_ID on both peers using connections.<conn>.ppk_id in strongSwan or ppk-ids in Libreswan, then match the id entry in secrets.ppk |
| PPK secret missing or not loaded on one side | Initiator logs no PPK found for the configured PPK_ID, and the responder logs no PPK found when it receives a PPK_IDENTITY | Add the PPK secret to secrets.ppk in swanctl.conf or as a PPKS line in ipsec.secrets, then confirm the entry exists on the peer that reported the error |
| One peer requires a PPK while the other does not offer it | Initiator logs PPK required but peer does not support PPK, or PPK required but peer didn't use PPK for PPK_ID | Align ppk_required (strongSwan) or ppk=insist (Libreswan) with the other peer's setting, or enable PPK on both sides |
| PPK shorter than 256 bits or encoded differently | Negotiation fails even though the PPK_ID matches, because the peer reads the secret with a different encoding | Use a PPK of at least 256 bits, and write it in the same encoding on both sides: ASCII, 0x hex or 0s Base64 in strongSwan |
| PPK_ID contains characters outside base64 | PPK_ID is rejected or does not match on the other peer, since RFC 8784 limits PPK_ID_FIXED to the base64 character set | Rename the PPK_ID so it uses only base64 characters, and update it identically in both peers' configuration |
| Configuration edited without reloading secrets | Peers still use the old PPK or PPK_ID after the file was changed, and log entries do not reflect the new value | Run swanctl --load-all in strongSwan, or ipsec rereadsecrets in Libreswan, then confirm the new values with swanctl --list-sas or a fresh connection attempt |
What to change on strongSwan and Libreswan, in order
The sequence below sets the same post-quantum pre-shared key and identity on both peers, enables the PPK option on the connection, and reloads the configuration so the tunnel can authenticate with the PPK. Each step ends with a check that confirms the change took effect before you move on to the next one.
Generate a PPK of at least 256 bits
Create the pre-shared key with a cryptographically secure random source, because RFC 8784 recommends at least 256 bits of entropy and warns against deriving the key from a password, a name or any other low-entropy input. Do not use a group PPK shared across several connections, since RFC 8784 says group PPKs are not recommended. Record the key and a unique PPK_ID for this one connection. You know this step is done when the key is at least 32 random bytes and you have written down the PPK_ID that will identify it.
Transfer the PPK to the other end securely
Deliver the same key to the administrator of the remote gateway through a channel you trust, such as an encrypted file transfer or a verified in-person handoff, and never through the same unauthenticated channel that carries the tunnel. Both peers must hold the identical key under the identical PPK_ID, because a responder that receives an unknown PPK_ID while PPK use is mandatory fails the negotiation with AUTHENTICATION_FAILED. You know this step is done when both administrators confirm the PPK_ID string matches character for character and the key was delivered by a channel you trust.
Set the PPK options on the strongSwan connection
In swanctl.conf, set connections.<conn>.ppk_id to the agreed PPK_ID and set connections.<conn>.ppk_required to yes so the tunnel refuses to proceed without the key. Both options exist from strongSwan 5.7.0 onward, and their defaults are none and no. Check the installed version with swanctl --version before editing. You know this step is done when the connection block shows both options set and the file parses without errors.
Define the PPK secret in strongSwan
Add a secrets.ppk<suffix> subsection that holds the key in the secret field, written as an ASCII string, a hex string with a 0x prefix, or Base64 with a 0s prefix, and add one or more id<suffix> entries that name the same PPK_ID you set on the connection. The strongSwan documentation recommends at least 256 bits of entropy for this value. You know this step is done when the id<suffix> value matches the connection's ppk_id exactly, including case.
Reload strongSwan credentials and connections
Run swanctl --load-all on the gateway to reload credentials, pools, authorities and connections from swanctl.conf, which is usually located in /etc/swanctl. Reloading is required before the new PPK is available to the daemon. You know this step is done when the command completes without an error about the secret or connection, and the connection appears in the loaded list.
Set the PPK options in Libreswan
In ipsec.conf, set ppk to insist and set ppk-ids to the agreed PPK_ID inside the connection. Libreswan documents ppk as experimental, and PPKs work only on connections that allow IKEv2 only, so ikev2=insist must also be set. Note that ppk=insist refuses communication unless a PPK is used for key derivation. You know this step is done when the connection block contains ppk=insist, ikev2=insist and the matching ppk-ids value.
Add the PPKS line to ipsec.secrets
Add a PPKS line to ipsec.secrets in the form of the two peer addresses, a colon, the token PPKS, a double-quoted PPK_ID and then the key, for example 10.1.0.1 10.2.0.1 : PPKS "PPK_ID_1" "key" as illustrated in the Libreswan manual. Libreswan recommends that a static PPK be at least 256 bits. You know this step is done when the PPK_ID in the secrets file matches the ppk-ids value in ipsec.conf exactly.
Re-read secrets and confirm the PPK is in use
Run ipsec rereadsecrets, because Libreswan reads ipsec.secrets only at startup and offers no way to add a single entry without this command. Then bring the connection up and check the logs for a successful PPK use message, while confirming the Libreswan version with ipsec version. You know this step is done when the tunnel establishes and the logs show the PPK being used with the expected PPK_ID, and when the same check on the strongSwan side shows the connection with swanctl --list-sas.
How the fix differs between strongSwan and Libreswan
Both implementations follow RFC 8784, but they expose the PPK through different configuration files and different keywords, and they reload secrets in different ways. Before you edit anything, confirm which implementation runs on each peer and its version, because the version thresholds decide which settings exist at all. strongSwan added PPK support in version 5.7.0, and Libreswan added ppk-ids in version 5.0, and the Libreswan ppk setting is still marked EXPERIMENTAL in its man page. The main failure pattern is the same on both sides: one peer holds a key under a PPK_ID that the other peer does not hold, or the two peers were configured in a different order. Check the PPK_ID string first, character for character, and then check the file and the reload step on each side.
- Settings differ by implementation: strongSwan uses
connections.<conn>.ppk_idandppk_requiredin swanctl.conf, while Libreswan usesppkandppk-idsin ipsec.conf. - Secret storage differs: strongSwan places the key in a
secrets.ppksubsection, while Libreswan places it in ipsec.secrets as aPPKSline. - Reload commands differ: strongSwan uses
swanctl --load-all, and Libreswan usesipsec rereadsecretsbecause pluto reads its secrets only at startup. - Version gates apply: strongSwan support starts at 5.7.0 and Libreswan
ppk-idsstarts at v5.0, so confirm your build withswanctl --versionoripsec version. - Experimental status: Libreswan documents its PPK settings as EXPERIMENTAL, so plan for that when you choose a production setting.
Check that both peers report the same PPK_ID for the same key and that each side's version supports the settings you use.
On strongSwan, the PPK belongs in swanctl.conf. The connection names the PPK_ID to use and states whether a PPK is mandatory, and a separate secrets.ppk subsection holds the key itself. Both ppk_id and ppk_required are documented with the note "Since version 5.7.0", and both default to none and no. The key value can be an ASCII string, a hex string with a 0x prefix, or Base64 with a 0s prefix, and the documentation recommends at least 256 bits of entropy. After you edit the file, reload it with swanctl --load-all, which reloads credentials, pools, authorities and connections from swanctl.conf, usually found in /etc/swanctl.
- Connection setting: Add
ppk_idunder the connection and set it to the identifier the peer will also use, and addppk_required = yesonly when the connection must fail without a PPK. - Secret subsection: Create
secrets.ppkwith asecretvalue and one or moreidentries naming the same PPK identity, and use a suffix if you keep several keys. - Encoding check: Confirm the encoding prefix you used, because
0xand0schange how the same characters are read, and a mismatch produces a key that does not match the peer. - Reload step: Run
swanctl --load-allafter the change, then confirm that the connection loaded without errors in the log. - Log lines to look for: The initiator logs "PPK required but no PPK found for '%Y'" when the key is missing, and the responder logs "no PPK found for '%Y'" when an identity arrives with no matching key.
After the reload, run swanctl --list-sas and confirm that the IKE_SA is up and that the log reports "using PPK for PPK_ID" on both sides.
On Libreswan, the connection enables the PPK in ipsec.conf and the key lives in ipsec.secrets. The ppk setting accepts propose or yes (the default), insist, and never or no. The insist value allows communication only if a PPK is used for key derivation, and the man page states that PPKs work only on connections that allow IKEv2 only, which requires ikev2=insist. The ppk-ids setting takes a quoted, comma-separated list of PPK_IDs to look for in the secrets file, and if you leave it unset, any matching PPK secret may be used. Both settings are marked EXPERIMENTAL in the man page, so document that decision for your change record. The secret goes in ipsec.secrets as a PPKS line, followed by a double-quoted PPK_ID and then the key, and the man page recommends at least 256 bits for a static PPK.
- Connection setting: Set
ppktoinsistonly after both peers run a version that supports it, and setikev2=insiston the connection because PPKs work only with IKEv2. - PPK_ID list: Set
ppk-idsto the quoted identifier that the peer uses, and note that Libreswan documents this setting from v5.0. - Secret line: Add a line in the form
10.1.0.1 10.2.0.1 : PPKS "PPK_ID_1" "key", with the quoted PPK_ID exactly matching the peer's value. - Reload step: Run
ipsec rereadsecrets, because the man page states that the file is read only at startup and that there is no way to add a single entry without a re-read. - Failure behavior: Libreswan's CHANGES file records that with
insist, a PPK failure returns AUTHENTICATION_FAILED, which appears in the peer's log as a failed authentication rather than a missing setting.
After the reload, check ipsec version against your change record and confirm the connection in the log, because a silent fallback is not possible once insist is in force.
A working tunnel needs the same PPK_ID and the same key on both peers, and the RFC 8784 negotiation fails when one side sends an identity the other does not hold, or when a required PPK is not used. Verification means comparing the configuration of the two peers side by side, not only checking the one you changed. Keep the comparison to the fields that must match: the PPK_ID string, the key length and the encoding, and the policy that says whether a PPK is required. The exact names differ between strongSwan and Libreswan, so map each field from one implementation to the other before you compare. Also check the order of operations, because a peer that reloads first can fail while the other peer still uses the old key.
- Matching identifiers: Confirm that the PPK_ID on the initiator equals the one on the responder, including case and any quoting or base64 encoding.
- Key length: Confirm each key provides at least 256 bits, since RFC 8784 recommends that much entropy and advises against keys derived from a password or name.
- Policy alignment: If one side requires a PPK and the other treats it as optional, confirm the optional side sends NO_PPK_AUTH only where you intend it.
- Reload order: Reload both peers within the same change window, and avoid leaving one peer on the old key while the other has the new one.
- Retry behavior: RFC 8784 says an initiator that aborts a mandatory-PPK negotiation should wait a few minutes before it retries, so do not conclude a fix has failed after one immediate attempt.
When both peers show the same PPK_ID in their logs and the SA comes up, record the versions and the settings you used so that the next change can start from a confirmed state.
How to confirm the tunnel now authenticates with its PPK
Once you have changed the configuration, confirm on both gateways that the IKE_SA is established and that it authenticated with the post-quantum pre-shared key. On a strongSwan gateway, run swanctl --list-sas and look for the established IKE_SA for your connection. The success line written by the daemon reads using PPK for PPK_ID followed by the identity you configured, so check that the identity in the log matches the ppk_id value in your swanctl.conf on that side. On a Libreswan gateway, run ipsec status and check the same connection for the established state, then search the daemon log for the equivalent success message. Run both checks on each end, because a tunnel can show as up on one gateway while the other side still reports a failure.
A healthy established SA shows the connection in the established state with the expected peer addresses, and the PPK success line appears in the log at the time of the handshake. If the output shows the SA as established but the log lacks the PPK success line, the tunnel is probably running without the key, so re-check that ppk_required or the Libreswan ppk setting is enforcing use of the PPK on that side. Also confirm that the PPK_ID shown on each gateway is identical, since a mismatch produces a failure rather than a silent fallback.
Watch the tunnel after the first successful connection. A rekey renegotiates keys, so the PPK path runs again, and repeated AUTHENTICATION_FAILED messages after a rekey point to a stale or mismatched key on one side, often because the secrets file was changed but not reloaded. Reload credentials with swanctl --load-all on strongSwan, or run ipsec rereadsecrets on Libreswan, then repeat the checks above. Repeat the same test after any reconnect or gateway restart, because a new negotiation is what exercises the PPK again, and a single successful connection does not prove the key will hold through the next rekey.
What can break after the PPK change
Adding or rotating a post-quantum pre-shared key changes what both peers must hold before IKEv2 authentication can complete. The cards below cover the failures that most often appear once the PPK changes, and what to check for each.
Stale PPK on one peer
After a rotation, one peer can still hold the old PPK while the other holds the new one. Under RFC 8784, the responder fails the negotiation when the PPK_ID it receives is unknown, so the tunnel never authenticates. Compare the PPK value and PPK_ID on both gateways before you look anywhere else. Confirm the rotation reached both sides, then reload the configuration on each gateway so the new secret takes effect.
RFC 8784Client cannot load new secret
Some VPN clients cannot read a new PPK until their software is updated, so the secret never reaches the client even though the gateway is correct. The gateway will then show a missing or unknown PPK_ID for that peer. Check the client version against the vendor's documentation for PPK support before you change the gateway again. If the client cannot load the secret, the fix is a client update, not a new key.
swanctl.conf docsMandatory PPK locks out peers
When PPK use is mandatory, a peer that has not been updated cannot authenticate at all. The initiator aborts if the response lacks USE_PPK, and the responder sends AUTHENTICATION_FAILED if no matching PPK_ID arrives. Before you set ppk_required or ppk=insist on a connection, confirm every peer that connects to it already holds the PPK. Set it to optional first on connections where some peers are still being updated.
ipsec.conf man pageRetry delay after abort
RFC 8784 says an initiator that aborts a mandatory-PPK negotiation should cache the negative result and wait at least a few minutes before it retries. Retrying immediately will keep failing and can flood the logs without adding information. After you fix the PPK or the peer configuration, allow that delay before you judge the result. Watch the logs on both sides when the tunnel comes back.
RFC 8784Plain-text key material exposure
A PPK written in plain text in a configuration or secrets file can be read by anyone with access to a shared system. RFC 8784 advises a PPK with at least 256 bits of entropy, and it warns against deriving the key from a password or name. Restrict file permissions on the secrets file, and check who can read the directory that holds it. Limit shared administrative access, and avoid copying the secret into tickets, chat or shell history.
ipsec.secrets man pageWhen to get help with a PPK failure
Some PPK failures can be resolved on your own gateway, but several situations call for the vendor or an experienced network engineer. The first is when you do not control the remote gateway. A PPK must be held under the same PPK_ID on both peers, so if the other side belongs to a partner, a cloud provider or a vendor-managed appliance, you cannot confirm the key or the PPK_ID yourself. Ask the remote administrator to read their own configuration and logs, and bring the vendor in if the remote side does not show a PPK_IDENTITY or a matching secret. Before that conversation, collect your own side's version, the PPK_ID you configured and the log lines from your gateway, so the other team can compare them directly.
Escalate sooner if several tunnels fail at once. A failure that affects only one peer points to a key, PPK_ID or policy mismatch on that pair. Failures across many tunnels at the same time more often point to a shared cause, such as a software upgrade, a changed default or a change to the secrets file that was loaded on some gateways and not others. An experienced engineer can compare the configurations side by side and check whether swanctl --load-all or ipsec rereadsecrets was run everywhere the change should have reached. If the logs do not show the PPK messages that the source code and man pages describe, such as "no PPK found" or "using PPK for PPK_ID", treat that as a signal that the PPK path may not be reached at all, and involve the vendor to confirm the version and logging level.
A regulated environment needs a written record of the change, even if the fix is simple. Keep a dated note of the PPK_ID, the key handling, the gateway versions, the rollback steps and the test results. DeployOpen can plan, configure and document the gateway changes you control, and it can prepare evidence for a review. It cannot change the remote gateway, and it does not issue audit reports or attestations. Ask any partner or vendor to confirm in writing which configuration they will change, and who will verify the result on each side before the tunnel is considered restored.
Questions people ask when a PPK tunnel will not connect
Is traffic still encrypted when a PPK tunnel fails to connect?
No. When the PPK negotiation fails, the IKE security association is not established, so no ESP traffic passes through the tunnel. Traffic that was meant to cross the tunnel is not sent through it in the clear either, so it is blocked until the tunnel comes up. Confirm the behavior on your own gateway, because routing and fallback rules on each side decide what happens to packets that would have used the tunnel. Check the state with swanctl --list-sas on strongSwan or ipsec status on Libreswan before you assume any traffic is flowing.
Is a PPK tunnel failure urgent to fix?
It depends on what the tunnel carries. If the tunnel is the only path to a site or service, the outage is urgent, and you should treat it as an incident. If a second tunnel or path already carries the traffic, the failure is a degraded state that you can plan to fix. Your own risk owner should decide the priority, based on your traffic and your continuity requirements. The fix itself is usually a configuration match: both peers must hold the same PPK under the same PPK_ID, and each side must agree on whether the PPK is required.
Can I disable PPK to stop the error?
You can, but only as a temporary measure while you apply the real fix. Turning PPK off removes the error message, but it also removes the post-quantum protection you were trying to add, so the tunnel falls back to the classic key exchange. Set ppk_required to no in strongSwan or ppk to no in Libreswan only if your policy allows the fallback for a short period. Record the change, set a date to restore PPK, and confirm the restored configuration with a successful swanctl --list-sas or ipsec status check.
Why does the PPK tunnel fail after a configuration change?
A configuration change often alters the match between the peers. Typical causes are a PPK value that was changed on one side only, a PPK_ID that differs by a character or case, or a secrets file that was edited but not reloaded. Under RFC 8784, a responder that receives no PPK_IDENTITY, or an unknown PPK_ID while PPK use is mandatory, sends AUTHENTICATION_FAILED. On strongSwan, reload credentials with swanctl --load-all. On Libreswan, tell pluto to re-read the secrets with ipsec rereadsecrets, because the secrets file is read only at startup. Then compare the PPK_ID on both sides.
What should I do if the remote peer cannot be upgraded?
Start by confirming that the remote peer really lacks PPK support, because the strongSwan and Libreswan logs report 'PPK required but peer does not support PPK' when that is the case. If the remote peer cannot take the feature, the choice is between making PPK optional on your side and keeping PPK required. Making PPK optional lets the responder continue without the PPK when the initiator sends NO_PPK_AUTH, but it reduces the protection you intended. Keeping PPK required stops the tunnel. Decide with the owner of the remote peer, record the decision, and plan the upgrade. Ask the remote vendor for its support timeline in writing.
Must a PPK be derived from a password?
No. RFC 8784 recommends that a PPK contain at least 256 bits of entropy, and it warns against deriving a PPK from a password, name or other low-entropy source. Generate the PPK with a cryptographically secure random generator and store it in the secrets file of each peer. In strongSwan, the secret can be given as a hex string with a 0x prefix or as Base64 with a 0s prefix. Libreswan accepts a quoted PPK in the PPKS entry of ipsec.secrets. Keep the value out of shared documents and version control, and rotate it through a controlled change.
How do I check which PPK_ID each side is using?
Compare the PPK_ID values in the configuration files on both peers. On strongSwan, the initiator's connection uses ppk_id, and each peer's secrets block lists one or more id entries that name the PPK identity. On Libreswan, ppk-ids in ipsec.conf lists the IDs to look for in the .secrets file. Keep the identifiers to the base64 character set that RFC 8784 recommends for PPK_ID_FIXED, which helps interoperability between vendors. Make the IDs match exactly, including case, then reload and retest.
Which logs show why the PPK negotiation failed?
The strongSwan logs name the failure directly. On the initiator, look for 'PPK required but no PPK found' and 'PPK required but peer didn't use PPK'. On the responder, look for 'no PPK found for' the PPK_ID that arrived. For a clearer trace, run swanctl --log while you reproduce the failure. Libreswan records PPK failures in its own log and was changed in v3.30 to return AUTHENTICATION_FAILED when PPK fails with insist. Match the log messages against the configuration of both peers before you change anything, and keep a copy of the logs for the change record.
How DeployOpen helps fix PPK tunnel failures
DeployOpen approaches IKEv2 tunnels that fail with post-quantum pre-shared keys by first confirming that both peers hold the same PPK under the same PPK_ID and that the PPK policy matches on each side. We then work through the configuration, logs and settings in your own gateways and clients, and document what changed so your network team can repeat the fix.
How we scope
- We agree a written, fixed scope covering the gateways, clients and tunnels involved in the PPK failure.
- We collect the peer software versions, swanctl.conf or ipsec.conf files, and the PPK_ID and PPK policy settings on each side.
- We confirm with you which PPK source is in use (static secret, file or external store) and who controls each peer.
How we build
- We check that each PPK is at least 256 bits and that PPK_IDs use the agreed character set on both peers.
- We align ppk_id and ppk_required (strongSwan) or ppk and ppk-ids (Libreswan) so both sides expect the same key.
- We read the initiator and responder logs to match the PPK failure messages to the exact configuration step that caused them.
How we hand over
- We deliver a written record of each configuration change, the log evidence behind it, and the reload commands used.
- We document the rollback steps so your team can return a tunnel to its previous PPK settings if needed.
- We walk your network engineers through reloading credentials and confirming the tunnel state with swanctl or ipsec commands.
How we support
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.
- Ongoing support, upgrades and retesting after future PPK or version changes are available as a retainer.
- For any PPK setting or version behavior not covered in the sources on this page, we will confirm it against the vendor documentation with you.

