spake2plus 1.0.2
spake2plus: ^1.0.2 copied to clipboard
A Dart library for SPAKE2+ protocol
spake2plus #
A Dart package for SPAKE2+, an Augmented Password-Authenticated Key Exchange (PAKE) protocol [RFC9383]. Supports Linux and macOS for now.
Dependencies #
This package uses OpenSSL v3.0 and later via dart:ffi.
Tested environments #
- Ubuntu 24.04.1 LTS
- Raspberry Pi OS (64bit, Kernel 6.6, Debian 12(bookworm))
- macOS 14/15
Usage #
A simple way to understand the package is to look at the example code and test cases. Even if you don't understand RFC9383, you can get a general idea of how to use it.
Supported PBKDF #
| PBKDF | Status |
|---|---|
| Scrypt [RFC7914] | ✅ |
| Argon2id [RFC9106] | ❌ |
Supported ECC Curves and Hash, KDF, and MAC Algorithms #
| G | Hash | KDF | MAC | Status |
|---|---|---|---|---|
| P-256 | SHA256 | HKDF-SHA256 | HMAC-SHA256 | ✅ |
| P-256 | SHA512 | HKDF-SHA512 | HMAC-SHA512 | ✅ |
| P-384 | SHA256 | HKDF-SHA256 | HMAC-SHA256 | ❌ |
| P-384 | SHA512 | HKDF-SHA512 | HMAC-SHA512 | ❌ |
| P-521 | SHA512 | HKDF-SHA512 | HMAC-SHA512 | ❌ |
| edwards25519 | SHA256 | HKDF-SHA256 | HMAC-SHA256 | ❌ |
| edwards448 | SHA512 | HKDF-SHA512 | HMAC-SHA512 | ❌ |
| P-256 | SHA256 | HKDF-SHA256 | CMAC-AES-128 | ✅ |
| P-256 | SHA512 | HKDF-SHA512 | CMAC-AES-128 | ✅ |
Getting Started #
Raspberry Pi OS #
-
Install
libcrypto:sudo apt-get install libssl-dev -
Check the path to
libcrypto.so. -
Pass the library path into the
Spake2plusclass constructor.