|
1 | 1 | # SPAKE2 |
2 | 2 |
|
3 | | -[](https://godoc.org/github.com/backkem/spake2) |
| 3 | +[](https://godoc.org/github.com/backkem/spake2-go) |
| 4 | +[](https://github.com/backkem/spake2-go/actions/workflows/ci.yml) |
4 | 5 |
|
5 | 6 | A Go implementation of the SPAKE2 password-authenticated key exchange protocol. |
6 | 7 |
|
7 | 8 | ## Overview |
8 | 9 |
|
9 | 10 | SPAKE2 is a secure, password-authenticated key exchange protocol that allows two parties to establish a shared secret key based on a low-entropy password without revealing the password to an eavesdropper. This implementation provides both client and server components for the SPAKE2 protocol. |
10 | 11 |
|
| 12 | +⚠️ **Security Warning**: While this implementation has been tested against the official RFC 9382 test vectors for correctness, it has not undergone formal security review or audit for vulnerabilities. Use at your own risk in production environments. Consider having the code reviewed by security experts before deploying in security-critical applications. |
| 13 | + |
11 | 14 | ## Features |
12 | 15 |
|
13 | 16 | - Implements the SPAKE2 protocol as described in [RFC 9382](https://www.rfc-editor.org/rfc/rfc9382). |
@@ -79,6 +82,36 @@ func main() { |
79 | 82 | } |
80 | 83 | ``` |
81 | 84 |
|
| 85 | +## Protocol Flow |
| 86 | + |
| 87 | +Below is a simplified flow of the SPAKE2 protocol exchange between client and server: |
| 88 | + |
| 89 | +```mermaid |
| 90 | +sequenceDiagram |
| 91 | + participant C as Client |
| 92 | + participant S as Server |
| 93 | + C->>S: Start (Client Message) |
| 94 | + S->>C: Exchange (Server Message) |
| 95 | + C->>S: Finish (Client Confirm) |
| 96 | + S->>C: Confirm (Server Confirm) |
| 97 | + C->>C: Verify |
| 98 | + Note over C,S: Shared Key Established |
| 99 | +``` |
| 100 | + |
| 101 | +_Note: Render this diagram on GitHub or convert to an image for better visibility._ |
| 102 | + |
| 103 | +Alternatively, as a simple ASCII representation: |
| 104 | + |
| 105 | +``` |
| 106 | +Client Server |
| 107 | + | Start Msg ------> | |
| 108 | + | <------ Exchange Msg | |
| 109 | + | Finish Msg ------> | |
| 110 | + | <------ Confirm Msg | |
| 111 | + | Verify | |
| 112 | + v Shared Key v Shared Key |
| 113 | +``` |
| 114 | + |
82 | 115 | ## Documentation |
83 | 116 |
|
84 | 117 | Full documentation is available on [GoDoc](https://godoc.org/github.com/backkem/spake2). |
|
0 commit comments