-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,7 +131,8 @@ rawKey := key.Secret.Bytes() | |
This package supports [ECDH](https://en.wikipedia.org/wiki/Elliptic-curve_Diffie%E2%80%93Hellman) key agreement protocol for the TOTP secret key generation (deriving TOTP secret from ECDH [shared secret](https://en.wikipedia.org/wiki/Shared_secret)). | ||
|
||
```go | ||
// Pre-agreement between Alice and Bob. | ||
// Pre-agreement between Alice and Bob. commonCtx can be any string but consistent | ||
// between Alice and Bob. | ||
commonCurve := ecdh.X25519() | ||
commonCtx := "example.com [email protected] [email protected] TOTP secret v1" | ||
|
||
|