Safeguard
Application Security•

ASVS 5.0 V11.6.2: Use Safe Key Exchange Parameters

ASVS V11.6.2 requires approved key exchange algorithms with secure parameters, to stop adversary in the middle attacks. Prefer ECDHE with named curves.

Safeguard Security Team
1 min read

ASVS 5.0 V11.6.2 (Level 3) requires approved algorithms for key exchange, such as Diffie-Hellman, configured with secure parameters, so that an attacker cannot weaken the exchange or sit in the middle.

Why it matters

Small or reused Diffie-Hellman groups, and exchanges without authentication, let an attacker downgrade or break the shared secret. The handshake is where a session's whole protection starts.

How to implement it

Prefer ephemeral elliptic curve exchange (ECDHE) with X25519 or P-256 or larger. If finite field DH is unavoidable, use a standard named group of at least 3072 bits instead of generating your own. Authenticate the exchange with certificates or signatures. In nginx:

ssl_ecdh_curve X25519:secp384r1:prime256v1;

How to test it

Run a TLS scanner against your endpoints and list negotiated groups. Flag any export grade or 1024 bit group, and any suite without forward secrecy.

Common mistakes

  • Using an old static dhparam file of 1024 bits
  • Unauthenticated exchange between internal services
  • Custom exchange protocols instead of TLS

Quick check

Why prefer ephemeral exchange?

It gives forward secrecy: recorded traffic stays safe if a long term key leaks later.

Sources

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.