curve25519: include potential fips140=only error in panic message
Updates golang/go#75061 Change-Id: I6a6a696474122a12c12696d8a2efec902572327d Reviewed-on: https://go-review.googlesource.com/c/crypto/+/696996 Reviewed-by: Nicola Murino <nicola.murino@gmail.com> Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Carlos Amedee <carlos@golang.org>
This commit is contained in:
committed by
Gopher Robot
parent
f5a2eabcab
commit
b8d8dae13d
@@ -36,7 +36,7 @@ func ScalarBaseMult(dst, scalar *[32]byte) {
|
||||
curve := ecdh.X25519()
|
||||
priv, err := curve.NewPrivateKey(scalar[:])
|
||||
if err != nil {
|
||||
panic("curve25519: internal error: scalarBaseMult was not 32 bytes")
|
||||
panic("curve25519: " + err.Error())
|
||||
}
|
||||
copy(dst[:], priv.PublicKey().Bytes())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user