aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/ecdh/ecdh.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2023-11-08 14:34:51 -0800
committerColin Cross <ccross@android.com>2023-11-09 08:50:14 -0800
commit68a2d6d0813d288a1149f79a7223284fa2f5559f (patch)
tree143cca9a296a439937d2377dda45b0a02a58127b /src/crypto/ecdh/ecdh.go
parent041649c429280aac67ca954c19cbbf0adc27312f (diff)
parented817f1c4055a559a94afffecbb91c78e4f39942 (diff)
downloadgo-68a2d6d0813d288a1149f79a7223284fa2f5559f.tar.gz
Merge tag 'upstream-go1.21.4'
Test: builds Change-Id: I51ebec3387045e2d403ed4cb8d29e890930c802a
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.