PAKE family

SPAKE2

Balanced password-authenticated key exchange based on Diffie-Hellman

unverified 1 variant IRTF CFRG draft-irtf-cfrg-spake2 (RFC 9382)

Overview

SPAKE2 is a balanced PAKE in which two parties that share a low-entropy password derive a strong shared key, without letting an eavesdropper or active attacker run offline guesses. It is simple and efficient, and it has been standardised by the CFRG.

SPAKE2 modifies Diffie-Hellman by masking each party's ephemeral public value with a fixed group element raised to the password: one side sends X* = X + w*M and the other Y* = Y + w*N, where M and N are public constants with unknown discrete logarithms. Each party removes the other's mask using w and completes the Diffie-Hellman computation. Anyone without the password learns nothing that can be tested offline; an active attacker gets one guess per protocol run.

In a balanced PAKE both parties hold the same password-derived secret, which suits pairing two devices or peers. For client-server login, where the server should not store the password equivalent, augmented PAKEs such as OPAQUE are more appropriate. SPAKE2 was published as RFC 9382 from the draft listed among this family's standards. One configuration is present: spake2-ed25519, using the Edwards25519 group.

History

2005–2005
  1. SPAKE2 published by Michel Abdalla, David Pointcheval

How it works

  1. Both parties derive a scalar w from the shared password.
  2. A sends X* = xG + wM; B sends Y* = yG + wN.
  3. A computes K = x(Y* - wN), B computes K = y(X* - wM); both get xyG.
  4. A transcript hash of identities, messages and K yields the session key and confirmation MACs.

Security notes

Security depends on nobody knowing the discrete logarithms of M and N, so the standard constants must be used. The password-derived value must be protected like the password itself; for server-side storage prefer OPAQUE. Not post-quantum.

Typical uses

Pairing devices with a short codePeer-to-peer file transfer with a shared passphrase (e.g. magic-wormhole style tools)Bootstrapping secure channels from a PIN

Variants in NextSSL

1
AlgorithmTierSizes (bytes)StandardsAPI
SPAKE2-Ed25519
spake2-ed25519
unverified key 1–256 · ss 32 draft-irtf-cfrg-spake2 root

Frequently asked questions

Which SPAKE2 variants does NextSSL include?

NextSSL registers 1 SPAKE2 variant: spake2-ed25519.