SPAKE2-Ed25519
Balanced password-authenticated key exchange based on Diffie-Hellman
Source found and wired, correctness not fully proven. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.
About SPAKE2-Ed25519
SPAKE2-Ed25519 is a password-authenticated key exchange from the SPAKE2 family. It uses a 1–256-byte key and a 32-byte shared secret. Its registry entry cites draft-irtf-cfrg-spake2. NextSSL lists it in the unverified tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).
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–2005SPAKE2 published by Michel Abdalla, David Pointcheval
How it works
- Both parties derive a scalar w from the shared password.
- A sends X* = xG + wM; B sends Y* = yG + wN.
- A computes K = x(Y* - wN), B computes K = y(X* - wM); both get xyG.
- 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
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| key | 1 – 256 | Secret key |
| ss | 32 | Shared secret |
Use it
from nextssl_demo import NextSSL
root = NextSSL(root=True) # tier 'unverified' is reachable from the root API only
# multi-round: see _pake_start / _pake_step in examples/python/nextssl_demo.py
nextssl_root_pake_start("spake2-ed25519", NULL, role, password, context, &handle, msg);
nextssl_root_pake_step(handle, msg_in, msg_out, ss, &done);
// pake is a root-only kind: use the C ABI (nextssl_root_*)
// or the Pake trait in nextssl-core/src/traits.rs
Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.
Similar names
Looking for something else?More password-authenticated key exchange
All 3Frequently asked questions
What is SPAKE2-Ed25519?
SPAKE2-Ed25519 is a PAKE in the SPAKE2 family. 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.
What are the SPAKE2-Ed25519 sizes?
In NextSSL, SPAKE2-Ed25519 uses: key 1 to 256 bytes, shared secret 32 bytes.
Who designed SPAKE2-Ed25519 and when?
SPAKE2-Ed25519 belongs to the SPAKE2 family, first published in 2005 by Michel Abdalla, David Pointcheval. Its origin: IRTF CFRG draft-irtf-cfrg-spake2 (RFC 9382).
Which standards define SPAKE2-Ed25519?
SPAKE2-Ed25519 is referenced by draft-irtf-cfrg-spake2.
Is SPAKE2-Ed25519 safe to use?
SPAKE2-Ed25519 is in the unverified tier. Source found and wired, correctness not fully proven. Root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).