Updating to multiple IKE and IPsec algorithms
VPN for VPC supports configuring multiple algorithms for IKE and IPsec policies. Using multiple algorithms can improve compatibility, flexibility, and security.
Use the following instructions to migrate from deprecated, singular algorithm properties to multiple algorithm properties.
Before you begin
Review the following information before you update your VPN policies.
Deprecated singular algorithm properties
As of 29 May 2026, the VPN IKE and IPsec singular algorithm properties are deprecated. Existing VPN connections configured with singular properties continue to function without changes. However, it is recommended to update to array-based algorithm properties as soon as possible.
| IKE singular property (deprecated) | IKE multiple property (recommended) |
|---|---|
authentication_algorithm |
authentication_algorithms |
encryption_algorithm |
encryption_algorithms |
dh_group |
dh_groups |
| IPsec singular property (deprecated) | IPsec multiple property (recommended) |
|---|---|
authentication_algorithm |
authentication_algorithms |
encryption_algorithm |
encryption_algorithms |
pfs |
pfs_groups |
Use multiple algorithms when your VPN environment requires compatibility with peers that support different cryptographic algorithms or when you want to prioritize stronger encryption while maintaining backward compatibility.
Important considerations
- VPN connections that use custom IKE or IPsec policies with deprecated singular algorithm properties might experience negotiation failures or interoperability issues.
- New IKE and IPsec policies can be created only by using array-based algorithm properties.
- When you update an existing IKE or IPsec policy, it might temporarily disconnect the VPN tunnel while the connection is re-established.
- If your disaster recovery procedures, automation, scripts, API integrations, or CLI workflows reference deprecated singular properties, update them accordingly.
- Review your current IKE and IPsec policies to identify the algorithms in use.
- Verify that the peer VPN gateway supports the algorithms that you plan to configure on IBM Cloud.
- Configure matching algorithms on the peer VPN gateway for IKE and IPsec negotiation before updating the IBM Cloud VPN gateway.
- Plan policy updates during a maintenance window to minimize service disruption.
Understanding update behavior in the API
The API automatically synchronizes singular and array-based algorithm properties. Review the following behavior and restrictions before updating your policies.
- IKE version compatibility
-
Array-based algorithm properties are supported only with IKEv2. If you use IKEv1, you must configure a single algorithm for each category using singular properties.
- Use IKEv2 with array-based properties:
{ "ike_version": 2, "authentication_algorithms": ["sha512", "sha256"], "encryption_algorithms": ["aes256", "aes128"] }- Use IKEv1 with singular properties:
{ "ike_version": 1, "authentication_algorithm": "sha256", "encryption_algorithm": "aes128" }IKEv1 supports only one algorithm per category. VPN connections that use IKEv1 don't support array-based IKE or IPsec algorithm properties. Use IKEv2 whenever possible.
- Automatic synchronization
-
When you update array-based properties (
authentication_algorithms,encryption_algorithms,dh_groups,pfs_groups), the corresponding singular properties (authentication_algorithm,encryption_algorithm,dh_group,pfs) are updated automatically. Similarly, updating singular properties automatically updates the related array-based properties. For examples, see: - Read-only indicators
-
When multiple algorithms are configured, the singular properties (
authentication_algorithm,encryption_algorithm) return read-only indicator values in API responses. For example:authentication_algorithmreturns"multiple"encryption_algorithmreturns"multiple"dh_groupreturns65535
These values are returned only in responses and can't be submitted in a
PATCHrequest.{ "authentication_algorithms": ["sha256", "sha384", "sha512"], "authentication_algorithm": "multiple", "dh_groups": [14, 15, 16], "dh_group": 65535, "encryption_algorithms": ["aes128", "aes256"], "encryption_algorithm": "multiple" }If only one algorithm is configured in an array-based property, the singular property returns the configured value instead of
"multiple".{ "authentication_algorithms": ["sha256"], "authentication_algorithm": "sha256", "dh_groups": [14], "dh_group": 14, "encryption_algorithms": ["aes128"], "encryption_algorithm": "aes128" } - Property mixing restriction
-
Do not mix singular and array-based properties for the same algorithm category in a single request. Choose one approach per request.
- Correct example: This example includes the algorithm properties for IKE, where only array-based properties are used for all categories:
curl -X PATCH "$vpc_api_endpoint/v1/ike_policies/$ike_policy_id?version=$api_version&generation=2" \ -H "Authorization: $iam_token" \ -d '{ "authentication_algorithms": ["sha256", "sha384", "sha512"], "dh_groups": [14, 15, 16], "encryption_algorithms": ["aes128", "aes256"] }'- Incorrect example: This example includes the algorithm properties for IKE, where both singular and array-based properties are mixed for the same category:
curl -X PATCH "$vpc_api_endpoint/v1/ike_policies/$ike_policy_id?version=$api_version&generation=2" \ -H "Authorization: $iam_token" \ -d '{ "authentication_algorithm": "sha512", "authentication_algorithms": ["sha256", "sha384", "sha512"], "dh_groups": [14, 15, 16], "encryption_algorithms": ["aes128", "aes256"] }' - GCM algorithm requirements and restrictions
-
If the
encryption_algorithmsproperty contains GCM-based algorithms (aes128gcm16,aes192gcm16, oraes256gcm16), theauthentication_algorithmsproperty must be set to["disabled"].- Correct example: Shows IPsec algorithm properties when the
encryption_algorithmsarray includes GCM-based algorithms:
curl -X PATCH "$vpc_api_endpoint/v1/ipsec_policies/$ipsec_policy_id?version=$api_version&generation=2" \ -H "Authorization: $iam_token" \ -d '{ "authentication_algorithms": ["disabled"], "encryption_algorithms": ["aes256gcm16", "aes192gcm16"], "pfs_groups": ["group_14", "group_15", "group_16"] }'- Incorrect example: Shows algorithm properties for IPsec where the
encryption_algorithmsarray includes GCM-based algorithms:
curl -X PATCH "$vpc_api_endpoint/v1/ipsec_policies/$ipsec_policy_id?version=$api_version&generation=2" \ -H "Authorization: $iam_token" \ -d '{ "authentication_algorithms": ["sha256"], "encryption_algorithms": ["aes256gcm16", "aes192gcm16"], "pfs_groups": ["group_14", "group_15", "group_16"] }'GCM algorithms provide encryption and built-in authentication as part of a single operation. Do not configure separate authentication algorithms such as
sha256orsha512with GCM encryption algorithms.Do not mix GCM and non-GCM encryption algorithms in the same policy. Mixing them can create configuration conflicts and negotiation failures.
- Correct example: Shows IPsec algorithm properties when the
-
When
authentication_algorithmsis set to["disabled"], you must also updateauthentication_algorithmswhen changing from GCM to non-GCM encryption algorithms.- Correct example: Updates both the
encryption_algorithmsandauthentication_algorithmsproperties:
curl -X PATCH "$vpc_api_endpoint/v1/ipsec_policies/$ipsec_policy_id?version=$api_version&generation=2" \ -H "Authorization: $iam_token" \ -d '{ "authentication_algorithms": ["sha512", "sha256"], "encryption_algorithms": ["aes256", "aes128"], "pfs_groups": ["group_14", "group_15", "group_16"] }'- Incorrect example: Shows a case where only the
encryption_algorithmsproperty is updated with non-GCM algorithms (aes128,aes192,aes256):
curl -X PATCH "$vpc_api_endpoint/v1/ipsec_policies/$ipsec_policy_id?version=$api_version&generation=2" \ -H "Authorization: $iam_token" \ -d '{ "authentication_algorithms": ["disabled"], "encryption_algorithms": ["aes256", "aes128"], "pfs_groups": ["group_14", "group_15", "group_16"] }' - Correct example: Updates both the
- Algorithm validation rules
-
Ensure that all algorithm values in your request are valid, unique, and not empty. Use only supported algorithm names, avoid duplicates, and provide at least one value in each array. Invalid, duplicate, or empty entries can result in a validation error.
- Correct example: Updates the algorithm values, where supported algorithms and values are used for all categories:
{ "authentication_algorithms": ["sha512", "sha256"], "dh_groups": [14, 15], "encryption_algorithms": ["aes256", "aes192", "aes128"] }- Incorrect example: Updates the algorithm values, where duplicate values are used in the same algorithm category:
{ "authentication_algorithms": ["sha512", "sha256"], "dh_groups": [14, 15], "encryption_algorithms": ["aes256", "aes256", "aes128"] }
Updating IKE policies with the API
Follow these steps to update your IKE policies from singular to multiple algorithm.
Before you begin, make sure to set up your API environment.
To update an IKE policy with the API, follow these steps:
-
Store the IKE policy ID in a variable, for example:
export ike_policy_id=<your_ike_policy_id>To find the IKE policy ID, use the list IKE policies command.
-
Update the IKE policy to use multiple algorithms. Replace singular properties with the corresponding array-based properties.
authentication_algorithms- Array of authentication algorithms. Options:sha256,sha384,sha512.dh_groups- Array of Diffie-Hellman groups. Options:14,15,16,17,18,19,20,21,22,23,24,31.encryption_algorithms- Array of encryption algorithms. Options:aes128,aes192,aes256.curl -X PATCH "$vpc_api_endpoint/v1/ike_policies/$ike_policy_id?version=$api_version&generation=2" \ -H "Authorization: $iam_token" \ -d '{ "authentication_algorithms": ["sha256", "sha384", "sha512"], "dh_groups": [14, 15, 16], "encryption_algorithms": ["aes128", "aes256"] }'
IKE policy update examples
When you update the array‑based properties encryption_algorithms, authentication_algorithms, and dh_groups in the IKE policy, the corresponding singular properties encryption_algorithm, authentication_algorithm,
and dh_group are automatically updated. Similarly, when you update any of the singular properties, the associated array‑based properties are also automatically updated.
The following example shows how PATCH requests affect both singular and array properties:
Example 1: Single to multiple algorithms
-
This example shows the patching behavior from single to multiple algorithms. The current state shows the single‑value property
encryption_algorithmset toaes128, and the array‑based propertyencryption_algorithmsalso containing onlyaes128.{ "authentication_algorithm": "sha256", "authentication_algorithms": [ "sha256" ], "created_at": "2025-03-09T01:40:25.782663Z", "dh_group": 14, "dh_groups": [ 14 ], "encryption_algorithm": "aes128", "encryption_algorithms": [ "aes128" ], "id": "r006-e98f46a3-1e4e-4195-b4e5-b8155192689d", "ike_version": 2, "key_lifetime": 28800, "name": "my-ike-policy", "negotiation_mode": "main", "resource_group": { "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "Default" }, "resource_type": "ike_policy" } -
In the
PATCHrequest, the array-based propertyencryption_algorithmsis updated so that it now specifies bothaes128andaes256.{ "encryption_algorithms": [ "aes128", "aes256" ] } -
A successful response looks like the following example. In this response, the singular property
encryption_algorithmreturns a read-only value"multiple", indicating that multiple algorithms are now configured. This field can't be modified directly through aPATCHrequest. The array‑based propertyencryption_algorithmsis updated to include bothaes128andaes256.{ "authentication_algorithm": "sha256", "authentication_algorithms": [ "sha256" ], "created_at": "2025-03-09T01:40:25.782663Z", "dh_group": 14, "dh_groups": [ 14 ], "encryption_algorithm": "multiple", "encryption_algorithms": [ "aes128", "aes256" ], "id": "r006-e98f46a3-1e4e-4195-b4e5-b8155192689d", "ike_version": 2, "key_lifetime": 28800, "name": "my-ike-policy", "negotiation_mode": "main", "resource_group": { "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "Default" }, "resource_type": "ike_policy" }
Example 2: Multiple algorithms to single
-
This example shows the patching behavior from multiple to a single algorithm. The current state shows the single‑value property
encryption_algorithmset to"multiple", and the array‑based propertyencryption_algorithmscontainingaes128andaes256.{ "authentication_algorithm": "sha256", "authentication_algorithms": [ "sha256" ], "created_at": "2025-03-09T01:40:25.782663Z", "dh_group": 14, "dh_groups": [ 14 ], "encryption_algorithm": "multiple", "encryption_algorithms": [ "aes128", "aes256" ], "id": "r006-e98f46a3-1e4e-4195-b4e5-b8155192689d", "ike_version": 2, "key_lifetime": 28800, "name": "my-ike-policy", "negotiation_mode": "main", "resource_group": { "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "Default" }, "resource_type": "ike_policy" } -
In the
PATCHrequest, the array-based propertyencryption_algorithmsis updated so that it now specifies onlyaes256.{ "encryption_algorithms": [ "aes256" ] } -
A successful response looks like the following example. In this response, the single‑value property
encryption_algorithmis automatically set toaes256, indicating that only a single algorithm is configured. The array‑based propertyencryption_algorithmsis updated to includeaes256.{ "authentication_algorithm": "sha256", "authentication_algorithms": [ "sha256" ], "created_at": "2025-03-09T01:40:25.782663Z", "dh_group": 14, "dh_groups": [ 14 ], "encryption_algorithm": "aes256", "encryption_algorithms": [ "aes256" ], "id": "r006-e98f46a3-1e4e-4195-b4e5-b8155192689d", "ike_version": 2, "key_lifetime": 28800, "name": "my-ike-policy", "negotiation_mode": "main", "resource_group": { "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "Default" }, "resource_type": "ike_policy" }
Updating IPsec policies with the API
Follow these steps to update your IPsec policies from singular to array-based algorithm properties.
Before you begin, make sure to set up your API environment.
To update an IPsec policy with the API, follow these steps:
-
Store the IPsec policy ID in a variable, for example:
export ipsec_policy_id=<your_ipsec_policy_id>To find the IPsec policy ID, use the list IPsec policies command.
-
Update the IPsec policy to use multiple algorithms. Replace singular properties with the corresponding array-based properties.
authentication_algorithms- Array of authentication algorithms. Options:sha256,sha384,sha512,disabled.encryption_algorithms- Array of encryption algorithms. Options:aes128,aes192,aes256,aes128gcm16,aes192gcm16,aes256gcm16.pfs_groups- Array of Perfect Forward Secrecy groups. Options:disabled,group_14,group_15,group_16,group_17,group_18,group_19,group_20,group_21,group_22,group_23,group_24,group_31.curl -X PATCH "$vpc_api_endpoint/v1/ipsec_policies/$ipsec_policy_id?version=$api_version&generation=2" \ -H "Authorization: $iam_token" \ -d '{ "authentication_algorithms": ["sha256", "sha384", "sha512"], "encryption_algorithms": ["aes128", "aes256"], "pfs_groups": ["group_14", "group_15", "group_16"] }'
IPsec policy update examples
When you update the array‑based properties encryption_algorithms, authentication_algorithms, and pfs_groups in an IPsec policy, the corresponding single‑value properties encryption_algorithm,
authentication_algorithm, and pfs are automatically updated. Similarly, when you update any of the single‑value properties, the associated array‑based properties are also automatically updated.
The following example shows how PATCH requests affect both singular and array properties:
Example 1: Single to multiple algorithms
-
This example shows the patching behavior from single to multiple algorithms. The current state shows the single‑value property
encryption_algorithmset toaes128, and the array‑based propertyencryption_algorithmsalso containing onlyaes128.{ "authentication_algorithm": "sha256", "authentication_algorithms": [ "sha256" ], "connections": [], "created_at": "2025-03-09T01:46:00.785105Z", "encapsulation_mode": "tunnel", "encryption_algorithm": "aes128", "encryption_algorithms": [ "aes128" ], "id": "r006-51eae621-dbbc-4c47-b623-b57a43c19876", "key_lifetime": 3600, "name": "my-ipsec-policy", "pfs": "group_14", "pfs_groups": [ "group_14" ], "resource_group": { "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "Default" }, "resource_type": "ipsec_policy", "transform_protocol": "esp" } -
In the
PATCHrequest, the array-based propertyencryption_algorithmsis updated so that it now specifies bothaes128andaes256.{ "encryption_algorithms": [ "aes128", "aes256" ] } -
A successful response looks like the following example. In this response, the single‑value property
encryption_algorithmis automatically set to the read‑only value"multiple", indicating that multiple algorithms are now configured. This field can't be modified directly through aPATCHrequest. The array‑based propertyencryption_algorithmsnow includes bothaes128andaes256.{ "authentication_algorithm": "sha256", "authentication_algorithms": [ "sha256" ], "connections": [], "created_at": "2025-03-09T01:46:00.785105Z", "encapsulation_mode": "tunnel", "encryption_algorithm": "multiple", "encryption_algorithms": [ "aes128", "aes256" ], "id": "r006-51eae621-dbbc-4c47-b623-b57a43c19876", "key_lifetime": 3600, "name": "my-ipsec-policy", "pfs": "group_14", "pfs_groups": [ "group_14" ], "resource_group": { "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "Default" }, "resource_type": "ipsec_policy", "transform_protocol": "esp" }
Example 2: Multiple algorithms to single
-
This example shows the patching behavior from multiple to a single algorithm. The current state shows the single‑value property
encryption_algorithmset to"multiple", and the array‑based propertyencryption_algorithmscontainingaes128andaes256.{ "authentication_algorithm": "sha256", "authentication_algorithms": [ "sha256" ], "connections": [], "created_at": "2025-03-09T01:46:00.785105Z", "encapsulation_mode": "tunnel", "encryption_algorithm": "multiple", "encryption_algorithms": [ "aes128", "aes256" ], "id": "r006-51eae621-dbbc-4c47-b623-b57a43c19876", "key_lifetime": 3600, "name": "my-ipsec-policy", "pfs": "group_14", "pfs_groups": [ "group_14" ], "resource_group": { "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "Default" }, "resource_type": "ipsec_policy", "transform_protocol": "esp" } -
In the
PATCHrequest, the array-based propertyencryption_algorithmsis updated so that it now specifies onlyaes256.{ "encryption_algorithms": [ "aes256" ] } -
A successful response looks like the following example. In this response, the single‑value property
encryption_algorithmis automatically set toaes256, indicating that only a single algorithm is configured. The array‑based propertyencryption_algorithmsis updated to includeaes256.{ "authentication_algorithm": "sha256", "authentication_algorithms": [ "sha256" ], "connections": [], "created_at": "2025-03-09T01:46:00.785105Z", "encapsulation_mode": "tunnel", "encryption_algorithm": "aes256", "encryption_algorithms": [ "aes256" ], "id": "r006-51eae621-dbbc-4c47-b623-b57a43c19876", "key_lifetime": 3600, "name": "my-ipsec-policy", "pfs": "group_14", "pfs_groups": [ "group_14" ], "resource_group": { "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "Default" }, "resource_type": "ipsec_policy", "transform_protocol": "esp" }