]> Cypherpunks repositories - gostls13.git/commit
crypto/ecdh: revamp FIPS ECDH API
authorFilippo Valsorda <filippo@golang.org>
Wed, 20 Nov 2024 17:59:09 +0000 (18:59 +0100)
committerGopher Robot <gobot@golang.org>
Fri, 22 Nov 2024 02:09:10 +0000 (02:09 +0000)
commitfb432782f0017f59f6f2c5f620dfd8c67b5e35e3
tree7c14025c9735d3fabda9e0908d376b46a86656f5
parentd524c954b14c861e6a442e09abd38ba074ad376d
crypto/ecdh: revamp FIPS ECDH API

This makes it more similar to the ECDSA API, introducing proper key
types that can correctly "cache" the key check.

The new API also has a better compliance profile. Note how the old
ECDHPnnn functions were not doing the PCT, instead delegating to the
caller an invocation of ImportKeyPnnn.

Change-Id: Ic6cf834427fd790324919b4d92bdaa2aac840016
Reviewed-on: https://go-review.googlesource.com/c/go/+/630098
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
src/crypto/ecdh/ecdh.go
src/crypto/ecdh/nist.go
src/crypto/internal/fips140/ecdh/cast.go
src/crypto/internal/fips140/ecdh/ecdh.go
src/crypto/internal/fips140/ecdh/order_test.go
src/crypto/internal/fips140test/cast_test.go