Skip to navigationSkip to main contentSkip to footerScaleway Docs

Site-to-Site VPN security proposals

Note

Site-to-Site VPN is currently in Private Beta, and available to selected testers only via the Scaleway API. Request an invitation.

When creating a VPN connection, you must define a security proposal (aka IPSec proposal). The security proposal defines the encryption and authentication methods used to secure the IPSec VPN tunnel.

A security proposal is made up of several parts, each with definable algorithms or settings. You should define these bearing in mind the use case of your Site-to-Site VPN, balancing security, performance and compatibility.

It is important to find the optimal trade-off between these elements: the strongest possible security may be overkill for your use-case, and slow down performance to unacceptable levels. Some algorithms are outdated and not optimal for modern VPNs, but may be the only compatible option for legacy VPNs.

In this document, we explain the different elements of a security protocol, and describe the different algorithms and security options available with Scaleway Site-to-Site VPN, giving advice to help you choose the best options for your use-case.

Defining a security proposal

There are two parts to a security proposal:

  • IKEv2 (Internet Key Exchange): Establishes a secure connection between the VPN gateway and the customer gateway
  • ESP (Encapsulating Security Payload): Encrypts and authenticates the payload of the IP data packets traveling through the tunnel.

When defining your Site-to-Site VPN security proposal, you must define the algorithms/ options to be used for IKEv2 and ESP as described below:

ProtocolElementDescriptionUser must define?
IKEv2EncryptionAlgorithm to encrypt IKE negotiation messages✅ Yes
IKEv2IntegrityHMAC-based algorithm to verify IKE negotiation messages have not been tampered with.

Only set an HMAC integrity algorithm if not using an AEAD algorithm for IKEv2 encryption (see below). Otherwise, integrity is built in, and you do not need to set an IKEv2 integrity algorithm.
❓ Depends
IKEv2Key Exchange MethodDH group to define strength of key exchange✅ Yes
ProtocolElementDescriptionUser must define?
ESPEncryptionAlgorithm to encrypt traffic's data payloads✅ Yes
ESPIntegrityHMAC-based algorithm to verify data payloads have not been tampered with.

Only set an HMAC integrity algorithm if not using an AEAD algorithm for ESP encryption (see below). Otherwise, integrity is built in, and you do not need to set an ESP integrity algorithm.
❓ Depends
ESPKey Exchange MethodDH group to define strength of key exchange❌ No

Encryption algorithms

The following encryption algorithms are available.

AlgorithmAEAD / non-AEAD*Key Size (bits)Security LevelNotesRecommended?
aes256gcm16 (AES-GCM)AEAD256✅ Very StrongGenerally the best choice for IPSec ESP & IKE✅ Recommended
aes192gcm16 (AES-GCM)AEAD192✅ StrongSuitable for high-performance VPNs👍 Acceptable
aes128gcm16 (AES-GCM)AEAD128✅ StrongSuitable for high-performance VPNs👍 Acceptable
aes256ccm16 (AES-CCM)AEAD256✅ StrongAlternative to AES-GCM, but GCM is preferred👍 Acceptable
aes128ccm16 (AES-CCM)AEAD128⚠️ MediumAlternative to AES-GCM, but GCM is preferred👍 Acceptable
chacha20poly1305AEAD256✅ StrongPerformance-sensitive (mobile, embedded), best choice for low-power devices✅ Recommended
aes256 (AES-CBC)non-AEAD256✅ StrongSuitable for legacy VPNs. Use only with HMAC (e.g. sha256)⚠️ Use with caution
aes192 (AES-CBC)non-AEAD192⚠️ MediumRarely used, aes256 is preferred.⚠️ Use with caution
aes128 (AES-CBC)non-AEAD128⚠️ MediumSuitable for performance-sensitive VPNs, where constraints don't allow aes256⚠️ Use with caution

* Authenticated Encryption with Associated Data (AEAD) algorithms provide both encryption and authentication in a single step. They are more secure and efficient than non-AEAD algorithms, but are not supported by all legacy devices. We recommend that you always prefer AEAD algorithms (aes256gcm16 or chacha20poly1305) for performance and security. Choosing an AEAD algorithm for IKEv2/ESP encryption means you do not need to define an algorithm for IKEv2/ESP integrity.

Integrity algorithms

Integrity is based on Hash-based Message Authentication Code (HMAC). The following algorithms are available:

AlgorithmOutput Size (bits)Security LevelNotesRecommended?
sha512512✅ Very StrongSuitable for high security environments. Use for long term security.✅ Recommended
sha384384✅ StrongBalanced security/performance. Good alternative to sha-512.✅ Recommended
sha256256✅ StrongDefault for most VPNs. Recommended baseline.✅ Recommended

Key exchange methods

Key exchange is Diffie-Hellman-based. The following DH groups can be set to determine the strength and performance of the key exchange:

DH GroupBit SizeSecurity LevelUse CaseRecommended?
ecp521521✅ Very StrongSuitable for high security environments. May be overkill (lowers performance).👍 Acceptable
ecp384384✅ StrongBoth strong and fast. Our top choice for modern VPNs.✅ Recommended
ecp256256✅ StrongSuitable for performance-sensitive VPNs.✅ Recommended
curve25519 (X25519)256✅ Very StrongBoth strong and fast. Our top choice for performance.✅ Recommended
modp40964096✅ StrongStrong but slow. May be suitable for legacy VPNs.👍 Acceptable
modp30723072✅ Medium-StrongMay be suitable for legacy VPNs.👍 Acceptable
modp20482048⚠️ MinimumUse for older VPNs only if absolutely needed.⚠️ Use with caution

Standard recommendation

For standard usage on modern equipment we recommend the following security proposal:

IKEv2 EncryptionIKEv2 IntegrityIKEv2 Key ExchangeESP EncryptionESP IntegrityESP Key Exchange
aes256gcm16not requiredcurve25519aes256gcm16not requirednot required
Still need help?

Create a support ticket
No Results