aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/ecdh/ecdh.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/ecdh/ecdh.go')
-rw-r--r--src/crypto/ecdh/ecdh.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/crypto/ecdh/ecdh.go b/src/crypto/ecdh/ecdh.go
index 74420559b5..b86f521787 100644
--- a/src/crypto/ecdh/ecdh.go
+++ b/src/crypto/ecdh/ecdh.go
@@ -16,7 +16,11 @@ import (
)
type Curve interface {
- // GenerateKey generates a new PrivateKey from rand.
+ // GenerateKey generates a random PrivateKey.
+ //
+ // Most applications should use [crypto/rand.Reader] as rand. Note that the
+ // returned key does not depend deterministically on the bytes read from rand,
+ // and may change between calls and/or between versions.
GenerateKey(rand io.Reader) (*PrivateKey, error)
// NewPrivateKey checks that key is valid and returns a PrivateKey.