strongSwan’s cryptographic subsystem is fully plugin-based. Plugins implement standard interfaces defined inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/strongswan/strongswan/llms.txt
Use this file to discover all available pages before exploring further.
libstrongswan and register algorithm providers at startup. When multiple plugins provide the same algorithm, the one with the highest configured priority wins.
This lets you choose between crypto backends (for example, OpenSSL vs. wolfSSL), add hardware acceleration, or meet compliance requirements (for example, FIPS mode via OpenSSL).
Crypto backend plugins
| Plugin | Primary source | Provides |
|---|---|---|
openssl | OpenSSL / LibreSSL | RSA, ECDSA, EdDSA, DH, ECDH, AES, SHA-1/2/3, ChaCha20-Poly1305, and more |
botan | Botan library | Modern, header-only C++ crypto; broad algorithm coverage |
wolfssl | wolfSSL (CyaSSL) | Embedded-focused TLS/crypto library |
gcrypt | libgcrypt (GnuPG) | GNU crypto library; RSA, DH, AES, SHA |
gmp | GNU MP | RSA and classic DH (Diffie-Hellman) via big-integer arithmetic |
aesni | CPU instruction | AES-NI hardware acceleration (x86/x86-64) |
af-alg | Linux kernel | Offload crypto to kernel via AF_ALG socket interface |
rdrand | CPU instruction | Intel RDRAND hardware random number generator |
padlock | VIA hardware | VIA Padlock hardware crypto engine |
openssl is the most common backend and is recommended for most deployments. It provides the widest algorithm coverage and is required for EAP-MSCHAPv2 (which needs MD4 and DES from OpenSSL’s legacy provider).Algorithm-specific plugins
These plugins ship implementations of individual algorithms. They are used when no full-featured backend is loaded or when a specific implementation is preferred:| Plugin | Algorithms |
|---|---|
aes | AES-128/192/256 (software) |
sha1 | SHA-1 |
sha2 | SHA-256, SHA-384, SHA-512 |
sha3 | SHA-3 (Keccak) |
des | 3DES (legacy) |
blowfish | Blowfish (legacy) |
md5 | MD5 |
md4 | MD4 (needed for MSCHAPv2) |
hmac | HMAC construction |
cmac | CMAC construction |
xcbc | XCBC-MAC |
gcm | GCM AEAD mode |
ccm | CCM AEAD mode |
ctr | CTR mode |
chapoly | ChaCha20-Poly1305 |
curve25519 | X25519 DH and Ed25519 signatures |
fips_prf | FIPS PRF for EAP-SIM/AKA |
drbg | NIST SP 800-90A DRBG (HMAC-DRBG) |
nonce | Nonce generation |
random | Entropy source (/dev/urandom) |
Post-quantum cryptography
Theml plugin implements ML-KEM (CRYSTALS-Kyber, FIPS 203) for hybrid key exchange in IKEv2. Combined with a classical Diffie-Hellman group, it provides quantum-resistant key establishment:
swanctl.conf
OpenSSL plugin configuration
/etc/strongswan.d/charon/openssl.conf
Checking loaded algorithms
To see which algorithms are available from currently loaded plugins:MODP_4096) is absent, the providing plugin is not loaded.
Configuring proposals in swanctl.conf
Algorithm selection inswanctl.conf uses proposal strings. Only algorithms available from loaded plugins can be negotiated.
swanctl.conf
- Modern (recommended)
- FIPS-compliant
- Legacy compatibility
AEAD algorithms such as
aes256gcm16 and chacha20poly1305 provide both encryption and integrity. When using an AEAD cipher in ESP proposals, you do not need a separate integrity algorithm.