Add SPAKE2+ password authenticated key exchange (RFC 9383)#5711
Open
randombit wants to merge 1 commit into
Open
Add SPAKE2+ password authenticated key exchange (RFC 9383)#5711randombit wants to merge 1 commit into
randombit wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces SPAKE2+ (RFC 9383) as a new PAKE implementation in Botan 3, including native C++ APIs, FFI bindings, Python bindings, tests (KATs + round trips), and documentation/example material.
Changes:
- Adds a new SPAKE2+ module with RFC 9383 ciphersuites and support for custom M/N generation via hash-to-curve.
- Exposes SPAKE2+ via the C FFI and the Python
botan3.pywrapper, including functional tests for both. - Adds RFC test vectors, new unit tests, and new API reference documentation (C++ + Python + FFI).
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/pake/spake2p/spake2p.h | New public C++ API for SPAKE2+ (system parameters, registration, prover/verifier contexts). |
| src/lib/pake/spake2p/spake2p.cpp | New SPAKE2+ implementation (password derivation, key schedule, protocol flow). |
| src/lib/pake/spake2p/info.txt | Registers the new SPAKE2+ module and its dependencies. |
| src/lib/ffi/ffi_spake2p.cpp | Adds FFI implementation for SPAKE2+ APIs and context objects. |
| src/lib/ffi/ffi.h | Bumps FFI API version and declares new SPAKE2+ FFI functions/types. |
| src/lib/ffi/ffi.cpp | Extends botan_ffi_supports_api for the new FFI API version. |
| src/lib/ffi/info.txt | Bumps the FFI module version define. |
| src/python/botan3.py | Bumps required FFI version and adds Python SPAKE2+ wrapper APIs/classes. |
| src/scripts/test_python.py | Adds a Python-level integration test for the new SPAKE2+ bindings. |
| src/tests/test_spake2p.cpp | Adds SPAKE2+ KAT tests, round-trip tests, and password registration tests. |
| src/tests/data/pake/spake2p.vec | Adds RFC 9383 Appendix C test vectors. |
| src/tests/test_ffi.cpp | Adds SPAKE2+ FFI tests (happy path + tamper failure). |
| src/examples/spake2p.cpp | Adds a C++ example program demonstrating SPAKE2+ usage. |
| doc/api_ref/spake2p.rst | Adds C++ API reference documentation for SPAKE2+. |
| doc/api_ref/python.rst | Documents SPAKE2+ Python API additions. |
| doc/api_ref/ffi.rst | Updates the FFI version mapping table for the new API version. |
| doc/api_ref/contents.rst | Adds spake2p to the API reference table of contents. |
| doc/roadmap.rst | Removes SPAKE2+ from the roadmap since it is now implemented. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
randombit
force-pushed
the
jack/spake2+
branch
3 times, most recently
from
July 13, 2026 21:10
e58afeb to
a493e35
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.