liveBook · Manning

Invalid curve attack

As explained in Real-World Cryptography

An invalid curve attack supplies a point from a different elliptic curve so that an implementation performs scalar multiplication in an unintended group with exploitable subgroups.

An invalid curve attack tricks a key-exchange implementation into multiplying a received point from a different elliptic curve. The attacker chooses a related curve with small subgroups, so the resulting exchange can leak pieces of the victim’s private key. section 5.4

The attack follows a short chain:

  • Short-Weierstrass scalar-multiplication formulas do not use the curve parameter b, allowing related curves to share implementation formulas. section 5.4
  • The attacker sends a point on a related curve containing exploitable small subgroups. section 5.4
  • The server multiplies that point during key exchange, unintentionally performing the operation in the wrong group. section 5.4

Defend by validating public keys: reject the point at infinity and verify that the received coordinates satisfy the intended curve equation. For ECDH, X25519 is recommended because its design and implementations account for this threat. section 5.4

Figure 5.15 A small subgroup attack impacts DH groups that have many subgroups. By choosing generators of small subgroups as public keys, an attacker can leak bits of someone’s private key little by little.

Use the small-subgroup diagram to visualize how carefully chosen public points can reveal private-key bits incrementally. section 5.4

How Real-World Cryptography covers it

How deep it goes
Explains the attack mechanism and public-key checks, but stops short of implementation detail or a complete exploit.
Examples
Uses short-Weierstrass curves, NIST P-256, attacker-selected points, and X25519 as a defensive comparison.
What it assumes
Assumes basic Diffie-Hellman, elliptic-curve groups, public keys, and scalar multiplication.
What you can do after
Operate/configure ECDH defensively by validating received points or choosing X25519.
How it connects
Connects elliptic curves, scalar multiplication, small subgroup attacks, public-key validation, Diffie-Hellman, and ECDH.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Real-World Cryptography. The section links point to the parts of the book it draws on.