diff options
author | Colin Cross <ccross@android.com> | 2023-11-08 14:34:51 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2023-11-09 08:50:14 -0800 |
commit | 68a2d6d0813d288a1149f79a7223284fa2f5559f (patch) | |
tree | 143cca9a296a439937d2377dda45b0a02a58127b /src/crypto/ecdh/ecdh.go | |
parent | 041649c429280aac67ca954c19cbbf0adc27312f (diff) | |
parent | ed817f1c4055a559a94afffecbb91c78e4f39942 (diff) | |
download | go-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.go | 6 |
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. |