go/src/crypto
Roland Shoemaker 67d8916d55 crypto/ecdh: explicitly reject mismatched curves in ECDH
Return an explicit error when PrivateKey.ECDH is called with a PublicKey
which uses a different Curve. Also document this requirement, even
though it is perhaps obvious.

Fixes #58131

Change-Id: I739181a3f1283bed14fb5ee7eb78658b854d28d8
Reviewed-on: https://go-review.googlesource.com/c/go/+/464335
Reviewed-by: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
2023-02-06 21:22:50 +00:00
..
aes crypto/aes: On ppc64le, use better instructions when available 2022-11-21 15:06:26 +00:00
boring crypto/internal/boring: update to newer boringcrypto, add arm64 2022-08-18 21:28:09 +00:00
cipher crypto: use bytes.Clone 2022-09-28 03:55:33 +00:00
des crypto/des: fix a typo in the comment for permuteFinalBlock 2022-12-01 21:00:43 +00:00
dsa
ecdh crypto/ecdh: explicitly reject mismatched curves in ECDH 2023-02-06 21:22:50 +00:00
ecdsa crypto/ecdsa: verify validity of signature parameters in Verify 2022-12-01 17:28:18 +00:00
ed25519 crypto/ed25519: improve Ed25519ctx docs and add example 2023-01-17 16:25:39 +00:00
elliptic crypto/elliptic: remove deprecation markers 2022-11-24 03:05:33 +00:00
hmac
internal all: fix problematic comments 2023-01-30 18:10:36 +00:00
md5 crypto: use encoding append functions 2022-09-20 02:58:09 +00:00
rand crypto/rand: replace shift with constant 2023-02-06 18:03:38 +00:00
rc4 crypto/internal/subtle: rename to crypto/internal/alias 2022-08-17 18:46:05 +00:00
rsa crypto/rsa: remove deprecation markers for multiprime RSA support 2022-11-23 23:15:01 +00:00
sha1 crypto/sha1: use math/bits.RotateLeft32 2023-02-06 18:37:22 +00:00
sha256 crypto/{sha512,sha256,sha1}: reduce Write calls in Sum 2022-11-21 22:16:06 +00:00
sha512 crypto/sha512: reduce add usage on PPC64 2023-01-30 14:01:05 +00:00
subtle crypto/subtle: add XORBytes 2022-08-17 18:47:33 +00:00
tls all: fix problematic comments 2023-01-30 18:10:36 +00:00
x509 internal/godebug: export non-default-behavior counters in runtime/metrics 2023-01-19 22:26:43 +00:00
crypto.go
issue21104_test.go