Gopher Robot
19acf81bd7
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: I81158fb078bccce57d8d46cac0cb87e6c4f8cff9
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/728181
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: David Chase <drchase@google.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-12-08 10:34:26 -08:00
Gopher Robot
3a1c6b4b61
x509roots/fallback: update bundle
...
This is an automated CL which updates the NSS root bundle.
[git-generate]
go generate ./x509roots
Change-Id: Icde363f2fa61d1cb85552e57d4cae30b33ec96ed
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/723803
Auto-Submit: Gopher Robot <gobot@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2025-12-03 12:57:53 -08:00
Michael Stapelberg
f4602e4040
ssh/agent: fix flaky test by ensuring a writeable home directory
...
This fixes flakiness observed inside Google (b/465393996).
Change-Id: Ic3decc3206b470cddf22c441b0cf92bb2bebb075
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/724002
Reviewed-by: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-12-02 08:08:01 -08:00
Gopher Robot
4e0068c009
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: I3923d98d88595230b12db261c48168b863dc2ce9
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/722000
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Neal Patel <nealpatel@google.com >
2025-11-19 11:55:48 -08:00
Neal Patel
e79546e28b
ssh: curb GSSAPI DoS risk by limiting number of specified OIDs
...
Previously, an attacker could specify an integer up to 0xFFFFFFFF
that would directly allocate memory despite the observability of
the rest of the payload. This change places a hard cap on the
amount of mechanisms that can be specified and encoded in the
payload. Additionally, it performs a small sanity check to deny
payloads whose stated size is contradictory to the observed payload.
Thank you to Jakub Ciolek for reporting this issue.
Fixes CVE-2025-58181
Fixes golang/go#76363
Change-Id: I0307ab3e906a3f2ae763b5f9f0310f7073f84485
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/721961
Auto-Submit: Roland Shoemaker <roland@golang.org >
Reviewed-by: Damien Neil <dneil@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-11-19 11:28:37 -08:00
Neal Patel
f91f7a7c31
ssh/agent: prevent panic on malformed constraint
...
An attacker could supply a malformed Constraint that
would trigger a panic in a serving agent, effectively
causing denial of service.
Thank you to Jakub Ciolek for reporting this issue.
Fixes CVE-2025-47914
Fixes golang/go#76364
Change-Id: I195bbc68b1560d4f04897722a6a653a7cbf086eb
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/721960
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Roland Shoemaker <roland@golang.org >
Reviewed-by: Damien Neil <dneil@google.com >
2025-11-19 11:28:34 -08:00
Sean Liao
2df4153a03
acme/autocert: let automatic renewal work with short lifetime certs
...
Fixes golang/go#64997
Fixes golang/go#36548
Change-Id: Idb7a426ad3bfa6ac3b796f4b466da6e3154f1ffa
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/719080
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Mark Freeman <markfreeman@google.com >
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-11-17 10:17:16 -08:00
Sean Liao
bcf6a849ef
acme: pass context to request
...
Fixes golang/go#30183
Change-Id: Ic02b34bc87b9465f5c05b2ef5bec157c58809a91
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/719002
Reviewed-by: Junyang Shao <shaojunyang@google.com >
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net >
Reviewed-by: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-11-12 10:48:32 -08:00
Santhanam
b4f2b62076
ssh: fix error message on unsupported cipher
...
Until now, when ssh keys using one of these[1] ciphers were passed, we were
giving a parse error "ssh: parse error in message type 0".
With this fix, we parse it successfully and return the correct error message.
[1] aes{128,256}-gcm@openssh.com and chacha20-poly1305@openssh.com
Fixes golang/go#52135
Change-Id: I3010fff43c48f29f21edb8d63f44e167861a054e
GitHub-Last-Rev: 14ac7e97306d41cba48053b9c60f2ffc7caded45
GitHub-Pull-Request: golang/crypto#324
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/709275
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Michael Pratt <mpratt@google.com >
Reviewed-by: Junyang Shao <shaojunyang@google.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-11-12 10:42:48 -08:00
Nicola Murino
79ec3a51fc
ssh: allow to bind to a hostname in remote forwarding
...
To avoid breaking backwards compatibility, we fix Listen, which
receives the address as a string, while ListenTCP can still only
be used with IP addresses.
Fixes golang/go#33227
Fixes golang/go#37239
Change-Id: I4d45b40fdcb0d6012ed8da59a02149fa37e7db50
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/599995
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Junyang Shao <shaojunyang@google.com >
Reviewed-by: Bishakh Ghosh <ghoshbishakh@gmail.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Michael Pratt <mpratt@google.com >
2025-11-12 10:42:45 -08:00
Gopher Robot
122a78f140
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: I0f64669e7c813611f71b1381d9e6fdaba1a39712
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/719641
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: David Chase <drchase@google.com >
2025-11-11 10:21:23 -08:00
Sean Liao
c0531f9c34
all: eliminate vet diagnostics
...
For golang/go#74011
Change-Id: I189c5aba554a578bee1fd351edc30cd5cf4d0ed6
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/714960
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net >
Reviewed-by: David Chase <drchase@google.com >
2025-10-28 06:00:51 -07:00
cuishuang
0997000b45
all: fix some comments
...
Change-Id: I0395c5db6edd7d90f9ec1dadbe881a77c906c732
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/713120
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net >
Reviewed-by: David Chase <drchase@google.com >
Auto-Submit: Sean Liao <sean@liao.dev >
Reviewed-by: Sean Liao <sean@liao.dev >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
2025-10-27 09:33:07 -07:00
Sean Liao
017a1aaa2d
chacha20poly1305: panic on dst and additionalData overlap
...
The cipher.AEAD interface specifies that these should not overlap.
This mirrors the check that the GCM implementation does.
Fixes golang/go#75968
Updates golang/go#21624
Change-Id: If5fbb8611ff6c0aae44d50079bad29f56ce00f5b
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/712860
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: David Chase <drchase@google.com >
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-10-22 18:37:21 -07:00
Filippo Valsorda
cf29fa96f8
sha3: make it mostly a wrapper around crypto/sha3
...
crypto/sha3 was introduced in Go 1.24, which is now the minimum Go
version of this module.
Made the hashes go:fix inline wrappers, since the new types can be used
as hash.Hash directly.
The SHAKE instances need a wrapper for the methods we dropped from
crypto.XOF, so no go:fix inline there.
Kept the generic implementation for the legacy Keccak hashes we did not
bring to the standard library. We need to keep them working, but they
don't need to be fast.
Fixes golang/go#73681
Updates golang/go#65269
Change-Id: I6a6a69648b6353b153c70a2cec84864e64dcd61b
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/710115
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net >
Reviewed-by: David Chase <drchase@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2025-10-22 18:01:01 -07:00
cuishuang
0b7aa0cfb0
ssh: use reflect.TypeFor instead of reflect.TypeOf
...
For golang/go#60088 .
Change-Id: I58994c469a2793516214ab1a0072fb6137afc46e
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/709156
Auto-Submit: Sean Liao <sean@liao.dev >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Michael Pratt <mpratt@google.com >
Reviewed-by: Carlos Amedee <carlos@golang.org >
Reviewed-by: Sean Liao <sean@liao.dev >
2025-10-09 11:10:29 -07:00
cuishuang
1faea2975c
all: fix some typos in comment
...
Change-Id: Ia209f0a6d9b19d14e655c65d1287a1416b48c487
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/707535
Reviewed-by: Carlos Amedee <carlos@golang.org >
Reviewed-by: Michael Pratt <mpratt@google.com >
Auto-Submit: Sean Liao <sean@liao.dev >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Sean Liao <sean@liao.dev >
2025-10-08 13:58:26 -07:00
Gopher Robot
627cb894b6
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: Icf986acf9290649488777328f470200bf9e11442
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/710098
Reviewed-by: David Chase <drchase@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com >
2025-10-08 10:40:45 -07:00
Daniel McCarney
dca4914afe
acme: fix autocert TestHTTPHandlerDefaultFallback
...
The Go 1.25.2 release made net/url stricter about parsing bracketed IPv6
hostnames, and is rejecting some test URLs used in the autocert
TestHTTPHandlerDefaultFallback test with an error about the
colon-separated fields requiring at least one hex digit.
This commit replaces the invalid `xxxx` portion of some test URLS with
valid hex digits, fixing the test regression.
Change-Id: I84c192b1cd6daf53ef4199f7987437fd825f7041
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/710155
Reviewed-by: Roland Shoemaker <roland@golang.org >
Auto-Submit: Daniel McCarney <daniel@binaryparadox.net >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-10-08 09:52:31 -07:00
Gopher Robot
1336e21bd6
x509roots/fallback: update bundle
...
This is an automated CL which updates the NSS root bundle.
[git-generate]
go generate ./x509roots
Change-Id: I9ab454c977013b2f6a42bc93fb0649612c54c6c0
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/709475
Reviewed-by: Roland Shoemaker <roland@golang.org >
Auto-Submit: Gopher Robot <gobot@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2025-10-08 08:14:13 -07:00
Nicola Murino
2beaa59a3c
ssh: add VerifiedPublicKeyCallback
...
Fixes golang/go#70795
Change-Id: I9b7c91f35f89495d1e9b5f6ec0c036c02a61d774
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/636335
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Reviewed-by: Junyang Shao <shaojunyang@google.com >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Jorge Hernández <jorgehcrda39@gmail.com >
2025-09-27 12:43:41 -07:00
Nicola Murino
66c3d8ce71
ssh: add support for FIPS mode
...
Unsupported algoritms are silently ignored and not negotiated, or
rejected
Fixes golang/go#75061
Change-Id: I08d50d10a97c08e78aedead89ca61beceff88918
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/698795
Reviewed-by: Mio Mio <miomio0086@gmail.com >
Reviewed-by: Junyang Shao <shaojunyang@google.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-09-27 12:36:52 -07:00
Nicola Murino
ddb4e80c6a
ssh: remove custom contains, use slices.Contains
...
Change-Id: If4784469e7285675bdd51399a76bdc16f0036a2e
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/703635
Reviewed-by: Mark Freeman <markfreeman@google.com >
Reviewed-by: Sean Liao <sean@liao.dev >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-09-15 23:33:16 -07:00
Nicola Murino
f4d47b0db5
ssh: return clearer error when signature algorithm is used as key format
...
ParsePublicKey now returns a more specific error when a signature
algorithm like rsa-sha2-256 is mistakenly provided as a key format
Change-Id: Ic08286a5b2b326e99dd3e61594919203f0c36791
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/695075
Reviewed-by: Filippo Valsorda <filippo@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Mark Freeman <markfreeman@google.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
2025-09-15 23:32:56 -07:00
Michael Stapelberg
96dc232fbd
x509roots/fallback/bundle: add bundle package to export root certs
...
Fixes golang/go#69898
Change-Id: Idbb1bbe48016a622414c84a56fe26f48bfe712c8
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/687155
Reviewed-by: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Roland Shoemaker <roland@golang.org >
Reviewed-by: Mateusz Poliwczak <mpoliwczak34@gmail.com >
2025-09-11 08:14:50 -07:00
Filippo Valsorda
8c9ba31836
all: freeze and deprecate more packages
...
Fixes golang/go#65250
Change-Id: I6a6a6964a2c87e529be50dd67fec462483b07b75
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/701535
Reviewed-by: Mark Freeman <markfreeman@google.com >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Michael Pratt <mpratt@google.com >
2025-09-09 12:19:31 -07:00
Nicola Murino
559e062ce8
ssh/agent: return an error for unexpected message types
...
Previously, receiving an unexpected message type in response to a key
listing or a signing request could cause a panic due to a failed type
assertion.
This change adds a default case to the type switch in order to detect
and explicitly handle unknown or invalid message types, returning a
descriptive error instead of crashing.
Fixes golang/go#75178
Change-Id: Icbc3432adc79fe3c56b1ff23c6724d7a6f710f3a
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/700295
Reviewed-by: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Michael Pratt <mpratt@google.com >
Reviewed-by: Jakub Ciolek <jakub@ciolek.dev >
2025-09-09 02:56:19 -07:00
Gopher Robot
5307a0ce6d
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: I75e16a930bfe42cc082df82ab67802c42ad56a97
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/701303
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Michael Pratt <mpratt@google.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
2025-09-08 08:14:28 -07:00
Daniel McCarney
9d779377cf
acme: include order problem in OrderError
...
If client.WaitOrder or client.CreateOrderCert return an acme.OrderError
it's helpful to include the order's problem field (if available). This
will often have detailed information about why a particular order
became invalid that's invaluable for debugging (e.g. a challenge
response was incorrect, a name couldn't be resolved, etc).
While it's possible for a consumer to poll the order themselves as part
of handling the order to extract a fresh Order.Error field value, it
would take an extra round-trip network request. Since we have the
underlying error in-hand when we produce the OrderError we might as well
include it directly.
Since this field is a structured object with a number of sub-fields the
OrderError.Error() function isn't updated to include the order problem
error in the String description. Interested callers should instead use
errors.Is to extract the problem information directly.
Resolves golang/go#74430
Cq-Include-Trybots: luci.golang.try:x_crypto-gotip-linux-amd64-longtest
Change-Id: I3158f064793bbfdc292dd6b5e1a6bfd7729bd980
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/681037
Auto-Submit: Daniel McCarney <daniel@binaryparadox.net >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Michael Pratt <mpratt@google.com >
Reviewed-by: Ian Stapleton Cordasco <graffatcolmingov@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-09-04 07:39:59 -07:00
Nicola Murino
8f580defa0
ssh: remove Go 1.24 build tag for ML-KEM kex
...
Change-Id: Ia77ad1b6fef9919ab100fb10c42231725eb81c12
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/698775
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2025-08-26 00:42:33 -07:00
Nicola Murino
a4d1237429
ssh/knownhosts: improve IPv6 support in Normalize
...
Correctly converts bracketed IPv6:
- [abcd::abcd:abcd:abcd] => abcd::abcd:abcd:abcd
- [abcd::abcd:abcd:abcd]:22 => abcd::abcd:abcd:abcd
- [abcd::abcd:abcd:abcd]:23 => [abcd::abcd:abcd:abcd]:23
Fixes golang/go#53463
Change-Id: Id0a7460d8448a72e2a8c6d46137245bead9ecf9f
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/694575
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: David Chase <drchase@google.com >
Reviewed-by: Carlos Amedee <carlos@golang.org >
2025-08-19 13:12:03 -07:00
Filippo Valsorda
b8d8dae13d
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 >
2025-08-19 10:40:36 -07:00
Filippo Valsorda
f5a2eabcab
ssh: use curve25519.X25519 instead of curve25519.ScalarMult
...
This lets us surface an error message instead of panicking if running
in fips140=only mode, where ECDH on X25519 returns an error.
Updates golang/go#75061
Change-Id: I6a6a6964c0591f3dca2dc946c99d44364314a3ab
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/696995
Reviewed-by: Carlos Amedee <carlos@golang.org >
Reviewed-by: David Chase <drchase@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
2025-08-19 10:38:43 -07:00
Gopher Robot
44ecf3af99
all: upgrade go directive to at least 1.24.0 [generated]
...
By now Go 1.25.0 has been released, and Go 1.23 is no longer supported
per the Go Release Policy (see https://go.dev/doc/devel/release#policy ).
For golang/go#69095 .
[git-generate]
(cd . && go get go@1.24 .0 && go mod tidy && go fix ./... && go mod edit -toolchain=none)
(cd x509roots/fallback && go get go@1.24 .0 && go mod tidy && go fix ./... && go mod edit -toolchain=none)
Change-Id: Ia4c201e9611a2c13489e16d4ae81d7e3e32bf455
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/695715
Auto-Submit: Gopher Robot <gobot@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: David Chase <drchase@google.com >
2025-08-13 08:00:22 -07:00
Gopher Robot
ef5341b706
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: I93de641462a54b0ae565bb60e2a0e6e7c2c3b883
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/693999
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: David Chase <drchase@google.com >
2025-08-07 10:21:04 -07:00
Daniel McCarney
b999374650
acme: fix pebble subprocess output data race
...
Wait for process completion before reading stdout/stderr buffers
to eliminate race between I/O Go routines and test cleanup.
Updates golang/go#74437
Cq-Include-Trybots: luci.golang.try:x_crypto-gotip-linux-amd64-longtest-race
Change-Id: I2e650c04db5be0d7a1e858ce40e25f13ad12223c
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/693596
Auto-Submit: Daniel McCarney <daniel@binaryparadox.net >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-08-06 13:33:03 -07:00
Mateusz Poliwczak
c247dead11
x509roots/fallback: store bundle certs directly in DER
...
goos: linux
goarch: amd64
pkg: golang.org/x/crypto/x509roots/fallback
cpu: AMD Ryzen 5 4600G with Radeon Graphics
│ /tmp/before │ /tmp/after │
│ sec/op │ sec/op vs base │
InitTime-12 1.726m ± 0% 1.101m ± 1% -36.20% (p=0.000 n=30)
│ /tmp/before │ /tmp/after │
│ B/op │ B/op vs base │
InitTime-12 1178.2Ki ± 0% 779.8Ki ± 0% -33.81% (p=0.000 n=30)
│ /tmp/before │ /tmp/after │
│ allocs/op │ allocs/op vs base │
InitTime-12 11.35k ± 0% 10.64k ± 0% -6.32% (p=0.000 n=30)
Updates golang/go#73691
Change-Id: Ic33f2fdfc65001c41afeb3b6af8a383288d10de6
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/676217
Reviewed-by: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Mark Freeman <mark@golang.org >
2025-08-03 12:47:17 -07:00
Daniel McCarney
1fda73153f
acme: increase pebble test waitForServer attempts
...
In CI it seems that occasionally we can't connect to the test servers
within 10 tries, and the test flakes. Let's give the process more
attempts.
Updates golang/go#74437
Change-Id: I74d6cea83468a3a572ec4b52ff7314c778c664cf
Cq-Include-Trybots: luci.golang.try:x_crypto-gotip-linux-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/692075
Auto-Submit: Daniel McCarney <daniel@binaryparadox.net >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Mark Freeman <mark@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-08-01 08:44:22 -07:00
Gopher Robot
1b4c3d2e8c
x509roots/fallback: update bundle
...
This is an automated CL which updates the NSS root bundle.
[git-generate]
go generate ./x509roots
Change-Id: Ib30b702d41dedacce835628a9dab456098be0703
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/687895
Reviewed-by: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
2025-07-30 16:29:44 -07:00
Daniel McCarney
b903b535d3
acme: capture pebble test subprocess stdout/stderr
...
When spawning the pebble and pebble-challtestserv processes redirect
stdout/stderr to bytes.Buffer instances and print their content at test
end as appropriate.
The stdout/stderr content for each process is printed if the test
failed, or if testing is being done in verbose mode. Otherwise the
output is swallowed.
This makes debugging test failures much easier as output from the
subprocesses from independent tests isn't intermingled.
Updates golang/go#74437
Cq-Include-Trybots: luci.golang.try:x_crypto-gotip-linux-amd64-longtest
Change-Id: Ia79a3609ce3522ef6248442de247554c39367162
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/686935
Auto-Submit: Daniel McCarney <daniel@binaryparadox.net >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Carlos Amedee <carlos@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-07-11 12:27:10 -07:00
Gopher Robot
459a9db11b
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: I3a89b1890ad2f7d2b2c23e1efce60c19e43dd381
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/687017
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
Reviewed-by: David Chase <drchase@google.com >
2025-07-10 10:21:43 -07:00
Nicola Murino
74e709ad8a
ssh: add AlgorithmNegotiationError
...
Fixes golang/go#61536
Change-Id: Id38cc6d46879dbe2bdea04dec061596387ec6cfe
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/559056
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: David Chase <drchase@google.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Carlos Amedee <carlos@golang.org >
2025-07-09 08:43:26 -07:00
Daniel McCarney
b3790b8d91
acme: fix TLSALPN01ChallengeCert for IP address identifiers
...
When creating a TLS-ALPN-01 challenge response certificate for an IP
address identifier we need to configure the template IPAddresses field,
not the DNSNames/Subject.CommonName.
Along the way we can do some small tidying:
* Updating the draft TLS-ALPN-01 reference to the finalized RFC
* Adding a reference to the IP address identifier ACME RFC
* Adding a mention of the form the challenge validation request's SNI
will take when verifying an IP address identifier
* Tidying the private tlsChallengeCert() function to take a single
identifier as arg since the only call-sites provide singular values
since the removal of the TLS-SNI-[01|02] challenge helpers.
This allows enabling an IP address identifier in the Pebble integration
tests that otherwise caused a validation failure for TLS-ALPN-01
challenge types because the IP address was used as a DNS SAN.
Updates golang/go#73914
Cq-Include-Trybots: luci.golang.try:x_crypto-gotip-linux-amd64-longtest
Change-Id: Ic671e41b585f424f821db65206c7ffcc6dd386a0
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/677576
Reviewed-by: Ian Stapleton Cordasco <graffatcolmingov@gmail.com >
Auto-Submit: Daniel McCarney <daniel@binaryparadox.net >
Reviewed-by: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2025-06-30 12:50:50 -07:00
Daniel McCarney
1dc4269656
acme: add Pebble integration testing
...
This commit adds integration test coverage for a complete TLS-ALPN-01
and HTTP-01 based issuance flow.
For each tested challenge type we:
* Spin up a pebble/pebble-challtestsrv environment
* Spin up a small challenge response server
* Create an ACME account
* Create an order for multiple DNS type identifiers
* Provision challenge responses based on the challenge type under test
* Wait for the order to become ready for issuance
* Finalize the order, issuing a certificate
* Check the newly issued certificate chain validates with the Pebble
trust anchor, and that the certificate is valid for each of the names
from our initial order
These tests are skipped in short mode (Pebble has variable delays for
validation requests).
The Pebble source is fetched through the Go module proxy (unless
a local directory is specified to aid development), similar to how the
stdlib crypto packages fetch BoGo tooling.
More test coverage for various other parts of the protocol (key
rollover, account/authz deactivation, revocation, etc) can be added as
follow-up work now that the groundwork for integration testing is laid.
Fixes golang/go#73914
Cq-Include-Trybots: luci.golang.try:x_crypto-gotip-linux-amd64-longtest
Change-Id: I4e79f4858f31ef290a0c91d345e15fbdc510e9ab
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/677575
Reviewed-by: Roland Shoemaker <roland@golang.org >
Auto-Submit: Daniel McCarney <daniel@binaryparadox.net >
Reviewed-by: Ian Stapleton Cordasco <graffatcolmingov@gmail.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-06-30 09:51:57 -07:00
qiulaidongfeng
97bf787255
blake2b: implement hash.XOF
...
Fixes golang/go#69518
Change-Id: Id9989ac9b28262df77017e97f985f67c1571c3ce
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/644255
Reviewed-by: Austin Clements <austin@google.com >
Auto-Submit: Austin Clements <austin@google.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-06-30 09:39:26 -07:00
Gopher Robot
952517d181
x509roots/fallback: update bundle
...
This is an automated CL which updates the NSS root bundle.
[git-generate]
go generate ./x509roots
Change-Id: Icb71f9f7c509dc6f49ad4385aa287bd6a8966523
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/681915
Auto-Submit: Gopher Robot <gobot@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2025-06-30 09:08:05 -07:00
Nicola Murino
c6fce02826
ssh: refuse to parse certificates that use a certificate as signing key
...
According to draft-miller-ssh-cert-01, Section 2.1.1, certificates with
certificate keys as signature keys are invalid
Change-Id: I474524ea444deb78f2fa7c2682e47c0fd057f0b8
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/678716
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: David Chase <drchase@google.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
2025-06-30 09:02:50 -07:00
Nicola Murino
0ae49b8145
ssh: reject certificate keys used as signature keys for SSH certs
...
As specified in draft-miller-ssh-cert-01, Section 2.1.1:
Implementations MUST NOT accept certificate keys as CA keys.
Change-Id: I2e559a8a58b7bceccd0d8c6b80803abdbe281067
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/678715
Reviewed-by: Filippo Valsorda <filippo@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: David Chase <drchase@google.com >
2025-06-30 09:02:45 -07:00
Nicola Murino
3bf9d2afd4
ssh/test: skip KEX test if unsupported by system SSH client
...
Skip the key exchange test when using the system's ssh CLI if the
required KEX algorithm (e.g., mlkem768x25519-sha256) is not supported.
This is determined by running ssh -Q kex and checking for the presence
of the target algorithm.
Prevents false test failures in CI environments with older or limited
SSH implementations.
Cq-Include-Trybots: luci.golang.try:x_crypto-gotip-darwin-amd64-longtest,x_crypto-gotip-linux-amd64-longtest,x_crypto-gotip-windows-amd64-longtest
Change-Id: I3fac703ec70559e18b30d5fff88274335a7c3952
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/679195
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Carlos Amedee <carlos@golang.org >
2025-06-05 10:42:09 -07:00
Gopher Robot
9bab96736c
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: Icbe0bf922207aefa5ee047a35dfb71843ec75306
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/679135
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: David Chase <drchase@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
2025-06-05 08:51:54 -07:00
Mateusz Poliwczak
4f9f0ca9fc
x509roots/fallback: add init time benchmark
...
goos: linux
goarch: amd64
pkg: golang.org/x/crypto/x509roots/fallback
cpu: AMD Ryzen 5 4600G with Radeon Graphics
│ /tmp/before │
│ sec/op │
InitTime-12 1.726m ± 0%
│ /tmp/before │
│ B/op │
InitTime-12 1.151Mi ± 0%
│ /tmp/before │
│ allocs/op │
InitTime-12 11.35k ± 0%
For golang/go#73691
Change-Id: Ic932bd7835e50dd5c6adbdf684644afa49bddebc
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/676216
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Sean Liao <sean@liao.dev >
Auto-Submit: Sean Liao <sean@liao.dev >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
2025-05-31 02:59:11 -07:00
Mateusz Poliwczak
eac7cf0d78
x509roots/fallback: move parsing code to a non-generated file
...
For golang/go#73691
Change-Id: I3e2b09055c39286d863fe70ca3bd72a839e25d0a
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/676215
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Sean Liao <sean@liao.dev >
Auto-Submit: Sean Liao <sean@liao.dev >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-05-31 02:59:06 -07:00
Daniel McCarney
18228cd6f1
acme: return err from deprecated TLS-SNI-[01|02] functions
...
The TLSSNI01ChallengeCert and TLSSNI02ChallengeCert functions have been
marked deprecated since 2022. The package documentation indicates
pre-RFC 8555 functionality is retained for compilation success, but will
return errors. This commit makes these two deprecated functions match
that description.
No meaningful support for these draft standard challenge types exists
in the ACME ecosystem, and they are insecure for use in shared hosting
environments.
Change-Id: I1c17980a0630092c70eb971b3453a0f115834be0
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/676835
Auto-Submit: Daniel McCarney <daniel@binaryparadox.net >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
2025-05-29 10:16:04 -07:00
Daniel McCarney
73f6362471
acme: remove dead code
...
The private encodePem() and unique() functions under the acme package
had no call-sites and so can be removed.
Change-Id: Ic617392e7cc9b9e795456626a623ba02df108694
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/676875
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Auto-Submit: Daniel McCarney <daniel@binaryparadox.net >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
2025-05-28 10:23:52 -07:00
Nicola Murino
ebc8e46315
ssh: add server side support for Diffie Hellman Group Exchange
...
We add this support for the following reasons:
- We are planning to expose recommended (secure) vs. supported (works,
not necessarily recommended) algorithms. The DHGEX kex is currently
only exposed as a client-side kex. To simplify the calling convention
for this follow-on, we expose the server side too.
- Some clients are quite inflexible with reference to kex algorithms
choice, for example they offer:
diffie-hellman-group-exchange-sha256, diffie-hellman-group-exchange-sha1,
diffie-hellman-group14-sha1, diffie-hellman-group1-sha1
therefore DHGEX helps interoperability.
We do not recommend the DHGEX kex as a whole:
- the negotiation requires an extra round trip
- the server must generate parameters (slow) or hardcode them, which
defeats the security benefit over traditional DH.
In this implementation we hardcode sending Oakley Group 14, Oakley
Group 15 or Oakley Group 16 based on the requested max size.
Users that are concerned with security of classical DH kex should
migrate to kex based on EC or Ed25519.
Fixes golang/go#54743
Change-Id: I127822e90efc36821af4aca679931f40a2023021
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/532415
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Han-Wen Nienhuys <hanwen@google.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-05-15 10:47:05 -07:00
Nicola Murino
e944286e33
ssh: expose negotiated algorithms
...
Fixes golang/go#58523
Fixes golang/go#46638
Change-Id: Ic64bd2fdd6e9ec96acac3ed4be842e2fbb15231d
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/538235
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-05-15 10:44:04 -07:00
Nicola Murino
78a1fd7893
ssh: automatically add curve25519-sha256@libssh.org KEX alias
...
If the key exchange method curve25519-sha256 is configured, automatically
add the curve25519-sha256@libssh.org alias to ensure compatibility with
OpenSSH versions up to 7.2, which recognize only the older vendor-specific
name.
Change-Id: If50ab2c49179db949ba1b986f7bb0e153cc7f897
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/669716
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: Carlos Amedee <carlos@golang.org >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-05-15 10:43:39 -07:00
Nicola Murino
ac58737d25
ssh: export supported algorithms
...
Fixes golang/go#61537
Change-Id: If3478121e3ae445391e3faeceeb889d75e9e3214
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/531935
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
2025-05-15 10:43:30 -07:00
redwrasse
9dbbcf002b
bcrypt: update InvalidCostError message to describe cost range inclusive
...
Change InvalidCostError string to explicitly state cost bounds
range as inclusive, rather than using parentheses that might
imply an exclusive range.
Change-Id: Ie5e7d53ef4217c8560e6a7fe23e3d65ecc24a2a3
GitHub-Last-Rev: b49002b6b2cff0939858553a28e3f255bde397b6
GitHub-Pull-Request: golang/crypto#300
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/609455
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
2025-05-12 11:46:18 -07:00
Gopher Robot
9f6bf8449a
x509roots/fallback: update bundle
...
This is an automated CL which updates the NSS root bundle.
[git-generate]
go generate ./x509roots
Change-Id: If1970af8da68ead595dc3fa7dd79a8555a5f09c5
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/668576
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
2025-05-12 08:41:11 -07:00
Gopher Robot
aae6e61070
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: I06b2bb01f1557af02a8bf172ee85973695506906
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/670095
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: David Chase <drchase@google.com >
2025-05-05 11:47:08 -07:00
Nicola Murino
9c1aa6af88
ssh/test: reset the random source before capturing a recording
...
If a recording file exists but is invalid for any reason, the random
source may have already been used, resulting in a recording that
cannot be replayed.
Change-Id: Ib81aaf163f5783fede2c14a0ac10a8d2af6019c6
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/664917
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Michael Pratt <mpratt@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
2025-04-18 04:19:36 -07:00
Nicola Murino
88199028d7
ssh/test: enable Diffie-Hellman key exchange algorithms
...
starting with OpenSSH 10, all Diffie-Hellman key exchange algorithms
are disabled by default. To generate recordings, we must explicitly
enable them.
Change-Id: Icfbf46b30478f36d7040991e0f6324b9b4766aaf
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/665115
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Michael Pratt <mpratt@google.com >
2025-04-18 04:18:34 -07:00
Ian Stapleton Cordasco
3f311e442e
acme: return error from pre-authorization when unsupported
...
Check the directory's AuthzURL to see if the server supports
pre-authorization. If it's empty, then the server is not advertising
support and we can encounter other bugs. Better to return early and give
a clear error to the caller.
From https://www.rfc-editor.org/rfc/rfc8555#section-7.4.1
If a CA wishes to allow pre-authorization within ACME, it can offer a
"new authorization" resource in its directory by adding the field
"newAuthz" with a URL for the newAuthz resource.
Fixes golang/go#40839
Change-Id: Id3e92e8e2ae3c57285183d37544dd59b4988b3be
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/661675
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org >
Reviewed-by: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
2025-04-17 11:16:57 -07:00
Nicola Murino
1f7c62cd66
ssh/test: skip unsupported tests on js/wasm
...
This fixes the build on the js/wasm builder.
Change-Id: Icd891cd38b9da07279b9afaa168f7c64c81e13fe
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/665095
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2025-04-16 08:28:17 -07:00
Alberto Bertogli
a5f804889e
acme/autocert: use standard functions to pick the cache directory
...
acme/autocert currently has ad-hoc logic to find a reasonable default
for a cache directory.
Since that logic was written (in 2017), new functions were added to the
os package to provide that functionality (in Go 1.13, 2019-09):
`os.UserCacheDir` and `os.UserHomeDir`.
This patch replaces the ad-hoc logic with a call to `os.UserCacheDir`.
The fallback to `/` is kept, since it may be relied upon in some
environments.
Change-Id: I3bf692ca670b87bf3d329e5d3684eee15ed374aa
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/440195
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Auto-Submit: Sean Liao <sean@liao.dev >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Sean Liao <sean@liao.dev >
2025-04-16 08:16:13 -07:00
Michael Pratt
958cde86ef
Revert "chacha20: add loong64 SIMD implementation"
...
This reverts CL 636257.
Reason for revert: Does not build on 1.23 or 1.24
For golang/go#73354 .
Change-Id: Ie28d5c45930a8eacd5cabed64390ef674b3fb446
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/665536
Reviewed-by: abner chenc <chenguoqi@loongson.cn >
Auto-Submit: Michael Pratt <mpratt@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-04-16 06:50:31 -07:00
Michael Pratt
51f005cfd4
Revert "salsa20: add loong64 SIMD implementation"
...
This reverts CL 663375.
Reason for revert: Does not build on 1.23 or 1.24
For golang/go#73354 .
Change-Id: I251d598423b83c01cc2e04ddf6f49ae14095fa7c
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/665535
Auto-Submit: Michael Pratt <mpratt@google.com >
Reviewed-by: abner chenc <chenguoqi@loongson.cn >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-04-16 06:50:29 -07:00
Michael Pratt
7c358664da
Revert "argon2: add loong64 SIMD implementation"
...
This reverts CL 657795.
Reason for revert: Does not build on 1.23 or 1.24
For golang/go#73354 .
Change-Id: I69498f24b57bd6650c9d1f4c755922cfaaba4a84
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/665555
Reviewed-by: abner chenc <chenguoqi@loongson.cn >
Auto-Submit: Michael Pratt <mpratt@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2025-04-16 06:49:50 -07:00
Michael Pratt
0091fc8e7c
Revert "blake2s: add loong64 SIMD implementation"
...
This reverts CL 661215.
Reason for revert: Does not build on 1.23 or 1.24
Fixes #73354 .
Change-Id: I90abd8a3dabf5c0d9fd1062de3ba3e78ecb2f2e8
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/664796
Reviewed-by: Carlos Amedee <carlos@golang.org >
Auto-Submit: Michael Pratt <mpratt@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-04-14 04:06:44 -07:00
Xiaolin Zhao
388684e50b
argon2: add loong64 SIMD implementation
...
The performance gains on Loongson 3A6000 and 3A5000 are as follows:
goos: linux
goarch: loong64
pkg: golang.org/x/crypto/argon2
cpu: Loongson-3A6000-HV @ 2500.00MHz
| bench.old | bench.new |
| sec/op | sec/op vs base |
Argon2i/_Time:_3_Memory:_32_MB,_Threads:_1 131.23m ± 0% 67.56m ± 1% -48.52% (p=0.000 n=10)
Argon2i/_Time:_4_Memory:_32_MB,_Threads:_1 171.28m ± 2% 90.20m ± 0% -47.34% (p=0.000 n=10)
Argon2i/_Time:_5_Memory:_32_MB,_Threads:_1 213.3m ± 0% 112.6m ± 0% -47.21% (p=0.000 n=10)
Argon2i/_Time:_3_Memory:_64_MB,_Threads:_4 269.5m ± 0% 147.2m ± 0% -45.37% (p=0.000 n=10)
Argon2i/_Time:_4_Memory:_64_MB,_Threads:_4 357.7m ± 0% 195.4m ± 0% -45.36% (p=0.000 n=10)
Argon2i/_Time:_5_Memory:_64_MB,_Threads:_4 449.8m ± 0% 243.8m ± 0% -45.79% (p=0.000 n=10)
Argon2d/_Time:_3,_Memory:_32_MB,_Threads:_1 126.56m ± 0% 67.43m ± 0% -46.72% (p=0.000 n=10)
Argon2d/_Time:_4,_Memory:_32_MB,_Threads:_1 168.57m ± 0% 90.04m ± 0% -46.58% (p=0.000 n=10)
Argon2d/_Time:_5,_Memory:_32_MB,_Threads:_1 210.5m ± 0% 112.7m ± 0% -46.45% (p=0.000 n=10)
Argon2d/_Time:_3,_Memory:_64_MB,_Threads:_4 264.8m ± 0% 145.0m ± 1% -45.23% (p=0.000 n=10)
Argon2d/_Time:_4,_Memory:_64_MB,_Threads:_4 353.8m ± 0% 193.7m ± 0% -45.26% (p=0.000 n=10)
Argon2d/_Time:_5,_Memory:_64_MB,_Threads:_4 444.4m ± 0% 242.3m ± 0% -45.49% (p=0.000 n=10)
Argon2id/_Time:_3,_Memory:_32_MB,_Threads:_1 126.89m ± 0% 66.62m ± 0% -47.50% (p=0.000 n=10)
Argon2id/_Time:_4,_Memory:_32_MB,_Threads:_1 169.02m ± 0% 89.07m ± 0% -47.30% (p=0.000 n=10)
Argon2id/_Time:_5,_Memory:_32_MB,_Threads:_1 210.7m ± 0% 111.0m ± 0% -47.34% (p=0.000 n=10)
Argon2id/_Time:_3,_Memory:_64_MB,_Threads:_4 267.6m ± 1% 145.8m ± 0% -45.51% (p=0.000 n=10)
Argon2id/_Time:_4,_Memory:_64_MB,_Threads:_4 355.1m ± 0% 194.1m ± 0% -45.34% (p=0.000 n=10)
Argon2id/_Time:_5,_Memory:_64_MB,_Threads:_4 443.6m ± 0% 242.5m ± 0% -45.33% (p=0.000 n=10)
geomean 240.8m 129.3m -46.32%
goos: linux
goarch: loong64
pkg: golang.org/x/crypto/argon2
cpu: Loongson-3A5000 @ 2500.00MHz
| bench.old | bench.new |
| sec/op | sec/op vs base |
Argon2i/_Time:_3_Memory:_32_MB,_Threads:_1 209.9m ± 1% 109.7m ± 2% -47.75% (p=0.000 n=10)
Argon2i/_Time:_4_Memory:_32_MB,_Threads:_1 278.1m ± 0% 143.7m ± 0% -48.34% (p=0.000 n=10)
Argon2i/_Time:_5_Memory:_32_MB,_Threads:_1 346.7m ± 0% 178.1m ± 0% -48.63% (p=0.000 n=10)
Argon2i/_Time:_3_Memory:_64_MB,_Threads:_4 455.3m ± 0% 240.8m ± 0% -47.12% (p=0.000 n=10)
Argon2i/_Time:_4_Memory:_64_MB,_Threads:_4 604.6m ± 0% 317.7m ± 0% -47.45% (p=0.000 n=10)
Argon2i/_Time:_5_Memory:_64_MB,_Threads:_4 754.8m ± 0% 395.4m ± 0% -47.61% (p=0.000 n=10)
Argon2d/_Time:_3,_Memory:_32_MB,_Threads:_1 206.9m ± 1% 107.6m ± 0% -48.00% (p=0.000 n=10)
Argon2d/_Time:_4,_Memory:_32_MB,_Threads:_1 274.3m ± 0% 141.8m ± 1% -48.32% (p=0.000 n=10)
Argon2d/_Time:_5,_Memory:_32_MB,_Threads:_1 342.4m ± 0% 175.6m ± 0% -48.71% (p=0.000 n=10)
Argon2d/_Time:_3,_Memory:_64_MB,_Threads:_4 450.2m ± 0% 237.9m ± 0% -47.15% (p=0.000 n=10)
Argon2d/_Time:_4,_Memory:_64_MB,_Threads:_4 597.7m ± 0% 314.0m ± 0% -47.46% (p=0.000 n=10)
Argon2d/_Time:_5,_Memory:_64_MB,_Threads:_4 745.8m ± 0% 390.7m ± 1% -47.61% (p=0.000 n=10)
Argon2id/_Time:_3,_Memory:_32_MB,_Threads:_1 207.6m ± 0% 107.9m ± 0% -48.05% (p=0.000 n=10)
Argon2id/_Time:_4,_Memory:_32_MB,_Threads:_1 275.0m ± 0% 142.0m ± 0% -48.34% (p=0.000 n=10)
Argon2id/_Time:_5,_Memory:_32_MB,_Threads:_1 342.9m ± 1% 176.0m ± 0% -48.66% (p=0.000 n=10)
Argon2id/_Time:_3,_Memory:_64_MB,_Threads:_4 450.6m ± 1% 238.5m ± 0% -47.07% (p=0.000 n=10)
Argon2id/_Time:_4,_Memory:_64_MB,_Threads:_4 598.5m ± 1% 314.6m ± 0% -47.44% (p=0.000 n=10)
Argon2id/_Time:_5,_Memory:_64_MB,_Threads:_4 746.4m ± 0% 391.0m ± 0% -47.61% (p=0.000 n=10)
geomean 398.6m 207.9m -47.86%
Change-Id: Iaa9d134d68dd2f0972fc5768d7e66f7b1ff0ebd3
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/657795
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: abner chenc <chenguoqi@loongson.cn >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Carlos Amedee <carlos@golang.org >
2025-04-13 20:23:35 -07:00
Xiaolin Zhao
953e809589
chacha20: add loong64 SIMD implementation
...
The performance of chacha20 has been greatly improved on 3A6000 and 3A5000.
goos: linux
goarch: loong64
pkg: golang.org/x/crypto/chacha20
cpu: Loongson-3A6000 @ 2500.00MHz
| bench.old | bench.new |
| sec/op | sec/op vs base |
ChaCha20/64 171.9n ± 0% 159.3n ± 0% -7.33% (p=0.000 n=20)
ChaCha20/256 592.2n ± 0% 142.8n ± 0% -75.89% (p=0.000 n=20)
ChaCha20/10x25 981.5n ± 0% 518.8n ± 0% -47.14% (p=0.000 n=20)
ChaCha20/4096 8.991µ ± 0% 1.732µ ± 0% -80.74% (p=0.000 n=20)
ChaCha20/100x40 10.651µ ± 0% 5.135µ ± 0% -51.79% (p=0.000 n=20)
ChaCha20/65536 143.43µ ± 0% 28.76µ ± 0% -79.95% (p=0.000 n=20)
ChaCha20/1000x65 146.17µ ± 0% 37.13µ ± 0% -74.60% (p=0.000 n=20)
geomean 5.721µ 1.962µ -65.70%
| bench.old | bench.new |
| B/s | B/s vs base |
ChaCha20/64 355.1Mi ± 0% 383.1Mi ± 0% +7.89% (p=0.000 n=20)
ChaCha20/256 412.2Mi ± 0% 1710.2Mi ± 0% +314.86% (p=0.000 n=20)
ChaCha20/10x25 242.9Mi ± 0% 459.6Mi ± 0% +89.19% (p=0.000 n=20)
ChaCha20/4096 434.5Mi ± 0% 2255.8Mi ± 0% +419.22% (p=0.000 n=20)
ChaCha20/100x40 358.1Mi ± 0% 742.9Mi ± 0% +107.44% (p=0.000 n=20)
ChaCha20/65536 435.8Mi ± 0% 2173.2Mi ± 0% +398.72% (p=0.000 n=20)
ChaCha20/1000x65 424.1Mi ± 0% 1669.4Mi ± 0% +293.64% (p=0.000 n=20)
geomean 373.9Mi 1.065Gi +191.55%
goos: linux
goarch: loong64
pkg: golang.org/x/crypto/chacha20
cpu: Loongson-3A5000 @ 2500.00MHz
| bench.old | bench.new |
| sec/op | sec/op vs base |
ChaCha20/64 234.5n ± 0% 295.8n ± 0% +26.14% (p=0.000 n=20)
ChaCha20/256 782.0n ± 0% 274.6n ± 0% -64.88% (p=0.000 n=20)
ChaCha20/10x25 1340.0n ± 0% 752.7n ± 0% -43.83% (p=0.000 n=20)
ChaCha20/4096 11.744µ ± 0% 3.455µ ± 0% -70.58% (p=0.000 n=20)
ChaCha20/100x40 14.151µ ± 0% 7.435µ ± 0% -47.46% (p=0.000 n=20)
ChaCha20/65536 188.05µ ± 0% 54.33µ ± 0% -71.11% (p=0.000 n=20)
ChaCha20/1000x65 191.44µ ± 0% 66.29µ ± 0% -65.37% (p=0.000 n=20)
geomean 7.604µ 3.436µ -54.81%
| bench.old | bench.new |
| B/s | B/s vs base |
ChaCha20/64 260.3Mi ± 0% 206.3Mi ± 0% -20.73% (p=0.000 n=20)
ChaCha20/256 312.2Mi ± 0% 888.9Mi ± 0% +184.75% (p=0.000 n=20)
ChaCha20/10x25 177.9Mi ± 0% 316.8Mi ± 0% +78.08% (p=0.000 n=20)
ChaCha20/4096 332.6Mi ± 0% 1130.8Mi ± 0% +239.95% (p=0.000 n=20)
ChaCha20/100x40 269.6Mi ± 0% 513.1Mi ± 0% +90.34% (p=0.000 n=20)
ChaCha20/65536 332.4Mi ± 0% 1150.5Mi ± 0% +246.16% (p=0.000 n=20)
ChaCha20/1000x65 323.8Mi ± 0% 935.2Mi ± 0% +188.81% (p=0.000 n=20)
geomean 281.3Mi 622.6Mi +121.31%
Change-Id: I5386f2029122076c1d22a04610567e3df23877cd
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/636257
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: abner chenc <chenguoqi@loongson.cn >
Reviewed-by: Carlos Amedee <carlos@golang.org >
2025-04-13 20:23:16 -07:00
Xiaolin Zhao
18f770732f
salsa20: add loong64 SIMD implementation
...
The performance gains on Loongson 3A6000 and 3A5000 are as follows:
goos: linux
goarch: loong64
pkg: golang.org/x/crypto/salsa20
cpu: Loongson-3A6000-HV @ 2500.00MHz
| bench.old | bench.new |
| sec/op | sec/op vs base |
XOR1K 3175.0n ± 0% 435.4n ± 0% -86.29% (p=0.000 n=20)
| bench.old | bench.new |
| B/s | B/s vs base |
XOR1K 307.6Mi ± 0% 2242.7Mi ± 0% +629.13% (p=0.000 n=20)
goos: linux
goarch: loong64
pkg: golang.org/x/crypto/salsa20
cpu: Loongson-3A5000 @ 2500.00MHz
| bench.old | bench.new |
| sec/op | sec/op vs base |
XOR1K 4125.0n ± 0% 864.0n ± 0% -79.05% (p=0.000 n=20)
| bench.old | bench.new |
| B/s | B/s vs base |
XOR1K 236.7Mi ± 0% 1130.3Mi ± 0% +377.41% (p=0.000 n=20)
Change-Id: Ib37f603e6654f1e3837985fad4b6dee10b5af993
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/663375
Reviewed-by: Carlos Amedee <carlos@golang.org >
Reviewed-by: abner chenc <chenguoqi@loongson.cn >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Carlos Amedee <carlos@golang.org >
2025-04-11 13:55:20 -07:00
Xiaolin Zhao
2ebaafcdf5
blake2s: add loong64 SIMD implementation
...
The performance gains on Loongson 3A6000 and 3A5000 are as follows:
goos: linux
goarch: loong64
pkg: golang.org/x/crypto/blake2s
cpu: Loongson-3A6000-HV @ 2500.00MHz
| bench.old | bench.new |
| sec/op | sec/op vs base |
Write64 277.8n ± 0% 113.5n ± 0% -59.14% (p=0.000 n=10)
Write1K 4.246µ ± 0% 1.736µ ± 0% -59.11% (p=0.000 n=10)
Sum64 289.9n ± 0% 137.7n ± 0% -52.51% (p=0.000 n=10)
Sum1K 4.265µ ± 0% 1.758µ ± 0% -58.78% (p=0.000 n=10)
geomean 1.099µ 467.3n -57.48%
| bench.old | bench.new |
| B/s | B/s vs base |
Write64 219.7Mi ± 0% 537.9Mi ± 0% +144.86% (p=0.000 n=10)
Write1K 230.0Mi ± 0% 562.6Mi ± 0% +144.62% (p=0.000 n=10)
Sum64 210.5Mi ± 0% 443.3Mi ± 0% +110.59% (p=0.000 n=10)
Sum1K 229.0Mi ± 0% 555.5Mi ± 0% +142.64% (p=0.000 n=10)
geomean 222.1Mi 522.5Mi +135.21%
goos: linux
goarch: loong64
pkg: golang.org/x/crypto/blake2s
cpu: Loongson-3A5000 @ 2500.00MHz
| bench.old | bench.new |
| sec/op | sec/op vs base |
Write64 373.8n ± 0% 175.0n ± 0% -53.18% (p=0.000 n=10)
Write1K 5.763µ ± 0% 2.595µ ± 0% -54.97% (p=0.000 n=10)
Sum64 397.8n ± 0% 205.7n ± 0% -48.29% (p=0.000 n=10)
Sum1K 5.787µ ± 0% 2.627µ ± 0% -54.61% (p=0.000 n=10)
geomean 1.492µ 703.8n -52.83%
| bench.old | bench.new |
| B/s | B/s vs base |
Write64 163.3Mi ± 0% 348.9Mi ± 0% +113.62% (p=0.000 n=10)
Write1K 169.5Mi ± 0% 376.3Mi ± 0% +122.09% (p=0.000 n=10)
Sum64 153.4Mi ± 0% 296.7Mi ± 0% +93.37% (p=0.000 n=10)
Sum1K 168.7Mi ± 0% 371.8Mi ± 0% +120.33% (p=0.000 n=10)
geomean 163.6Mi 346.9Mi +112.03%
Change-Id: Id91ffbefc538bce294875d72e6cde72fea43afbf
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/661215
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Carlos Amedee <carlos@golang.org >
Auto-Submit: Carlos Amedee <carlos@golang.org >
Reviewed-by: abner chenc <chenguoqi@loongson.cn >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-04-11 13:55:16 -07:00
cuishuang
4bc0711281
acme: use built-in max/min to simplify the code
...
Change-Id: I6ba8d07b9e53b01f25f4c1c8eac629aaa47de3a1
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/664836
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2025-04-11 09:06:14 -07:00
Nicola Murino and Damien Miller
c96bba2ced
ssh: add mlkem768x25519-sha256 Key Exchange algorithm
...
mlkem768x25519-sha256 requires the crypto/mlkem package introduced in
Go 1.24.
Thanks to Damien Miller for posting an early version to the OpenSSH
mailing list.
Co-authored-by: Damien Miller <djm@mindrot.org >
Change-Id: I4235cf906903524a9a97283834cc8f43b5f76f91
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/646075
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Carlos Amedee <carlos@golang.org >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-04-11 07:39:49 -07:00
Nicola Murino
6b13eef40b
ssh: add integration tests against a reference implementation
...
As in crypto/tls, we record the connection against a reference
implementation, OpenSSH in our case, and run part of our integration
tests by replaying these recorded SSH connections.
Change-Id: If042b5f650b267bd3ede34a05ec3a6fa6d1a86b3
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/644436
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Carlos Amedee <carlos@golang.org >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net >
2025-04-11 07:29:06 -07:00
Gopher Robot
959f8f3db0
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: I1e9480e5897a08cac746309acdc8bbdf0bce8060
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/663256
Reviewed-by: David Chase <drchase@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-04-06 09:04:20 -07:00
Nicola Murino
769bcd6997
ssh: use the configured rand in kex init
...
Change-Id: I4f89c395886b9dd07b584d1fcf1a0f2df215b91b
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/644435
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Carlos Amedee <carlos@golang.org >
Reviewed-by: Carlos Amedee <carlos@golang.org >
2025-04-03 13:05:29 -07:00
Simon Josefsson
d0a798f774
cryptobyte: fix typo 'octects' into 'octets' for asn1.go
...
This typo ends up into lots of executables that trigger 'codespell'-style linter checks.
Change-Id: I2a7e3a6597272ca7c97ebddc54c5eef4cb5cab88
GitHub-Last-Rev: e42f734f00aa575030b72dd1e328d2acefb02625
GitHub-Pull-Request: golang/crypto#310
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/646375
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2025-03-17 08:22:34 -07:00
Mateusz Poliwczak
acbcbef23f
acme: remove unnecessary []byte conversion
...
Change-Id: Iddbe6bcb7a5487678c48df65903571b4625fc9f9
GitHub-Last-Rev: 2552a8d99c7472f029d7da270fa814398793b564
GitHub-Pull-Request: golang/crypto#243
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/456438
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Sean Liao <sean@liao.dev >
Auto-Submit: Sean Liao <sean@liao.dev >
2025-03-17 08:22:03 -07:00
Roland Shoemaker
376eb14006
x509roots: support constrained roots
...
Adds support for roots with the distrust-after bit set. The constraint
function construction is a little funky, but I couldn't think of an
obvious better way to do it.
Fixes golang/go#70777
Fixes golang/go#70623
Change-Id: I780f866416b626360eaee9368185768da7bc75ef
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/652996
Reviewed-by: David Chase <drchase@google.com >
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-03-13 16:44:06 -07:00
Xiaolin Zhao
b369b723c8
crypto/internal/poly1305: implement function update in assembly on loong64
...
The performance improvements on Loongson-3A5000 and Loongson-3A6000 are as follows:
goos: linux
goarch: loong64
pkg: golang.org/x/crypto/internal/poly1305
cpu: Loongson-3A5000 @ 2500.00MHz
| bench.old | bench.new |
| sec/op | sec/op vs base |
64 122.8n ± 0% 100.0n ± 0% -18.57% (p=0.000 n=10)
1K 1152.0n ± 0% 732.2n ± 0% -36.44% (p=0.000 n=10)
2M 2.356m ± 0% 1.443m ± 0% -38.74% (p=0.000 n=10)
64Unaligned 122.7n ± 0% 101.5n ± 0% -17.24% (p=0.000 n=10)
1KUnaligned 1152.0n ± 0% 745.4n ± 0% -35.30% (p=0.000 n=10)
2MUnaligned 2.336m ± 0% 1.473m ± 0% -36.94% (p=0.000 n=10)
Write64 77.92n ± 0% 54.88n ± 0% -29.57% (p=0.000 n=10)
Write1K 1106.0n ± 0% 683.3n ± 0% -38.22% (p=0.000 n=10)
Write2M 2.356m ± 0% 1.444m ± 0% -38.72% (p=0.000 n=10)
Write64Unaligned 77.87n ± 0% 55.69n ± 0% -28.49% (p=0.000 n=10)
Write1KUnaligned 1106.0n ± 0% 708.1n ± 0% -35.97% (p=0.000 n=10)
Write2MUnaligned 2.335m ± 0% 1.471m ± 0% -37.01% (p=0.000 n=10)
geomean 6.373µ 4.272µ -32.96%
| bench.old | bench.new |
| B/s | B/s vs base |
64 497.1Mi ± 0% 610.3Mi ± 0% +22.78% (p=0.000 n=10)
1K 847.6Mi ± 0% 1333.7Mi ± 0% +57.35% (p=0.000 n=10)
2M 849.0Mi ± 0% 1385.9Mi ± 0% +63.24% (p=0.000 n=10)
64Unaligned 497.4Mi ± 0% 600.9Mi ± 0% +20.81% (p=0.000 n=10)
1KUnaligned 847.6Mi ± 0% 1310.1Mi ± 0% +54.57% (p=0.000 n=10)
2MUnaligned 856.3Mi ± 0% 1357.9Mi ± 0% +58.58% (p=0.000 n=10)
Write64 783.3Mi ± 0% 1112.2Mi ± 0% +41.99% (p=0.000 n=10)
Write1K 882.8Mi ± 0% 1429.1Mi ± 0% +61.88% (p=0.000 n=10)
Write2M 849.0Mi ± 0% 1385.4Mi ± 0% +63.18% (p=0.000 n=10)
Write64Unaligned 783.8Mi ± 0% 1096.1Mi ± 0% +39.85% (p=0.000 n=10)
Write1KUnaligned 882.8Mi ± 0% 1379.0Mi ± 0% +56.20% (p=0.000 n=10)
Write2MUnaligned 856.5Mi ± 0% 1359.9Mi ± 0% +58.76% (p=0.000 n=10)
geomean 772.2Mi 1.125Gi +49.18%
goos: linux
goarch: loong64
pkg: golang.org/x/crypto/internal/poly1305
cpu: Loongson-3A6000-HV @ 2500.00MHz
| bench.old | bench.new |
| sec/op | sec/op vs base |
64 92.06n ± 0% 71.55n ± 0% -22.28% (p=0.000 n=10)
1K 998.4n ± 0% 607.7n ± 0% -39.13% (p=0.000 n=10)
2M 1.976m ± 0% 1.165m ± 0% -41.07% (p=0.000 n=10)
64Unaligned 92.05n ± 0% 71.55n ± 0% -22.27% (p=0.000 n=10)
1KUnaligned 998.3n ± 0% 607.6n ± 0% -39.13% (p=0.000 n=10)
2MUnaligned 1.975m ± 0% 1.222m ± 0% -38.11% (p=0.000 n=10)
Write64 65.24n ± 0% 45.23n ± 0% -30.67% (p=0.000 n=10)
Write1K 970.8n ± 0% 577.6n ± 0% -40.51% (p=0.000 n=10)
Write2M 1.965m ± 0% 1.163m ± 0% -40.81% (p=0.000 n=10)
Write64Unaligned 65.24n ± 0% 45.24n ± 0% -30.66% (p=0.000 n=10)
Write1KUnaligned 970.8n ± 0% 577.6n ± 0% -40.50% (p=0.000 n=10)
Write2MUnaligned 1.965m ± 0% 1.222m ± 0% -37.81% (p=0.000 n=10)
geomean 5.317µ 3.426µ -35.58%
| bench.old | bench.new |
| B/s | B/s vs base |
64 663.0Mi ± 0% 853.1Mi ± 0% +28.67% (p=0.000 n=10)
1K 978.1Mi ± 0% 1606.9Mi ± 0% +64.28% (p=0.000 n=10)
2M 1012.0Mi ± 0% 1717.4Mi ± 0% +69.70% (p=0.000 n=10)
64Unaligned 663.1Mi ± 0% 853.1Mi ± 0% +28.65% (p=0.000 n=10)
1KUnaligned 978.2Mi ± 0% 1607.1Mi ± 0% +64.29% (p=0.000 n=10)
2MUnaligned 1012.6Mi ± 0% 1636.2Mi ± 0% +61.58% (p=0.000 n=10)
Write64 935.5Mi ± 0% 1349.3Mi ± 0% +44.23% (p=0.000 n=10)
Write1K 1005.9Mi ± 0% 1690.9Mi ± 0% +68.09% (p=0.000 n=10)
Write2M 1017.7Mi ± 0% 1719.5Mi ± 0% +68.95% (p=0.000 n=10)
Write64Unaligned 935.6Mi ± 0% 1349.3Mi ± 0% +44.22% (p=0.000 n=10)
Write1KUnaligned 1006.0Mi ± 0% 1690.9Mi ± 0% +68.08% (p=0.000 n=10)
Write2MUnaligned 1017.7Mi ± 0% 1636.4Mi ± 0% +60.80% (p=0.000 n=10)
geomean 925.6Mi 1.403Gi +55.22%
Change-Id: If05a8bfc868b3e6f903ff169eed7a894af741f9b
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/638455
Reviewed-by: David Chase <drchase@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Junyang Shao <shaojunyang@google.com >
Reviewed-by: abner chenc <chenguoqi@loongson.cn >
2025-03-11 17:59:26 -07:00
Carlos A Becker
6b853fbea3
ssh/knownhosts: check more than one key
...
I believe this fixes https://github.com/golang/go/issues/36126 .
The problem was that it was keeping only the first known key of each
type found.
If you have a server advertising multiple keys of the same type,
you might get a missmatch key error.
Per sshd(8) man page, it should allow reapeatable hosts with
different host keys, although it don't specify anything about
hosts being from different types:
"It is permissible (but not recommended) to have several lines or
different host keys for the same names. This will inevitably happen when
short forms of host names from different domains are put in the file. It
is possible that the files contain conflicting information;
authentication is accepted if valid information can be found from either
file."
So, this changes knownhosts behavior to accept any of the keys for a
given host, regardless of type.
Fixes #36126
Change-Id: I3450ff954259a403f2471082d013a5f79def0e16
GitHub-Last-Rev: 361bd2bcd20348956aaf114ef159a5350397eaf4
GitHub-Pull-Request: golang/crypto#254
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/478535
Reviewed-by: Junyang Shao <shaojunyang@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Michael Pratt <mpratt@google.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
2025-03-06 10:51:46 -08:00
Gopher Robot
49bf5b80c8
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: Ieae7a2d210a65d5cd2cb7e2670d283176922c767
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/655018
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: David Chase <drchase@google.com >
2025-03-05 09:04:21 -08:00
Ilia Mirkin
24852b6b3f
ssh: add decode support for banners
...
These banners can be printed when enabling debugHandshake, add decode
support so that they're not printed as unknown messages.
Change-Id: Ic8d56079d8225c35aac843accdbc80a642dd6249
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/650635
Reviewed-by: Junyang Shao <shaojunyang@google.com >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2025-03-03 11:16:37 -08:00
cuishuang
bbc689cf5c
ssh: use a more straightforward return value
...
Change-Id: Ie5ee95efe4924f75719087c6fe8d4867607934bf
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/653198
Reviewed-by: Ian Lance Taylor <iant@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Michael Pratt <mpratt@google.com >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
2025-02-28 12:03:19 -08:00
Nicola Murino
7292932d45
ssh: limit the size of the internal packet queue while waiting for KEX
...
In the SSH protocol, clients and servers execute the key exchange to
generate one-time session keys used for encryption and authentication.
The key exchange is performed initially after the connection is
established and then periodically after a configurable amount of data.
While a key exchange is in progress, we add the received packets to an
internal queue until we receive SSH_MSG_KEXINIT from the other side.
This can result in high memory usage if the other party is slow to
respond to the SSH_MSG_KEXINIT packet, or memory exhaustion if a
malicious client never responds to an SSH_MSG_KEXINIT packet during a
large file transfer.
We now limit the internal queue to 64 packets: this means 2MB with the
typical 32KB packet size.
When the internal queue is full we block further writes until the
pending key exchange is completed or there is a read or write error.
Thanks to Yuichi Watanabe for reporting this issue.
Change-Id: I1ce2214cc16e08b838d4bc346c74c72addafaeec
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/652135
Reviewed-by: Neal Patel <nealpatel@google.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-02-24 09:39:25 -08:00
Roland Shoemaker
f66f74b0a4
acme/autocert: check host policy before probing the cache
...
Avoid unnessecary cache probes for names that don't match the host
policy.
Fixes golang/go#71199
Change-Id: I11e8465b0416e960a549b0c0d74a622026c39931
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/651296
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2025-02-21 16:31:38 -08:00
Dmitri Shuralyov
b0784b7bfb
x509roots/fallback: drop obsolete build constraint
...
Back when Go 1.20 and 1.19 were supported, the go1.20 build constraint
was there to establish 1.20 as the minimum for the package, because it
requires an API that was added only in Go 1.20 and there was no way to
make it work with 1.19's APIs.
By now only Go 1.24 and 1.23 are supported, and the minimum is set via
the go directive in go.mod.
For golang/go#57792 .
Change-Id: Ie4d37d34993374cdd380667930ee667af97eeccb
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/649716
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org >
Reviewed-by: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-02-21 09:26:01 -08:00
Roland Shoemaker
911360c8a4
all: bump golang.org/x/crypto dependencies of asm generators
...
Change-Id: Ieb2f0d45f82647978f0bd1eb47bb347f0bfb7d13
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/649499
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-02-14 15:32:41 -08:00
Gopher Robot
89ff08d67c
all: upgrade go directive to at least 1.23.0 [generated]
...
By now Go 1.24.0 has been released, and Go 1.22 is no longer supported
per the Go Release Policy (https://go.dev/doc/devel/release#policy ).
For golang/go#69095 .
[git-generate]
(cd . && go get go@1.23 .0 && go mod tidy && go fix ./... && go mod edit -toolchain=none)
(cd x509roots/fallback && go get go@1.23 .0 && go mod tidy && go fix ./... && go mod edit -toolchain=none)
Change-Id: I879bced994b310927c41f820ec272a518aa0c8a5
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/649715
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Cherry Mui <cherryyz@google.com >
2025-02-14 12:15:19 -08:00
Sean Liao
e47973b1c1
all: update certs for go1.24
...
Fixes golang/go#71612
Change-Id: I5cb0596b33cb18016eb1883d1518319588ae1454
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/647975
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
2025-02-10 08:33:42 -08:00
Gopher Robot
9290511cd2
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: Ib9440df43bc2fde0268cbe327c1df839e793f675
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/646220
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: David Chase <drchase@google.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2025-02-04 11:03:03 -08:00
Gopher Robot
fa5273e461
x509roots/fallback: update bundle
...
This is an automated CL which updates the NSS root bundle.
Change-Id: I3a4388574221a77486b184e73f4b776ff0afc09f
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/646215
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2025-02-03 08:51:27 -08:00
Brad Fitzpatrick
a8ea4be81f
ssh: add ServerConfig.PreAuthConnCallback, ServerPreAuthConn (banner) interface
...
Fixes golang/go#68688
Change-Id: Id5f72b32c61c9383a26ec182339486a432c7cdf5
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/613856
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Jonathan Amsterdam <jba@google.com >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2025-01-18 11:27:23 -08:00
Evgeny Shatokhin
71d3a4cfdb
acme: support challenges that require the ACME client to send a non-empty JSON body in a response to the challenge.
...
A new extension to the ACME protocol is proposed to support device attestation: https://datatracker.ietf.org/doc/draft-acme-device-attest/
Based on the recent IETF meetings, the proposal is likely to be accepted.
To support the new extension, the ACME client will need to send a non-empty JSON body in the response to a "device-attest-01" challenge.
Fixes golang/go#68674
Change-Id: I29b420ec837f682e3d59071a4a82af56dc319134
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/608975
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Roland Shoemaker <roland@golang.org >
2025-01-16 08:17:40 -08:00
Gopher Robot
8929309228
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: I86bc4657bf10e469231536cff39cbdb86c1135c7
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/640455
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: David Chase <drchase@google.com >
2025-01-06 06:44:30 -08:00
cuishuang
4a75ba54c2
all: make function and struct comments match the names
...
Change-Id: Iba9c1fc2895adca0d3455f8068b040d0ca006408
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/639575
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Auto-Submit: Ian Lance Taylor <iant@google.com >
2025-01-02 08:15:46 -08:00
Roland Shoemaker
b4f1988a35
ssh: make the public key cache a 1-entry FIFO cache
...
Users of the the ssh package seem to extremely commonly misuse the
PublicKeyCallback API, assuming that the key passed in the last call
before a connection is established is the key used for authentication.
Some users then make authorization decisions based on this key. This
property is not documented, and may not be correct, due to the caching
behavior of the package, resulting in users making incorrect
authorization decisions about the connection.
This change makes the cache a one entry FIFO cache, making the assumed
property, that the last call to PublicKeyCallback represents the key
actually used for authentication, actually hold.
Thanks to Damien Tournoud, Patrick Dawkins, Vince Parker, and
Jules Duvivier from the Platform.sh / Upsun engineering team
for reporting this issue.
Fixes golang/go#70779
Fixes CVE-2024-45337
Change-Id: Ife7c7b4045d8b6bcd7e3a417bdfae370c709797f
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/635315
Reviewed-by: Roland Shoemaker <roland@golang.org >
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Damien Neil <dneil@google.com >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2024-12-11 09:50:49 -08:00
Roland Shoemaker
7042ebcbe0
openpgp/clearsign: just use rand.Reader in tests
...
Instead of a convoluted fake rand, it is _basically_ just as fast, and
fixes errors that pop up due to bad entropy.
Fixes golang/go#70682
Change-Id: Ib0f605398d1092b516b03135f602c644be2a060f
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/633655
Reviewed-by: Tatiana Bradley <tatianabradley@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Roland Shoemaker <roland@golang.org >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
2024-12-04 19:36:17 +00:00
Gopher Robot
3e90321ac7
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: I580d412fc4a135696d4054f8007593cfa4f64224
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/633480
Reviewed-by: David Chase <drchase@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
2024-12-04 16:35:48 +00:00
Gopher Robot
8c4e668694
x509roots/fallback: update bundle
...
This is an automated CL which updates the NSS root bundle.
Change-Id: Ic5267bf9d66b676e1cfc5fc2ae153afb8f33b29c
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/631635
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2024-11-27 18:44:53 +00:00
Gopher Robot
6018723c74
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: Ib4976eb0b062bcd71c208afc9ff53e8c3068fbf9
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/626377
Reviewed-by: David Chase <drchase@google.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2024-11-07 22:54:53 +00:00
Ian Lance Taylor
71ed71b4fa
README: don't recommend go get
...
These days people will just import the packages and the go tool will
do the right thing. We don't need to explain it.
Add a pointer to the git repo, though.
For golang/go#62645
Change-Id: I8b1e4a877bd83fe6891688a44d27a6c7902c8979
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/624155
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Commit-Queue: Ian Lance Taylor <iant@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2024-11-04 00:10:25 +00:00
Filippo Valsorda
750a45fe5e
sha3: add MarshalBinary, AppendBinary, and UnmarshalBinary
...
Fixes golang/go#24617
Change-Id: I1d9d529950aa8a5953435e8d3412cda44b075d55
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/616635
Reviewed-by: Roland Shoemaker <roland@golang.org >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net >
Reviewed-by: Michael Pratt <mpratt@google.com >
2024-10-22 19:51:02 +00:00
Filippo Valsorda
36b172546b
sha3: avoid trailing permutation
...
If you read a multiple of the rate, and then stop, there is no point in
running the final permutation.
Change-Id: Ic95e70f78b6e139aca1d3e3c11e09d2bbcf54f6c
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/620555
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net >
Reviewed-by: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Michael Pratt <mpratt@google.com >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
2024-10-22 19:50:23 +00:00
Filippo Valsorda
80ea76eb17
sha3: fix padding for long cSHAKE parameters
...
We used to compute the incorrect value if len(initBlock) % rate == 0.
Also, add a test vector for golang/go#66232 , confirmed to fail on
GOARCH=386 without CL 570876.
Fixes golang/go#69169
Change-Id: I3f2400926fca111dd0ca1327d6b5975e51b28f96
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/616576
Reviewed-by: Andrew Ekstedt <andrew.ekstedt@gmail.com >
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net >
Reviewed-by: Michael Pratt <mpratt@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2024-10-22 19:50:19 +00:00
Filippo Valsorda
c17aa50fbd
sha3: avoid buffer copy
...
Previously, the package worked by copying the input (or the output) into
a buffer, and then XOR'ing (or copying) it into (or out of) the state.
(Except for an input fast path.) There's no need for that! We can XOR
straight into the state, and copy straight out of it, at least on little
endian machines. This is a bit faster, almost halves the state size, and
will make it easier to implement marshaling, but most importantly look
at how much simpler it makes the code!
go: go1.23.0
goos: linux
goarch: amd64
pkg: golang.org/x/crypto/sha3
cpu: AMD Ryzen 7 PRO 8700GE w/ Radeon 780M Graphics
│ v0.27.0-2-g42ee18b9637 │ v0.27.0-2-g42ee18b9637-dirty │
│ sec/op │ sec/op vs base │
PermutationFunction-8 270.8n ± 0% 270.4n ± 0% ~ (p=0.099 n=10)
Sha3_512_MTU-8 5.762µ ± 0% 5.658µ ± 0% -1.80% (p=0.000 n=10)
Sha3_384_MTU-8 4.179µ ± 0% 4.070µ ± 0% -2.60% (p=0.000 n=10)
Sha3_256_MTU-8 3.316µ ± 0% 3.214µ ± 0% -3.08% (p=0.000 n=10)
Sha3_224_MTU-8 3.175µ ± 0% 3.061µ ± 0% -3.61% (p=0.000 n=10)
Shake128_MTU-8 2.779µ ± 0% 2.681µ ± 0% -3.51% (p=0.000 n=10)
Shake256_MTU-8 2.947µ ± 0% 2.957µ ± 0% +0.32% (p=0.000 n=10)
Shake256_16x-8 44.15µ ± 0% 44.45µ ± 0% +0.67% (p=0.000 n=10)
Shake256_1MiB-8 2.319m ± 0% 2.274m ± 0% -1.93% (p=0.000 n=10)
Sha3_512_1MiB-8 4.204m ± 0% 4.219m ± 0% +0.34% (p=0.000 n=10)
geomean 13.75µ 13.54µ -1.55%
│ v0.27.0-2-g42ee18b9637 │ v0.27.0-2-g42ee18b9637-dirty │
│ B/s │ B/s vs base │
PermutationFunction-8 704.3Mi ± 0% 705.4Mi ± 0% ~ (p=0.105 n=10)
Sha3_512_MTU-8 223.5Mi ± 0% 227.6Mi ± 0% +1.83% (p=0.000 n=10)
Sha3_384_MTU-8 308.1Mi ± 0% 316.4Mi ± 0% +2.67% (p=0.000 n=10)
Sha3_256_MTU-8 388.2Mi ± 0% 400.5Mi ± 0% +3.17% (p=0.000 n=10)
Sha3_224_MTU-8 405.5Mi ± 0% 420.7Mi ± 0% +3.73% (p=0.000 n=10)
Shake128_MTU-8 463.4Mi ± 0% 480.2Mi ± 0% +3.64% (p=0.000 n=10)
Shake256_MTU-8 436.9Mi ± 0% 435.5Mi ± 0% -0.32% (p=0.000 n=10)
Shake256_16x-8 353.9Mi ± 0% 351.5Mi ± 0% -0.66% (p=0.000 n=10)
Shake256_1MiB-8 431.2Mi ± 0% 439.7Mi ± 0% +1.97% (p=0.000 n=10)
Sha3_512_1MiB-8 237.8Mi ± 0% 237.1Mi ± 0% -0.33% (p=0.000 n=10)
geomean 375.7Mi 381.6Mi +1.57%
Even stronger effect when patched on top of CL 616555 (forced on).
go: go1.23.0
goos: darwin
goarch: arm64
pkg: golang.org/x/crypto/sha3
cpu: Apple M2
│ old │ new │
│ sec/op │ sec/op vs base │
PermutationFunction-8 154.7n ± 2% 153.8n ± 1% ~ (p=0.469 n=10)
Sha3_512_MTU-8 3.260µ ± 2% 3.143µ ± 2% -3.60% (p=0.000 n=10)
Sha3_384_MTU-8 2.389µ ± 2% 2.244µ ± 2% -6.07% (p=0.000 n=10)
Sha3_256_MTU-8 1.950µ ± 2% 1.758µ ± 1% -9.87% (p=0.000 n=10)
Sha3_224_MTU-8 1.874µ ± 2% 1.686µ ± 1% -10.06% (p=0.000 n=10)
Shake128_MTU-8 1.827µ ± 3% 1.447µ ± 1% -20.80% (p=0.000 n=10)
Shake256_MTU-8 1.665µ ± 3% 1.604µ ± 3% -3.63% (p=0.003 n=10)
Shake256_16x-8 25.14µ ± 1% 25.23µ ± 2% ~ (p=0.912 n=10)
Shake256_1MiB-8 1.236m ± 2% 1.243m ± 2% ~ (p=0.631 n=10)
Sha3_512_1MiB-8 2.296m ± 2% 2.305m ± 1% ~ (p=0.315 n=10)
geomean 7.906µ 7.467µ -5.56%
│ old │ new │
│ B/op │ B/op vs base │
PermutationFunction-8 1.204Gi ± 2% 1.212Gi ± 1% ~ (p=0.529 n=10)
Sha3_512_MTU-8 394.9Mi ± 2% 409.7Mi ± 2% +3.73% (p=0.000 n=10)
Sha3_384_MTU-8 539.0Mi ± 2% 573.8Mi ± 2% +6.45% (p=0.000 n=10)
Sha3_256_MTU-8 660.3Mi ± 2% 732.6Mi ± 1% +10.95% (p=0.000 n=10)
Sha3_224_MTU-8 687.1Mi ± 2% 763.9Mi ± 1% +11.17% (p=0.000 n=10)
Shake128_MTU-8 704.7Mi ± 2% 889.6Mi ± 2% +26.24% (p=0.000 n=10)
Shake256_MTU-8 773.4Mi ± 3% 802.5Mi ± 3% +3.76% (p=0.004 n=10)
Shake256_16x-8 621.6Mi ± 1% 619.3Mi ± 2% ~ (p=0.912 n=10)
Shake256_1MiB-8 809.1Mi ± 2% 804.7Mi ± 2% ~ (p=0.631 n=10)
Sha3_512_1MiB-8 435.6Mi ± 2% 433.9Mi ± 1% ~ (p=0.315 n=10)
geomean 653.6Mi 692.0Mi +5.88%
Change-Id: I33a0a1ddf305c395f99bf17f81473e2f42c5ce42
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/616575
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net >
Reviewed-by: Michael Pratt <mpratt@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Andrew Ekstedt <andrew.ekstedt@gmail.com >
2024-10-21 19:02:20 +00:00
samiponkanen
7cfb9161e8
ssh: return unexpected msg error when server fails keyboard-interactive auth early
...
Seems the OpenSSH server running on windows fails keyboard-interactive
auth this way without sending any prompt to client. In such case the
golang ssh client should not retry keyboard-interactive auth when the
auth method is wrapped in a RetryableAuthMethod(). Rather the auth
method should be immediately marked as tried&failed and the client auth
process should move on to next available and acceptable auth method.
Fixes golang/go#67855
Change-Id: I6c64ae58ff8325774e37af716601b112f8833d8f
GitHub-Last-Rev: 7fafc4d1c81284b31000d7d6ccadd934dda26d24
GitHub-Pull-Request: golang/crypto#297
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/590956
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
2024-10-16 07:16:19 +00:00
Paul E. Murphy
b61b08db44
chacha20: extend ppc64le support to ppc64
...
This requires fixing an incorrect save of the counter. It is a word
value. It happens to work on LE because length is limited to u32.
Refactor the constant table to load correctly independent of byte
ordering.
Add byte order swapping where output needs converted to LE
ordering for storage.
Change-Id: Ic7e09bd1c769bb77dd6e817f5a8639ba765f4c0f
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/614297
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Reviewed-by: Archana Ravindar <aravinda@redhat.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2024-10-11 17:09:09 +00:00
Paul E. Murphy
6c21748958
internal/poly1305: extend ppc64le support to ppc64
...
The cipher needs to load the stream in LE order. Use the byte
reversing loads on BE.
Also, remove the unused variable poly1305Mask in the PPC64
asm file too.
Change-Id: Ie90fe7bb0ea7a3bcb76583e0cf9c1e4133499541
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/614298
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Reviewed-by: Archana Ravindar <aravinda@redhat.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: David Chase <drchase@google.com >
2024-10-04 20:59:56 +00:00
Gopher Robot
adef4cc1a8
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: Id321d3b5909ecb66c0311ba86008509c7895863b
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/617958
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: David Chase <drchase@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2024-10-04 15:35:24 +00:00
Yawning Angel
a0819fbb02
sha3: fix cSHAKE initialization for extremely large N and or S
...
While both impractical and unlikely, the multiplication could overflow
on 32-bit architectures.
The 64-bit architecture case is unaffected by both the maximum length
of Go slices being too small to trigger the overflow (everything except
s390), and it being safe to assume no machine has more than 2 EiB of
memory.
Fixes golang/go#66232
Change-Id: I19c15d42d2d6af35e296697159d43d02f513e614
GitHub-Last-Rev: 503e180debfdc93ab99977172af2b64290cb80e8
GitHub-Pull-Request: golang/crypto#286
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/570876
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: David Chase <drchase@google.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
2024-09-30 15:41:13 +00:00
Nicola Murino
42ee18b963
ssh: return ServerAuthError after too many auth failures
...
if a client is disconnected due to too many authentication attempts
we should return a ServerAuthError instead of a generic error.
Some users check the error returned by NewServerConn to determine
whether or not a client attempted to authenticate.
Fixes golang/go#69191
Change-Id: If68fcecdefd6c810fe9df8256b1216e320d8a916
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/566398
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Tim King <taking@google.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Carlos Amedee <carlos@golang.org >
2024-09-16 20:42:53 +00:00
cuishuang
9e92970a1e
bn256: add missing symbols in comment
...
Change-Id: Ibd48a070bd8ce35ef5795a8b73bc4ecac43a993e
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/611735
Run-TryBot: shuang cui <imcusg@gmail.com >
Commit-Queue: Ian Lance Taylor <iant@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
2024-09-10 20:43:33 +00:00
Dmitri Shuralyov
c9da6b9a40
all: fix printf(var) mistakes detected by latest printf checker
...
These were problematic but previously easy to miss. They're now
easy to spot thanks to build failures at Go tip as of CL 610736.
For golang/go#68796 .
Change-Id: I167f2cce2376b4070460389c673d973e4521d3dc
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/610797
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Alan Donovan <adonovan@google.com >
2024-09-04 21:26:08 +00:00
Gopher Robot
b35ab4fde0
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: I94bb1c6a4bb08aff8c146e84a9d4b3e353f098c2
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/610638
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Michael Pratt <mpratt@google.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
2024-09-04 20:46:08 +00:00
Garrett Bodley
bcb0f91bbc
internal/poly1305: Port sum_amd64.s to Avo
...
This implementation utilizes the same registers found in the reference
implementation, aiming to produce a minimal semantic diff between the
Avo-generated output and the original hand-written assembly.
To verify the Avo implementation, the reference and Avo-generated
assembly files are fed to `go tool asm`, capturing the debug output into
corresponding temp files. The debug output contains supplementary
metadata (line numbers, instruction offsets, and source file references)
that must be removed in order to obtain a semantic diff of the two
files. This is accomplished via a small utility script written in awk.
Commands used to verify Avo output:
GOROOT=$(go env GOROOT)
ASM_PATH="internal/poly1305/sum_amd64.s"
REFERENCE="b2d3a6a4b4d36521cd7f653879cf6981e7c5c340"
go tool asm -o /dev/null -I "$GOROOT"/src/runtime -debug \
<(git cat-file -p "$REFERENCE:$ASM_PATH") \
> /tmp/reference.s
go tool asm -o /dev/null -I "$GOROOT"/src/runtime -debug \
"$ASM_PATH" \
> /tmp/avo.s
normalize(){
awk '{
$1=$2=$3="";
print substr($0,4)
}'
}
diff <(normalize < /tmp/reference.s) <(normalize < /tmp/avo.s)
Change-Id: I80212c95d1b05335d7f6b73a3030b6f812f6105b
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/600035
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2024-09-04 20:35:25 +00:00
Garrett Bodley
7eace71069
chacha20poly1305: Avo port of chacha20poly1305_amd64.s
...
This implementation utilizes the same registers found in the reference
implementation, aiming to produce a minimal semantic diff between the
Avo-generated output and the original hand-written assembly.
To verify the Avo implementation, the reference and Avo-generated
assembly files are fed to `go tool asm`, capturing the debug output into
corresponding temp files. The debug output contains supplementary
metadata (line numbers, instruction offsets, and source file references)
that must be removed in order to obtain a semantic diff of the two
files. This is accomplished via a small utility script written in awk.
Parameter metadata not found in the reference assembly file has been
added, leading to a diff on the lines where those symbols are
referenced.
Commands used to verify Avo output:
GOROOT=$(go env GOROOT)
ASM_PATH="chacha20poly1305/chacha20poly1305_amd64.s"
REFERENCE="b2d3a6a4b4d36521cd7f653879cf6981e7c5c340"
go tool asm -o /dev/null -I "$GOROOT"/src/runtime -debug \
<(git cat-file -p "$REFERENCE:$ASM_PATH") \
> /tmp/reference.s
go tool asm -o /dev/null -I "$GOROOT"/src/runtime -debug \
"$ASM_PATH" \
> /tmp/avo.s
normalize(){
awk '{
$1=$2=$3="";
print substr($0,4)
}'
}
diff <(normalize < /tmp/reference.s) <(normalize < /tmp/avo.s)
155,157c155,157
< MOVQ dst(FP), DI
< MOVQ key+24(FP), R8
< MOVQ src+48(FP), SI
---
> MOVQ dst_base(FP), DI
> MOVQ key_base+24(FP), R8
> MOVQ src_base+48(FP), SI
159c159
< MOVQ ad+72(FP), CX
---
> MOVQ ad_base+72(FP), CX
4684,4686c4684,4686
< MOVQ dst(FP), DI
< MOVQ key+24(FP), R8
< MOVQ src+48(FP), SI
---
> MOVQ dst_base(FP), DI
> MOVQ key_base+24(FP), R8
> MOVQ src_base+48(FP), SI
4688c4688
< MOVQ ad+72(FP), CX
---
> MOVQ ad_base+72(FP), CX
Change-Id: Ia3a8e70b7440944ee739499c41ddceb70e054ef9
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/601442
Reviewed-by: Filippo Valsorda <filippo@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2024-09-04 20:35:14 +00:00
Garrett Bodley
620dfbc770
salsa20/salsa: Port salsa20_amd64.s to Avo
...
This implementation utilizes the same registers found in the reference
implementation, aiming to produce a minimal semantic diff between the
Avo-generated output and the original hand-written assembly.
To verify the Avo implementation, the reference and Avo-generated
assembly files are fed to `go tool asm`, capturing the debug output into
corresponding temp files. The debug output contains supplementary
metadata (line numbers, instruction offsets, and source file references)
that must be removed in order to obtain a semantic diff of the two
files. This is accomplished via a small utility script written in awk.
Commands used to verify Avo output:
GOROOT=$(go env GOROOT)
REFERENCE="b2d3a6a4b4d36521cd7f653879cf6981e7c5c340"
go tool asm -o /dev/null -I "$GOROOT"/src/runtime -debug \
<(git cat-file -p "$REFERENCE":salsa20/salsa/salsa20_amd64.s) \
> /tmp/reference.s
go tool asm -o /dev/null -I "$GOROOT"/src/runtime -debug \
salsa20/salsa/salsa20_amd64.s \
> /tmp/avo.s
normalize(){
awk '{
$1=$2=$3="";
print substr($0,4)
}'
}
diff <(normalize < /tmp/reference.s) <(normalize < /tmp/avo.s)
Change-Id: Ica0bb06f8b074ad566a979d33ddc81d8a38491b1
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/601217
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2024-09-04 20:34:59 +00:00
Garrett Bodley
82942cf1d8
blake2b: port blake2b_amd64.s to Avo
...
This implementation utilizes the same registers found in the reference
implementation, aiming to produce a minimal semantic diff between the
Avo-generated output and the original hand-written assembly.
To verify the Avo implementation, the reference and Avo-generated
assembly files are fed to `go tool asm`, capturing the debug output into
corresponding temp files. The debug output contains supplementary
metadata (line numbers, instruction offsets, and source file references)
that must be removed in order to obtain a semantic diff of the two
files. This is accomplished via a small utility script written in awk.
Commands used to verify Avo output:
GOROOT=$(go env GOROOT)
ASM_PATH="blake2b/blake2b_amd64.s"
REFERENCE="b2d3a6a4b4d36521cd7f653879cf6981e7c5c340"
go tool asm -o /dev/null -I "$GOROOT"/src/runtime -debug \
<(git cat-file -p "$REFERENCE:$ASM_PATH") \
> /tmp/reference.s
go tool asm -o /dev/null -I "$GOROOT"/src/runtime -debug \
"$ASM_PATH" \
> /tmp/avo.s
normalize(){
awk '{
$1=$2=$3="";
print substr($0,4)
}'
}
diff <(normalize < /tmp/reference.s) <(normalize < /tmp/avo.s)
Change-Id: I6dd59fb0b0365674aa5e43b69a57ea60fbcc4ba1
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/600456
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
2024-09-04 20:34:46 +00:00
Garrett Bodley
0484c26df7
blake2b: port blake2bAVX2_amd64.s to Avo
...
This implementation utilizes the same registers found in the reference
implementation, aiming to produce a minimal semantic diff between the
Avo-generated output and the original hand-written assembly.
To verify the Avo implementation, the reference and Avo-generated
assembly files are fed to `go tool asm`, capturing the debug output into
corresponding temp files. The debug output contains supplementary
metadata (line numbers, instruction offsets, and source file references)
that must be removed in order to obtain a semantic diff of the two
files. This is accomplished via a small utility script written in awk.
Commands used to verify Avo output:
GOROOT=$(go env GOROOT)
ASM_PATH="blake2b/blake2bAVX2_amd64.s"
REFERENCE="b2d3a6a4b4d36521cd7f653879cf6981e7c5c340"
go tool asm -o /dev/null -I "$GOROOT"/src/runtime -debug \
<(git cat-file -p "$REFERENCE:$ASM_PATH") \
> /tmp/reference.s
go tool asm -o /dev/null -I "$GOROOT"/src/runtime -debug \
"$ASM_PATH" \
> /tmp/avo.s
normalize(){
awk '{
$1=$2=$3="";
print substr($0,4)
}'
}
diff <(normalize < /tmp/reference.s) <(normalize < /tmp/avo.s)
Change-Id: Ia2af1b82c871e26b89bd9a2d9fb187cc49e18341
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/600836
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2024-09-04 20:34:34 +00:00
Garrett Bodley
38ed1bc0ec
blake2s: port blake2s_amd64.s to Avo
...
This implementation utilizes the same registers found in the reference
implementation, aiming to produce a minimal semantic diff between the
Avo-generated output and the original hand-written assembly.
To verify the Avo implementation, the reference and Avo-generated
assembly files are fed to `go tool asm`, capturing the debug output into
corresponding temp files. The debug output contains supplementary
metadata (line numbers, instruction offsets, and source file references)
that must be removed in order to obtain a semantic diff of the two
files. This is accomplished via a small utility script written in awk.
Commands used to verify Avo output:
GOROOT=$(go env GOROOT)
ASM_PATH="blake2s/blake2s_amd64.s"
REFERENCE="b2d3a6a4b4d36521cd7f653879cf6981e7c5c340"
go tool asm -o /dev/null -I "$GOROOT"/src/runtime -debug \
<(git cat-file -p "$REFERENCE:$ASM_PATH") \
> /tmp/reference.s
go tool asm -o /dev/null -I "$GOROOT"/src/runtime -debug \
"$ASM_PATH" \
> /tmp/avo.s
normalize(){
awk '{
$1=$2=$3="";
print substr($0,4)
}'
}
diff <(normalize < /tmp/reference.s) <(normalize < /tmp/avo.s)
Change-Id: Ica8bf9f0b42dc93714aa54e783fa74ed19e6b9f4
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/601216
Reviewed-by: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
2024-09-04 20:34:20 +00:00
Garrett Bodley
38a0b5da75
argon2: Avo port of blamka_amd64.s
...
This implementation utilizes the same registers found in the reference
implementation, aiming to produce a minimal semantic diff between the
Avo-generated output and the original hand-written assembly.
To verify the Avo implementation, the reference and Avo-generated
assembly files are fed to `go tool asm`, capturing the debug output into
corresponding temp files. The debug output contains supplementary
metadata (line numbers, instruction offsets, and source file references)
that must be removed in order to obtain a semantic diff of the two
files. This is accomplished via a small utility script written in awk.
Commands used to verify Avo output:
GOROOT=$(go env GOROOT)
ASM_PATH="argon2/blamka_amd64.s"
REFERENCE="b2d3a6a4b4d36521cd7f653879cf6981e7c5c340"
go tool asm -o /dev/null -I "$GOROOT"/src/runtime -debug \
<(git cat-file -p "$REFERENCE:$ASM_PATH") \
> /tmp/reference.s
go tool asm -o /dev/null -I "$GOROOT"/src/runtime -debug \
"$ASM_PATH" \
> /tmp/avo.s
normalize(){
awk '{
$1=$2=$3="";
print substr($0,4)
}'
}
diff <(normalize < /tmp/reference.s) <(normalize < /tmp/avo.s)
Change-Id: I3567eb80ef80dff248225f17470122c0a4e6951e
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/600315
Reviewed-by: Filippo Valsorda <filippo@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2024-09-04 20:33:49 +00:00
Gopher Robot
bf5f14f545
x509roots/fallback: update bundle
...
This is an automated CL which updates the NSS root bundle.
Change-Id: I95cf0b3e86f1e013d486a0bbd050a8b4bea5d6e9
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/610060
Reviewed-by: Roland Shoemaker <roland@golang.org >
Auto-Submit: Gopher Robot <gobot@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2024-09-03 18:00:24 +00:00
Nicola Murino
b2d3a6a4b4
ssh/agent: ensure to not add duplicated keys
...
When adding a new key, if we already have a Signer with the same public
key, we now replace it with the new one instead of duplicating it.
Before this change we had this:
$ ssh-add -l
3072 SHA256:bsBRHC/xgiqBJdSuvSTNpJNLTISP/G356jNMCRYC5Es nicola@p1 (RSA)
3072 SHA256:bsBRHC/xgiqBJdSuvSTNpJNLTISP/G356jNMCRYC5Es nicola@p1 (RSA-CERT)
$ ssh-add /home/nicola/ssh_certs/id_rsa
Identity added: /home/nicola/ssh_certs/id_rsa (nicola@p1)
Certificate added: /home/nicola/ssh_certs/id_rsa-cert.pub (myid)
$ ssh-add -l
3072 SHA256:bsBRHC/xgiqBJdSuvSTNpJNLTISP/G356jNMCRYC5Es nicola@p1 (RSA)
3072 SHA256:bsBRHC/xgiqBJdSuvSTNpJNLTISP/G356jNMCRYC5Es nicola@p1 (RSA-CERT)
3072 SHA256:bsBRHC/xgiqBJdSuvSTNpJNLTISP/G356jNMCRYC5Es nicola@p1 (RSA)
3072 SHA256:bsBRHC/xgiqBJdSuvSTNpJNLTISP/G356jNMCRYC5Es nicola@p1 (RSA-CERT)
Change-Id: Iad1b1a6dc94f68f53f05d7d1172f0017839976fc
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/602955
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: David Chase <drchase@google.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2024-08-06 16:07:48 +00:00
Gopher Robot
5bcd010f1c
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: Iae75e5fcbcfe3709820dd66638a763f662f8d939
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/603396
Auto-Submit: Gopher Robot <gobot@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: David Chase <drchase@google.com >
2024-08-06 15:38:17 +00:00
Ilia Mirkin
3375612bf4
ssh: add support for unpadded RSA signatures
...
The original SSH RFC 4253 explicitly disallows padding. This applies to
ssh-rsa signatures.
The updated SSH RFC 8332 which defines the SHA2 RSA signature variants
explicitly calls out the existence of signers who produce short
signatures and specifies that verifiers may allow this behavior.
In practice, PuTTY 0.81 and prior versions, as well as SSH.NET prior to
2024.1.0 always generated short signatures. Furthermore, PuTTY is
embedded in other software like WinSCP and FileZilla, which are updated
on their own schedules as well. This leads to occasional unexplained
login errors, when using RSA keys.
OpenSSH server allows these short signatures for all RSA algorithms.
Fixes golang/go#68286
Change-Id: Ia60ece21bf9c111c490fac0c066443ed5ff7dd29
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/598534
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2024-07-26 16:39:19 +00:00
Nicola Murino
bb80217080
ssh: don't use dsa keys in integration tests
...
DSA has been disabled by default since OpenSSH 9.8, so tests
fail with newer versions of OpenSSH
Change-Id: I57b9abde8845cd05116a637a21cbbb8af740b2e0
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/599955
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2024-07-22 17:35:33 +00:00
Ilia Mirkin
6879722274
ssh: remove go 1.21+ dependency on slices
...
Fixes golang/go#68469
Change-Id: Ieea3c444b0458d169a6ff224e59b3b815264de89
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/598775
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: Carlos Amedee <carlos@golang.org >
2024-07-17 17:59:23 +00:00
Garrett Bodley
e983fa2741
sha3: Avo port of keccakf_amd64.s
...
This implementation utilizes the same registers found in the reference
implementation, aiming to produce a minimal semantic diff between the
Avo-generated output and the original hand-written assembly.
To verify the Avo implementation, the reference and Avo-generated
assembly files are fed to `go tool asm`, capturing the debug output into
corresponding temp files. The debug output contains supplementary
metadata (line numbers, instruction offsets, and source file references)
that must be removed in order to obtain a semantic diff of the two
files. This is accomplished via a small utility script written in awk.
Commands used to verify Avo output:
BASE="d66d9c31b4ae80d173d1187a9e40c188788dbdbc"
go tool asm -o /dev/null -debug \
<(git cat-file -p "$BASE":sha3/keccakf_amd64.s) \
> /tmp/reference.s
go tool asm -o /dev/null -debug \
sha3/keccakf_amd64.s \
> /tmp/avo.s
normalize(){
awk '{
$1=$2=$3="";
print substr($0,4)
}'
}
diff <(normalize < /tmp/reference.s) <(normalize < /tmp/avo.s)
Change-Id: I1c0ea516531355263b83d3b66a37df090e293cea
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/594655
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Russell Webb <russell.webb@protonmail.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
2024-07-16 18:24:57 +00:00
Russ Cox
80fd97208d
LICENSE: update per Google Legal
...
Very minor tweaks:
- Remove (c) pseudosymbol.
- Remove "All Rights Reserved."
- Change "Google Inc." (no longer exists) to "Google LLC".
[git-generate]
echo '
,s/\(c\) //
,s/ All rights reserved.//
,s/Google Inc./Google LLC/
w
q
' | sam -d LICENSE
Change-Id: I6e885650c5701597f57dbf00c2abdcc7b393a703
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/598520
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Russ Cox <rsc@golang.org >
2024-07-16 16:09:32 +00:00
Dmitri Shuralyov
f2bc3a617a
x509roots/fallback/internal/goissue52287: delete
...
By now Go 1.19 isn't supported, so there's no need to work around
go.dev/issue/52287 in this module anymore.
For golang/go#57792 .
For golang/go#52287 .
Change-Id: I3999cdb9ca419a2ab897c9143a4ec31f59da7d80
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/598495
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2024-07-16 15:06:23 +00:00
Gopher Robot
d66d9c31b4
x509roots/fallback: update bundle
...
This is an automated CL which updates the NSS root bundle.
Change-Id: I552ff9800e32294b25cc04ccc8fca3404ae3b93c
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/597095
Auto-Submit: Gopher Robot <gobot@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Carlos Amedee <carlos@golang.org >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2024-07-09 15:54:00 +00:00
Gopher Robot
9fadb0b165
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: I0024d2803498fe98af80f14a4476a504c9aa6b5b
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/596835
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Than McIntosh <thanm@google.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
2024-07-05 10:46:52 +00:00
Filippo Valsorda
a6a393ffd6
all: bump go.mod version and drop compatibility shims
...
Also, remove the legacy import annotations.
Fixes golang/go#68147
Change-Id: Ibfcc9322f27224c0ba92ea42cd56912a7d8783fd
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/594256
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2024-06-26 15:12:35 +00:00
cuishuang
1c7450041f
ssh/test: make struct comment match struct name
...
Change-Id: I9bfd61fe96d2bdaa890379a1a31b7e0f3f2b67ed
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/594435
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Run-TryBot: shuang cui <imcusg@gmail.com >
Reviewed-by: Joedian Reid <joedian@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2024-06-24 16:35:32 +00:00
samiponkanen
d4e7c9cb6c
ssh: fail client auth immediately on receiving disconnect message
...
Fixes golang/go#66991
Change-Id: I60dd8a807578f162fda0e49bcd6fbf289d444396
GitHub-Last-Rev: f88329d35712873d0d7e3b39b9b11e7bfbc28e71
GitHub-Pull-Request: golang/crypto#293
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/581075
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2024-06-04 17:03:48 +00:00
Gopher Robot
332fd656f4
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: I105ee0f343768881d4fe3a2bfd1fcbaa7e1fd705
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/590218
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Than McIntosh <thanm@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2024-06-04 16:30:12 +00:00
Gopher Robot
0b431c7de3
x509roots/fallback: update bundle
...
This is an automated CL which updates the NSS root bundle.
Change-Id: I8a1b9637e83214674e6fe82ebf584e9b90446ca3
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/589875
Reviewed-by: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Damien Neil <dneil@google.com >
2024-06-03 23:40:54 +00:00
Mariano Cano
349231f7e4
ssh: implement CryptoPublicKey on sk keys
...
This commit implements the CryptoPublicKey interface for the
skECDSAPublicKey and skEd25519PublicKey types.
Fixes golang/go#62518
Change-Id: I2b8ac89196fbb3614bf5c675127bed23f1cf6b26
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/526875
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Matthew Dempsky <mdempsky@google.com >
Reviewed-by: Than McIntosh <thanm@google.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
2024-05-29 18:20:30 +00:00
Andrew Lytvynov
44c9b0ff9e
ssh: allow server auth callbacks to send additional banners
...
Add a new BannerError error type that auth callbacks can return to send
banner to the client. While the BannerCallback can send the initial
banner message, auth callbacks might want to communicate more
information to the client to help them diagnose failures.
Updates golang/go#64962
Change-Id: I97a26480ff4064b95a0a26042b0a5e19737cfb62
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/558695
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2024-05-22 20:07:48 +00:00
Mauri de Souza Meneguzzo
67b13616a5
sha3: reenable s390x assembly
...
Fixes golang/go#64897
Change-Id: I0c8c52d73a7d2df0f44fee36d407a87213f59bff
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/554435
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2024-05-07 22:33:54 +00:00
Filippo Valsorda
477a5b4c32
sha3: make APIs usable with zero allocations
...
The "buf points into storage" pattern is nice, but causes the whole
state struct to escape, since escape analysis can't track the pointer
once it's assigned to buf.
Change-Id: I31c0e83f946d66bedb5a180e96ab5d5e936eb322
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/544817
Reviewed-by: Cherry Mui <cherryyz@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
2024-05-07 22:04:09 +00:00
Filippo Valsorda
59b5a86796
sha3: disable s390x assembly
...
It was integrated in such a way that it made devirtualization
impossible, leading to allocations on every platform.
It can be reintroduced according to AssemblyPolicy and TargetSpecific.
Updates #64897
Change-Id: I3a4edc91185c2928b2c9b80655a2bc8daa6b44e3
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/544816
Reviewed-by: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Cherry Mui <cherryyz@google.com >
2024-05-07 22:03:33 +00:00
Filippo Valsorda
10f366e7a2
sha3: simplify XOR functions
...
name old time/op new time/op delta
PermutationFunction-4 398ns ± 0% 399ns ± 1% ~ (p=0.508 n=9+10)
Sha3_512_MTU-4 8.34µs ± 1% 8.36µs ± 1% ~ (p=0.101 n=10+10)
Sha3_384_MTU-4 6.00µs ± 0% 6.02µs ± 1% +0.47% (p=0.000 n=8+10)
Sha3_256_MTU-4 4.78µs ± 0% 4.79µs ± 1% ~ (p=0.324 n=10+10)
Sha3_224_MTU-4 4.57µs ± 1% 4.57µs ± 1% ~ (p=0.288 n=10+10)
Shake128_MTU-4 3.87µs ± 0% 3.86µs ± 1% -0.22% (p=0.008 n=9+9)
Shake256_MTU-4 4.17µs ± 0% 4.17µs ± 0% ~ (p=0.474 n=10+8)
Shake256_16x-4 59.4µs ± 0% 59.7µs ± 0% +0.48% (p=0.000 n=9+8)
Shake256_1MiB-4 3.19ms ± 1% 3.20ms ± 0% ~ (p=0.105 n=10+10)
Sha3_512_1MiB-4 5.97ms ± 0% 6.01ms ± 0% +0.75% (p=0.000 n=10+10)
name old speed new speed delta
PermutationFunction-4 502MB/s ± 0% 502MB/s ± 0% ~ (p=0.497 n=9+10)
Sha3_512_MTU-4 162MB/s ± 1% 161MB/s ± 1% ~ (p=0.101 n=10+10)
Sha3_384_MTU-4 225MB/s ± 0% 224MB/s ± 1% -0.47% (p=0.000 n=8+10)
Sha3_256_MTU-4 282MB/s ± 0% 282MB/s ± 1% ~ (p=0.325 n=10+10)
Sha3_224_MTU-4 296MB/s ± 1% 295MB/s ± 1% ~ (p=0.280 n=10+10)
Shake128_MTU-4 349MB/s ± 0% 350MB/s ± 1% +0.22% (p=0.008 n=9+9)
Shake256_MTU-4 324MB/s ± 0% 324MB/s ± 0% ~ (p=0.459 n=10+8)
Shake256_16x-4 276MB/s ± 0% 274MB/s ± 0% -0.48% (p=0.000 n=9+8)
Shake256_1MiB-4 328MB/s ± 1% 327MB/s ± 0% ~ (p=0.105 n=10+10)
Sha3_512_1MiB-4 176MB/s ± 0% 174MB/s ± 0% -0.74% (p=0.000 n=10+10)
Change-Id: Ib8e571f3c9a0f84096df2f38ca96da197ad5be30
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/544815
Auto-Submit: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Cherry Mui <cherryyz@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com >
2024-05-06 15:29:57 +00:00
Gopher Robot
905d78a692
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: I19d5fc3e26b53fba06b4fbcf3817c44477265210
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/583355
Auto-Submit: Gopher Robot <gobot@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Than McIntosh <thanm@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2024-05-06 13:42:02 +00:00
Nicola Murino
ebb717d630
ssh: validate key type in SSH_MSG_USERAUTH_PK_OK response
...
According to RFC 4252 Section 7 the algorithm in SSH_MSG_USERAUTH_PK_OK
should match that of the request but some servers send the key type instead.
OpenSSH checks for the key type, so we do the same.
Fixes golang/go#66438
Fixes golang/go#64785
Fixes golang/go#56342
Fixes golang/go#54027
Change-Id: I2f733f0faece097e44ba7a97c868d30a53e21d79
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/573360
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Run-TryBot: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Joedian Reid <joedian@google.com >
2024-05-03 13:40:56 +00:00
cuishuang
0da2a6a1bb
openpgp: fix function name in comment
...
Change-Id: Ic788ebe311fafa0f5d9750d5f7f25fb70dc0606d
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/579175
Run-TryBot: shuang cui <imcusg@gmail.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
2024-04-16 17:48:22 +00:00
Michael Munday
5defcc193a
sha3: fix Sum results for SHAKE functions on s390x
...
Sum was taking the digest from the state which is correct for SHA-3
functions but not for SHAKE functions.
Updates golang/go#66804
Change-Id: If782464d773262075950e3168128c0d46e4a6530
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/578715
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: Than McIntosh <thanm@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Run-TryBot: Michael Munday <mike.munday@lowrisc.org >
2024-04-15 21:53:43 +00:00
Gopher Robot
d042a396a6
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: Ib20227810c7e72942dd6fc33731fc613784aedec
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/576515
Reviewed-by: Than McIntosh <thanm@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
2024-04-04 16:59:43 +00:00
Nicola Murino
b92bf9480d
ssh: respect MaxAuthTries also for "none" auth attempts
...
Only the first "none" auth attempt is allowed without penality
Change-Id: Ibe776e968ba406445eeb94e8f1959383b88c98f7
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/575995
Reviewed-by: Filippo Valsorda <filippo@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Commit-Queue: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Than McIntosh <thanm@google.com >
2024-04-04 14:49:27 +00:00
Nicola Murino and Peter Verraedt
6f79b5a20c
ssh: add server side multi-step authentication
...
Add support for sending back partial success to the client while
handling authentication in the server. This is implemented by a special
error that can be returned by any of the authentication methods, which
contains the authentication methods to offer next.
This patch is based on CL 399075 with some minor changes and the
addition of test cases.
Fixes golang/go#17889
Fixes golang/go#61447
Fixes golang/go#64974
Co-authored-by: Peter Verraedt <peter.verraedt@kuleuven.be >
Change-Id: I05c8f913bb407d22c2e41c4cbe965e36ab4739b0
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/516355
Reviewed-by: Andrew Lytvynov <awly@tailscale.com >
Reviewed-by: Than McIntosh <thanm@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
2024-04-03 07:40:24 +00:00
Jayanth Krishnamurthy
8d0d405eed
x/crypto/chacha20: cleanup chacha_ppc64le.s
...
- Adding PCALIGN before the loops
- Changing WORD directive with corresponding Vector Merge EVEN/ODD word instructions
- Replacing Branch Conditional (BC) with its extended mnemonic form BDNZ
- VPERMXOR instruction usage in place of VXOR instructions followed by
VRLW (rotate left) for cases of rotating in multiples of 8. This
replacements give performace improvement both in time and space of around 7%-8% as listed below
using benchstat tool.
goos: linux
goarch: ppc64le
pkg: golang.org/x/crypto/chacha20
cpu: POWER10
| chacha20.prev.out | chacha20.new.out |
| sec/op | sec/op vs base |
ChaCha20/64 171.9n ± 0% 156.6n ± 1% -8.90% (p=0.002 n=6)
ChaCha20/256 165.5n ± 0% 152.4n ± 0% -7.92% (p=0.002 n=6)
ChaCha20/10x25 505.8n ± 0% 504.3n ± 2% -0.32% (p=0.589 n=6)
ChaCha20/4096 2.265µ ± 0% 2.052µ ± 0% -9.40% (p=0.002 n=6)
ChaCha20/100x40 5.359µ ± 3% 5.018µ ± 2% -6.37% (p=0.002 n=6)
ChaCha20/65536 35.71µ ± 0% 32.29µ ± 0% -9.57% (p=0.002 n=6)
ChaCha20/1000x65 44.63µ ± 0% 41.05µ ± 0% -8.02% (p=0.002 n=6)
geomean 2.235µ 2.073µ -7.26%
| chacha20.prev.out | chacha20.new.out |
| B/s | B/s vs base |
ChaCha20/64 355.1Mi ± 0% 389.8Mi ± 1% +9.78% (p=0.002 n=6)
ChaCha20/256 1.440Gi ± 0% 1.565Gi ± 0% +8.62% (p=0.002 n=6)
ChaCha20/10x25 471.3Mi ± 0% 472.8Mi ± 2% +0.31% (p=0.589 n=6)
ChaCha20/4096 1.684Gi ± 0% 1.859Gi ± 0% +10.38% (p=0.002 n=6)
ChaCha20/100x40 711.8Mi ± 3% 760.3Mi ± 2% +6.80% (p=0.002 n=6)
ChaCha20/65536 1.709Gi ± 0% 1.890Gi ± 0% +10.59% (p=0.002 n=6)
ChaCha20/1000x65 1.356Gi ± 0% 1.475Gi ± 0% +8.72% (p=0.002 n=6)
geomean 957.3Mi 1.008Gi +7.83%
Change-Id: Ib31cb10a2a11eacdacf0272fbfd887eb5ccd8bcb
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/564797
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com >
Run-TryBot: Paul Murphy <murp@ibm.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: David Chase <drchase@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
2024-03-26 21:57:38 +00:00
cui fliter
b91329d961
all: remove redundant words in comments and fix some typos
...
Change-Id: I3078492dc020770aca630e0b362df0212bd41e32
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/569156
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: David Chase <drchase@google.com >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2024-03-18 09:27:23 +00:00
Gopher Robot
7067223927
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: I54256afe881714f60fc37c471cd65b060090d9d6
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/568816
Reviewed-by: Than McIntosh <thanm@google.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
2024-03-04 18:29:30 +00:00
Nicola Murino
0d2316b267
ssh/test: work around for TestCiphers failures on macOS
...
TestCiphers is already skipped on macOS when testing data received
from the server, so move the test for sending data after the
receiving one to work around this new integration test failure.
Fixes golang/go#65732
Change-Id: Ie0c614c5373735ae8aefdd7ded643579b130f4b3
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/564457
Reviewed-by: Bryan Mills <bcmills@google.com >
Reviewed-by: Carlos Amedee <carlos@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Commit-Queue: Nicola Murino <nicola.murino@gmail.com >
2024-02-28 20:47:20 +00:00
Roland Shoemaker
0aab8d07ae
all: update go.mod x/net dependency
...
Not necessary for anything, but need to test something harmless.
Change-Id: I4faa64ef2c8f1f14df5ccaa37836fc56beed4f50
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/566917
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
2024-02-26 19:05:04 +00:00
Brad Fitzpatrick
5bead598a0
ocsp: don't use iota for externally defined constants
...
Style fix: iota shouldn't be used for values that come from RFCs or
things that go over the wire or to disk.
Change-Id: Ib903ec1bce7e71ff81094db3de8d0b71e16f52f3
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/564695
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2024-02-18 02:21:00 +00:00
Lynn Boger
1a865804d5
x/crypto/internal/poly1305: improve sum_ppc64le.s
...
This contains a few minor improvements to sum_ppc64le.s
which result in up to 10% performance improvement for
some of the benchmarks in this directory.
- ADDZE followed by ADD can be combined into ADDE
- PCALIGN added to the loop
- Eliminate a few unnecessary register moves
goos: linux
goarch: ppc64le
pkg: golang.org/x/crypto/internal/poly1305
cpu: POWER10
│ poly.orig.out │ poly.out │
│ sec/op │ sec/op vs base │
64 40.34n ± 0% 38.13n ± 0% -5.47% (p=0.002 n=6)
1K 482.2n ± 0% 444.6n ± 0% -7.81% (p=0.002 n=6)
2M 978.4µ ± 0% 879.3µ ± 0% -10.12% (p=0.002 n=6)
64Unaligned 40.35n ± 0% 38.16n ± 0% -5.42% (p=0.002 n=6)
1KUnaligned 482.0n ± 0% 444.2n ± 0% -7.84% (p=0.002 n=6)
2MUnaligned 978.4µ ± 0% 879.4µ ± 0% -10.12% (p=0.002 n=6)
Write64 32.69n ± 0% 30.71n ± 0% -6.04% (p=0.002 n=6)
Write1K 472.4n ± 0% 436.5n ± 0% -7.60% (p=0.002 n=6)
Write2M 978.3µ ± 0% 879.4µ ± 0% -10.11% (p=0.002 n=6)
Write64Unaligned 32.67n ± 0% 30.71n ± 0% -6.00% (p=0.002 n=6)
Write1KUnaligned 472.6n ± 0% 436.4n ± 0% -7.66% (p=0.002 n=6)
Write2MUnaligned 978.5µ ± 0% 879.6µ ± 0% -10.10% (p=0.002 n=6)
geomean 2.569µ 2.367µ -7.87%
Change-Id: I63314e7252ef10fb2d157f623c4bc2e31a63ae32
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/558775
Reviewed-by: David Chase <drchase@google.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Paul Murphy <murp@ibm.com >
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Than McIntosh <thanm@google.com >
2024-02-15 13:30:21 +00:00
Nicola Murino
1c981e6f81
ssh/test: don't use DSA keys in integrations tests, update test RSA key
...
on RHEL 9 OpenSSH does not support DSA keys and RSA keys with size less
than 2048 bits, furthermore signing with ssh-rsa (SHA-1 signatures) and
ssh-dss is not allowed, therefore:
1) replaced the 1024-bit RSA key used in the test with a new 2048-bit
one
2) removed DSA key from itegration tests
3) allowed signature errors using ssh-rsa in agent integration tests, we
also check SHA-2 variants that are not skipped
Fixes golang/go#65581
Change-Id: I54bf997b61ef4d91d38eb624275737ba7291bb20
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/562755
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: David Chase <drchase@google.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2024-02-14 13:16:51 +00:00
Roland Shoemaker
62c9f1799c
x509roots/nss: manually exclude a confusingly constrained root
...
Fixes golang/go#61963
Change-Id: I16920d160af74772ef5aa650d1274e07c3ca9adc
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/562475
Reviewed-by: Filippo Valsorda <filippo@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2024-02-08 16:32:26 +00:00
Gopher Robot
405cb3bdea
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: I87d766a485104662172bf983d2a9deb085eddd99
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/562417
Reviewed-by: Than McIntosh <thanm@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: David Chase <drchase@google.com >
2024-02-07 19:12:06 +00:00
Gopher Robot
913d3ae741
x509roots/fallback: update bundle
...
This is an automated CL which updates the NSS root bundle.
Change-Id: I6d9163026799e5d134f6bb6819e22448d7ebe719
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/561395
Reviewed-by: Roland Shoemaker <roland@golang.org >
Auto-Submit: Gopher Robot <gobot@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2024-02-07 17:47:05 +00:00
Bryan C. Mills
dbb6ec16ec
ssh/test: skip tests on darwin that fail on the darwin-amd64-longtest LUCI builder
...
We don't yet understand why these tests fail, but the Apple sshd seems
to have some non-trivial vendor patches, so it is plausibly a
platform-specific bug in the test. Let's skip that failure mode on the
whole platform until/unless someone has time to reproduce and
investigate the failure.
For golang/go#64959 .
Cq-Include-Trybots: luci.golang.try:x_crypto-gotip-darwin-amd64-longtest,x_crypto-gotip-linux-amd64-longtest,x_crypto-gotip-windows-amd64-longtest
Change-Id: I9e43579469de3fe9329c093b5916bbed0edd3751
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/554077
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Bryan Mills <bcmills@google.com >
2024-01-08 16:44:29 +00:00
Bryan C. Mills
403f69900e
ssh/test: avoid leaking a net.UnixConn in server.TryDialWithAddr
...
For golang/go#64959 .
Change-Id: I2153166f4960058cdc2b82ae34ca250dcc6ba1c6
Cq-Include-Trybots: luci.golang.try:x_crypto-gotip-linux-amd64-longtest,x_crypto-gotip-windows-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/554062
Run-TryBot: Bryan Mills <bcmills@google.com >
Auto-Submit: Bryan Mills <bcmills@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2024-01-08 16:33:12 +00:00
Gopher Robot
055043dfed
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: I2df91d0602cd1ef94370de4a60a935edeb441333
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/553996
Reviewed-by: Than McIntosh <thanm@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2024-01-04 15:35:59 +00:00
Sebastiaan van Stijn
08396bb92b
internal/poly1305: drop Go 1.12 compatibility
...
Other packages already dropped compatibility with go1.12, so it should be safe to remove it for this package as well.
Change-Id: Ieecc7cd06a0a4e69e8c1c09ef6fefe95d78ceb75
GitHub-Last-Rev: 1971e0309bdd31facbc60d70cd36a91f6a22f4b2
GitHub-Pull-Request: golang/crypto#239
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/448239
Reviewed-by: Joedian Reid <joedian@google.com >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Matthew Dempsky <mdempsky@google.com >
2024-01-02 20:57:09 +00:00
Roland Shoemaker
9d2ee975ef
ssh: implement strict KEX protocol changes
...
Implement the "strict KEX" protocol changes, as described in section
1.9 of the OpenSSH PROTOCOL file (as of OpenSSH version 9.6/9.6p1).
Namely this makes the following changes:
* Both the server and the client add an additional algorithm to the
initial KEXINIT message, indicating support for the strict KEX mode.
* When one side of the connection sees the strict KEX extension
algorithm, the strict KEX mode is enabled for messages originating
from the other side of the connection. If the sequence number for
the side which requested the extension is not 1 (indicating that it
has already received non-KEXINIT packets), the connection is
terminated.
* When strict kex mode is enabled, unexpected messages during the
handshake are considered fatal. Additionally when a key change
occurs (on the receipt of the NEWKEYS message) the message sequence
numbers are reset.
Thanks to Fabian Bäumer, Marcus Brinkmann, and Jörg Schwenk from Ruhr
University Bochum for reporting this issue.
Fixes CVE-2023-48795
Fixes golang/go#64784
Change-Id: I96b53afd2bd2fb94d2b6f2a46a5dacf325357604
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/550715
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Tatiana Bradley <tatianabradley@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Roland Shoemaker <roland@golang.org >
Reviewed-by: Damien Neil <dneil@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2023-12-18 16:33:08 +00:00
Edoardo Spadolini
4e5a26183e
ssh: close net.Conn on all NewServerConn errors
...
This PR ensures that the net.Conn passed to ssh.NewServerConn is closed
on all error return paths, not just after a failed handshake. This matches
the behavior of ssh.NewClientConn.
Change-Id: Id8a51d10ae8d575cbbe26f2ef6b37de7cca840ec
GitHub-Last-Rev: 81bb2e58a881a9a85935740bda06b034b32a8ce3
GitHub-Pull-Request: golang/crypto#279
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/549095
Run-TryBot: Nicola Murino <nicola.murino@gmail.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Michael Pratt <mpratt@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2023-12-14 18:23:28 +00:00
Gopher Robot
152cdb1503
x509roots/fallback: update bundle
...
This is an automated CL which updates the NSS root bundle.
Change-Id: Ib8c85dc815297de7b59c3e23b0ad029baaf948ec
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/543735
Auto-Submit: Gopher Robot <gobot@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2023-11-29 16:35:42 +00:00
Will Mortensen
fdfe1f8531
ssh: defer channel window adjustment
...
Sending a window adjustment after every read is unnecessarily chatty,
especially with a series of small reads like with TTY interactions.
Copy OpenSSH's logic for deferring these, which seemingly hasn't changed
since 2007. Note that since channelWindowSize and c.maxIncomingPayload
are currently constants here, the two checks could be combined into a
single check for c.myWindow < 2 MiB - 96 KiB (with the current values
of the constants).
Fixes golang/go#57424 .
Change-Id: Ifcef5be76fcc3f0b1a6dc396096bed9c50d64f21
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/459915
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Run-TryBot: Nicola Murino <nicola.murino@gmail.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Commit-Queue: Nicola Murino <nicola.murino@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2023-11-27 17:27:49 +00:00
Sebastiaan van Stijn
b8ffc16e10
blake2b: drop Go 1.6, Go 1.8 compatibility
...
Other packages already dropped compatibility with go < 1.12, so it
should be safe to remove it for this package as well.
Change-Id: I7e894fd11d2e7d1fe28c647bd921399a9a6e30d0
GitHub-Last-Rev: 2b4f576a19338f185e79f39cbfd476573b986369
GitHub-Pull-Request: golang/crypto#240
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/448240
Run-TryBot: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Joedian Reid <joedian@golang.org >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
Commit-Queue: Nicola Murino <nicola.murino@gmail.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2023-11-27 17:26:05 +00:00
Pavel Repin
7e6fbd82c8
ssh: wrap errors from client handshake
...
When an error is returned by a user defined host key callback,
it is now possible to handle it using standard Go mechanisms
such as errors.Is or errors.As.
Fixes golang/go#61309
Change-Id: I4269c5f8eacd8e7e8d85070ad249f0e27777b15f
GitHub-Last-Rev: d2a34d5c8225d6aaaee287ce3ea8b218fbe210d4
GitHub-Pull-Request: golang/crypto#266
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/508876
Run-TryBot: Nicola Murino <nicola.murino@gmail.com >
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org >
Reviewed-by: Muhammad Shulhan <m.shulhan@gmail.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2023-11-27 17:24:46 +00:00
Egon Elbre
bda2f3f5cf
argon2: avoid clobbering BP
...
go vet was reporting
blamka_amd64.s:203:1: [amd64] mixBlocksSSE2: invalid offset a+24(FP); expected a+8(FP)
blamka_amd64.s:226:1: [amd64] xorBlocksSSE2: invalid offset a+24(FP); expected a+8(FP)
blamka_amd64.s:204:1: frame pointer is clobbered before saving
blamka_amd64.s:227:1: frame pointer is clobbered before saving
Also fix a similar naming issue in sha3:
sha3\keccakf_amd64.s:325:1: [amd64] keccakF1600: unknown variable state; offset 0 is a+0(FP)
Updates golang/go#47027
Change-Id: Ia74852cdb0721ae0216787054197b0cac9e1c0f8
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/332289
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
2023-11-27 17:24:02 +00:00
Heschi Kreinick
325b735346
ssh/test: skip TestSSHCLIAuth on Windows
...
It's failing with a file permissions error:
sign_and_send_pubkey: signing using rsa-sha2-512 SHA256:Anr3LjZK8YVpjrxu79myrW9Hrb/wpcMNpVvTq/RcBm8\r\nBad permissions. Try removing permissions for user: UNKNOWN\\\\UNKNOWN (S-1-15-2-2) on file C:/b/s/w/ir/x/t/TestSSHCLIAuth1586735692/001/rsa.
For golang/go#64403
Change-Id: Iece8eac4a1ac349f9f7a273ac7389315cb96568e
Cq-Include-Trybots: luci.golang.try:x_crypto-gotip-windows-amd64-longtest,x_crypto-go1.21-windows-amd64-longtest,x_crypto-go1.20-windows-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/545135
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
Auto-Submit: Heschi Kreinick <heschi@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2023-11-27 16:29:38 +00:00
Gopher Robot
1eadac50a5
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: I7fdfe509173c79a63d006b27d674f869a5baa2af
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/545098
Reviewed-by: Heschi Kreinick <heschi@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2023-11-27 16:00:28 +00:00
Randy Reddig
b2d7c26edb
ssh: add (*Client).DialContext method
...
This change adds DialContext to ssh.Client, which opens a TCP-IP
connection tunneled over the SSH connection. This is useful for
proxying network connections, e.g. setting
(net/http.Transport).DialContext.
Fixes golang/go#20288 .
Change-Id: I110494c00962424ea803065535ebe2209364ac27
GitHub-Last-Rev: 3176984a71a9a1422702e3a071340ecfff71ff62
GitHub-Pull-Request: golang/crypto#260
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/504735
Run-TryBot: Nicola Murino <nicola.murino@gmail.com >
Run-TryBot: Han-Wen Nienhuys <hanwen@google.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Han-Wen Nienhuys <hanwen@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
Commit-Queue: Nicola Murino <nicola.murino@gmail.com >
2023-11-27 15:35:52 +00:00
Nicola Murino
1c17e20020
ssh: fix certificate authentication with OpenSSH 7.2-7.7
...
OpenSSH 7.2-7.7 advertises support for rsa-sha2-256 and rsa-sha2-512
in the "server-sig-algs" extension but doesn't support these
algorithms for certificate authentication, so if the server rejects
the key try to use the obtained algorithm as if "server-sig-algs" had
not been implemented.
Fixes golang/go#58371
Change-Id: Id49960d3dedd32a21e2c6c2689b1696e05398286
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/510155
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Run-TryBot: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
2023-11-23 17:23:14 +00:00
Sebastiaan van Stijn
270bf2552c
curve25519/internal/field/_asm: go mod tidy to fix x/sys version
...
Relates to CL 540537, which updated the dependency in the main module.
Change-Id: I9a745f4e03b5cf14fa62c4de63363ddf663b19fd
GitHub-Last-Rev: 836c39364e9fe4302bc26efc9dabc47680cb66d2
GitHub-Pull-Request: golang/crypto#277
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/541276
Auto-Submit: Filippo Valsorda <filippo@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
2023-11-21 20:13:04 +00:00
Matt Dainty
1cf1811d71
ssh: use the correct token from the client
...
This fixes the case where AcceptSecContext is always called with the
first token sent by the client instead of the most recently sent one.
Previously, despite being being read from the client and unmarshalled,
it was never actually used.
Fixes golang/go#43875
Change-Id: I1967d9a107af03d6778a9437b48e785d61710ee5
GitHub-Last-Rev: 0d58e4d50014fac0a9ea1eef85489172137eb8aa
GitHub-Pull-Request: golang/crypto#176
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/286252
Run-TryBot: Filippo Valsorda <filippo@golang.org >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Matthew Dempsky <mdempsky@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Run-TryBot: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Than McIntosh <thanm@google.com >
2023-11-11 11:26:14 +00:00
Roland Shoemaker
a2edfb5072
cryptobyte: fix ReadOptionalASN1Boolean
...
ReadOptionalASN1Boolean was completely broken, it would only work when
there were two BOOLEAN fields in a row, with the first being OPTIONAL
(which is itself invalid ASN.1 due to the ambiguity). This fixes it
to properly expect a BOOLEAN wrapped in a context-specific tag, as is
the case for all of the other ReadOptionalASN1* methods, and updates
its doc string.
This is a breaking change as it requires adding the tag field to
properly support context-specific tags. Given the method would
previously not work this seems like a reasonable breakage.
Fixes golang/go#43019
Change-Id: I42398256216c59988e249c90bc7aa668f64df945
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/274242
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Damien Neil <dneil@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Roland Shoemaker <roland@golang.org >
2023-11-09 20:53:37 +00:00
Bryan C. Mills
ff15cd57d1
ssh: eliminate some goroutine leaks in tests and examples
...
This should fix the "Log in goroutine" panic seen in
https://build.golang.org/log/e42bf69fc002113dbccfe602a6c67fd52e8f31df ,
as well as a few other related leaks. It also helps to verify that
none of the functions under test deadlock unexpectedly.
See https://go.dev/wiki/CodeReviewComments#goroutine-lifetimes .
Updates golang/go#58901 .
Change-Id: Ica943444db381ae1accb80b101ea646e28ebf4f9
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/541095
Auto-Submit: Bryan Mills <bcmills@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Heschi Kreinick <heschi@google.com >
2023-11-09 17:49:15 +00:00
Nicola Murino
eb61739cd9
ssh: allow to configure public key auth algorithms on the server side
...
Fixes golang/go#61244
Change-Id: I29b43e379cf0cdb07b0d6935666491b997157e73
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/510775
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Bryan Mills <bcmills@google.com >
Commit-Queue: Nicola Murino <nicola.murino@gmail.com >
Run-TryBot: Nicola Murino <nicola.murino@gmail.com >
Auto-Submit: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Han-Wen Nienhuys <hanwen@google.com >
2023-11-08 19:10:19 +00:00
Nicola Murino
42c83fffff
ssh: try harder to detect incorrect passwords for legacy PEM encryption
...
Because of deficiencies in the format, DecryptPEMBlock does not always
detect an incorrect password. In these cases decrypted DER bytes is
random noise. If the parsing of the key returns an asn1.StructuralError
we return x509.IncorrectPasswordError.
Fixes golang/go#62265
Change-Id: Ib8b845f2bd01662c1f1421d35859a32ac5b78da7
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/538835
Reviewed-by: Heschi Kreinick <heschi@google.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
2023-11-08 18:01:48 +00:00
Gopher Robot
e668aa9b45
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: Ie3a6928d78080ff7d75d6813b1760f1317baa081
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/540537
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Heschi Kreinick <heschi@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Carlos Amedee <carlos@golang.org >
2023-11-08 16:51:37 +00:00
Mauri de Souza Meneguzzo
df0bc9e1bb
chacha20poly1305: guard PSHUFB usage with GOAMD64_v2
...
The PSHUFB instruction is part of SSE which is only v2+ but it is being
used without the GOAMD64_v2 guard.
The ROL macros were copied from CL 516859 that adds internal/chacha8rand.
Fixes golang/go#63871
Change-Id: I3c8ba75ff284cda4fc788885643246936e617b85
GitHub-Last-Rev: e235e8eae67f16b3a58817cfdff729693faf2665
GitHub-Pull-Request: golang/crypto#275
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/538786
Reviewed-by: Keith Randall <khr@google.com >
Run-TryBot: Mauri de Souza Meneguzzo <mauri870@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Keith Randall <khr@golang.org >
Reviewed-by: Russ Cox <rsc@golang.org >
2023-11-07 22:36:17 +00:00
Eric Lagergren
74c2ba9521
crypto/hkdf: remove useless call to Reset
...
HKDF is commonly used to read keys that are the the same length (or
smaller) than the size of the hash digest, which means the loop inside
Read only runs once.
In that case, calling Reset is unnecesssary overhead.
name old time/op new time/op delta
16ByteMD5Single-8 1.39µs ± 1% 1.22µs ± 0% -11.95% (p=0.000 n=10+9)
20ByteSHA1Single-8 826ns ± 0% 746ns ± 0% -9.70% (p=0.000 n=9+10)
32ByteSHA256Single-8 838ns ± 1% 744ns ± 0% -11.29% (p=0.000 n=10+10)
64ByteSHA512Single-8 5.12µs ± 0% 4.57µs ± 0% -10.78% (p=0.000 n=8+10)
8ByteMD5Stream-8 137ns ± 0% 138ns ± 0% +0.27% (p=0.009 n=9+6)
16ByteMD5Stream-8 264ns ± 0% 265ns ± 0% +0.29% (p=0.000 n=10+10)
8ByteSHA1Stream-8 64.1ns ± 0% 64.4ns ± 0% +0.60% (p=0.000 n=9+9)
20ByteSHA1Stream-8 145ns ± 0% 146ns ± 1% +0.69% (p=0.000 n=9+10)
8ByteSHA256Stream-8 42.9ns ± 1% 43.1ns ± 0% +0.48% (p=0.005 n=10+10)
32ByteSHA256Stream-8 151ns ± 0% 152ns ± 0% +0.35% (p=0.006 n=10+8)
8ByteSHA512Stream-8 139ns ± 0% 139ns ± 0% +0.08% (p=0.035 n=9+10)
64ByteSHA512Stream-8 1.07µs ± 0% 1.07µs ± 0% +0.33% (p=0.000 n=9+10)
name old speed new speed delta
16ByteMD5Single-8 11.6MB/s ± 0% 13.1MB/s ± 0% +13.50% (p=0.000 n=9+9)
20ByteSHA1Single-8 24.2MB/s ± 0% 26.8MB/s ± 0% +10.75% (p=0.000 n=9+10)
32ByteSHA256Single-8 38.2MB/s ± 1% 43.0MB/s ± 0% +12.72% (p=0.000 n=10+10)
64ByteSHA512Single-8 12.5MB/s ± 0% 14.0MB/s ± 0% +12.06% (p=0.000 n=8+10)
8ByteMD5Stream-8 58.2MB/s ± 0% 58.1MB/s ± 0% -0.27% (p=0.004 n=9+9)
16ByteMD5Stream-8 60.6MB/s ± 0% 60.5MB/s ± 0% -0.27% (p=0.000 n=9+10)
8ByteSHA1Stream-8 125MB/s ± 0% 124MB/s ± 0% -0.59% (p=0.000 n=9+9)
20ByteSHA1Stream-8 138MB/s ± 0% 137MB/s ± 1% -0.69% (p=0.000 n=9+10)
8ByteSHA256Stream-8 186MB/s ± 1% 185MB/s ± 0% -0.47% (p=0.005 n=10+10)
32ByteSHA256Stream-8 211MB/s ± 0% 211MB/s ± 0% -0.37% (p=0.003 n=10+8)
8ByteSHA512Stream-8 57.4MB/s ± 1% 57.4MB/s ± 0% ~ (p=0.137 n=10+10)
64ByteSHA512Stream-8 59.9MB/s ± 0% 59.7MB/s ± 0% -0.33% (p=0.000 n=9+10)
name old alloc/op new alloc/op delta
16ByteMD5Single-8 1.17kB ± 0% 0.98kB ± 0% -16.42% (p=0.000 n=10+10)
20ByteSHA1Single-8 1.25kB ± 0% 1.06kB ± 0% -15.37% (p=0.000 n=10+10)
32ByteSHA256Single-8 1.36kB ± 0% 1.14kB ± 0% -16.46% (p=0.000 n=10+10)
64ByteSHA512Single-8 2.26kB ± 0% 1.84kB ± 0% -18.43% (p=0.000 n=10+10)
8ByteMD5Stream-8 2.00B ± 0% 2.00B ± 0% ~ (all equal)
16ByteMD5Stream-8 5.00B ± 0% 5.00B ± 0% ~ (all equal)
8ByteSHA1Stream-8 2.00B ± 0% 2.00B ± 0% ~ (all equal)
20ByteSHA1Stream-8 5.00B ± 0% 5.00B ± 0% ~ (all equal)
8ByteSHA256Stream-8 1.00B ± 0% 1.00B ± 0% ~ (all equal)
32ByteSHA256Stream-8 6.00B ± 0% 6.00B ± 0% ~ (all equal)
8ByteSHA512Stream-8 1.00B ± 0% 1.00B ± 0% ~ (all equal)
64ByteSHA512Stream-8 9.00B ± 0% 9.00B ± 0% ~ (all equal)
name old allocs/op new allocs/op delta
16ByteMD5Single-8 16.0 ± 0% 14.0 ± 0% -12.50% (p=0.000 n=10+10)
20ByteSHA1Single-8 16.0 ± 0% 14.0 ± 0% -12.50% (p=0.000 n=10+10)
32ByteSHA256Single-8 16.0 ± 0% 14.0 ± 0% -12.50% (p=0.000 n=10+10)
64ByteSHA512Single-8 16.0 ± 0% 14.0 ± 0% -12.50% (p=0.000 n=10+10)
8ByteMD5Stream-8 0.00 0.00 ~ (all equal)
16ByteMD5Stream-8 1.00 ± 0% 1.00 ± 0% ~ (all equal)
8ByteSHA1Stream-8 0.00 0.00 ~ (all equal)
20ByteSHA1Stream-8 1.00 ± 0% 1.00 ± 0% ~ (all equal)
8ByteSHA256Stream-8 0.00 0.00 ~ (all equal)
32ByteSHA256Stream-8 1.00 ± 0% 1.00 ± 0% ~ (all equal)
8ByteSHA512Stream-8 0.00 0.00 ~ (all equal)
64ByteSHA512Stream-8 1.00 ± 0% 1.00 ± 0% ~ (all equal)
Change-Id: I08e5deb7045ce9aa63428e0ac7ae6140226414b4
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/423414
Reviewed-by: Roland Shoemaker <roland@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Roland Shoemaker <roland@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Tatiana Bradley <tatianabradley@google.com >
2023-10-30 15:29:48 +00:00
Nicola Murino
cf8dcb0f7d
ssh: add test case against ssh CLI
...
These tests try to ensure better compatibility of our server implementation
with the ssh CLI.
With these tests in place:
1) before merging CL 447757 we would have noticed that our server
implementation was broken with OpenSSH 8.8+
2) after merging CL 447757 we would have noticed that our server
implementation was broken with OpenSSH 7.2-7.7
The ssh CLI from $PATH is used by default, but can be overridden using
the SSH_CLI_PATH environment variable.
Change-Id: I93d64be41c7613132b0364afac8397f57c2dcbca
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/506837
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Benny Siegert <bsiegert@gmail.com >
Reviewed-by: Han-Wen Nienhuys <hanwen@google.com >
Run-TryBot: Nicola Murino <nicola.murino@gmail.com >
2023-10-24 07:12:59 +00:00
Roland Shoemaker
4f30245552
x509roots: catch the zero-roots case when generating the bundle
...
If the parser returns zero roots, don't attempt to completely remove
the bundle. This may happen if, i.e., the HTTP response is 200 but has
no content. An example of this may be http://go.dev/cl/535735 .
Change-Id: I81fc2b49c8ec813cca17fd1c807296bfb053d992
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/536136
Reviewed-by: Damien Neil <dneil@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
Auto-Submit: Roland Shoemaker <roland@golang.org >
2023-10-23 20:02:03 +00:00
Dmitri Shuralyov
1d57292618
x509roots: check HTTP response status code and media type
...
The HTTP response status code is expected to be 200 OK, and
the certdata.txt file media type is expected to be plain text.
Check that it is before proceeding with parsing it.
Might help avoid repeats of CL 535735.
Change-Id: I1a7896b3e20d33a23fdc53c572ae9700c9eae1ef
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/536717
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Commit-Queue: Roland Shoemaker <roland@golang.org >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Auto-Submit: Roland Shoemaker <roland@golang.org >
2023-10-21 03:02:42 +00:00
Dmitri Shuralyov
8779cbd1c9
all: update go directive to 1.18
...
Done with:
go get go@1.18
go mod tidy
go fix ./...
Using go1.21.3.
Also update avo to v0.5.0 in the curve25519/internal/field/_asm module.
It's newer and produces no diff in the generated code.
For golang/go#60268 .
Change-Id: I9bd771ee8561595d7f68aaca76df6e3e33d35013
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/534141
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Damien Neil <dneil@google.com >
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2023-10-11 22:02:22 +00:00
Nicola Murino
2aeefc3f8a
ssh: add support for SSH_AGENT_CONSTRAIN_EXTENSION with id 255
...
it was changed in the following draft
https://datatracker.ietf.org/doc/html/draft-miller-ssh-agent-03
The id 3 is now used for SSH_AGENT_CONSTRAIN_MAXSIGN key constraint,
an OpenSSH extension to the protocol that we do not currently support.
Instead, we added a compatibility layer for
SSH_AGENT_CONSTRAIN_EXTENSION with ID 3.
Fixes golang/go#62311
Change-Id: I421aee92aee9e693e43f66e6a5515c055333cb9b
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/525355
Reviewed-by: Matthew Dempsky <mdempsky@google.com >
Run-TryBot: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Than McIntosh <thanm@google.com >
2023-10-11 10:27:03 +00:00
Gopher Robot
e3cc52e598
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: Ib80d50bdd762d1ba04f9267aeddc17272ef8cd66
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/532976
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Carlos Amedee <carlos@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
2023-10-05 15:12:11 +00:00
Nicola Murino
833695f0a5
ssh: add server side support for ping@openssh.com protocol extension
...
Fixes golang/go#62390
Change-Id: Ie4dc577fb55b45a0c26a9e2dc5903af2bd382e00
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/524775
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Matthew Dempsky <mdempsky@google.com >
Reviewed-by: Than McIntosh <thanm@google.com >
Run-TryBot: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
2023-10-04 16:04:50 +00:00
Sebastiaan van Stijn
ec07f4e35b
chacha20: drop Go 1.10 compatibility for arm64
...
Other packages already dropped compatibility with go < 1.12, so it should be safe to remove it for this package as well.
Change-Id: Ib1424763e3aa94d0187a667ebee058100136f53b
GitHub-Last-Rev: 51df9690a5f37ba50d5ae5e84cf31b78fb6c5cd8
GitHub-Pull-Request: golang/crypto#241
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/448241
Reviewed-by: Roland Shoemaker <roland@golang.org >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Than McIntosh <thanm@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Roland Shoemaker <roland@golang.org >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Joedian Reid <joedian@golang.org >
2023-09-28 17:58:46 +00:00
Sebastiaan van Stijn
b665ba6f6f
all: use crypto/ed25519 instead of golang.org/x/crypto/ed25519
...
This is a follow-up to CL 317169, which dropped go1.12 compatibility,
and made the golang.org/x/crypto/ed25519 package an alias / wrapper for
crypto/ed25519 in stdlib.
This patch updates uses within this repository to use stdlib instead of
depending on the wrapper. With this patch applied, the only remaining
use of the wrapper is in ed25519_test, which appears to be in place to
verify compatibility of the wrapper itself.
Change-Id: I0195396102a75ae20bdd82ca8ab59855c0eb5cea
GitHub-Last-Rev: 24dbec563cbd84bc47bdc7736b0245fc83dd3353
GitHub-Pull-Request: golang/crypto#238
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/448238
Reviewed-by: Bryan Mills <bcmills@google.com >
Run-TryBot: Nicola Murino <nicola.murino@gmail.com >
Reviewed-by: Nicola Murino <nicola.murino@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Joedian Reid <joedian@golang.org >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Than McIntosh <thanm@google.com >
2023-09-27 14:30:17 +00:00
Nicola Murino
a1aeb9b34e
ssh: add test cases for compatibility with old (buggy) clients
...
Improved test cases for CL 506835.
Change-Id: If4a98ae4a7b39d2e59b203d10080b71283e1a80e
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/525735
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Matthew Dempsky <mdempsky@google.com >
Run-TryBot: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
2023-09-20 18:10:32 +00:00
Nicola Murino
28c53ff63c
ssh: add MultiAlgorithmSigner
...
MultiAlgorithmSigner allows to restrict client-side, server-side and
certificate signing algorithms.
Fixes golang/go#52132
Fixes golang/go#36261
Change-Id: I295092f1bba647327aaaf294f110e9157d294159
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/508398
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Run-TryBot: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Matthew Dempsky <mdempsky@google.com >
2023-09-20 18:10:30 +00:00
Matthew Dempsky
3f0842a464
sha3: have ShakeHash extend hash.Hash
...
Package sha3 recommends the SHAKE functions for new uses, but this is
currently somewhat inconvenient because ShakeHash does not implement
hash.Hash. This is understandable, as SHAKE supports arbitrary-length
outputs whereas hash.Hash only supports fixed-length outputs. But
there's a natural fixed-length output to provide: the minimum output
that still provides SHAKE's full-strength generic security.
While here, tweak Sum so that its temporary buffer can be stack
allocated.
Also, tweak the panic message in Write so that the error text is more
readily understandable to Go programmers without needing to be
familiar with crypto jargon, and add a similar check in Sum.
Change-Id: Icf037d3990a71de5630f8825606614443f8c5245
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/526937
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Adam Langley <agl@google.com >
Auto-Submit: Matthew Dempsky <mdempsky@google.com >
2023-09-10 18:25:15 +00:00
Daniel Mangum
e90f1e17ee
cryptobyte: add uint48 methods
...
Adds uint48 methods for cryptobyte.Builder and cryptobyte.String.
Supporting 48-bit unsigned integers is useful for working with protocols
that use them for sequence numbers, such as DTLS.
Fixes golang/go#61275
Change-Id: Ibe49422d37644b9212b28b123dc5e01850f7b05b
GitHub-Last-Rev: 11b388c240109c8f4ac23880645c901ce6d2f093
GitHub-Pull-Request: golang/crypto#265
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/508675
Reviewed-by: Roland Shoemaker <roland@golang.org >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: qiulaidongfeng <2645477756@qq.com >
Run-TryBot: Roland Shoemaker <roland@golang.org >
Auto-Submit: Roland Shoemaker <roland@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
2023-09-07 16:27:37 +00:00
Mariano Cano
d359caa4a3
ssh: support for marshaling keys using the OpenSSH format
...
This adds methods to marshal private keys, encrypted and unencrypted
to the OpenSSH format.
Fixes golang/go#37132
Change-Id: I1a95301f789ce04858e6b147748c6e8b7700384b
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/218620
Run-TryBot: Roland Shoemaker <roland@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Auto-Submit: Roland Shoemaker <roland@golang.org >
2023-09-05 20:25:46 +00:00
Nicola Murino
c5370d2cc6
ssh: check the declared public key algo against decoded one
...
This check will ensure we don't accept e.g. ssh-rsa-cert-v01@openssh.com
algorithm with ssh-rsa public key type.
The algorithm and public key type must be consistent: both must be
certificate algorithms, or neither.
Change-Id: I1d75074fb4d6db3a8796408e98ddffe577a96ab1
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/506836
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Run-TryBot: Filippo Valsorda <filippo@golang.org >
2023-09-05 16:18:45 +00:00
Gopher Robot
0d375be9b6
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Change-Id: Ib391e4f2f09056cb025de97d5d8f2640859d9163
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/525335
Run-TryBot: Gopher Robot <gobot@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Heschi Kreinick <heschi@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2023-09-05 14:51:56 +00:00
Gopher Robot
b4ddeeda5b
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Once this CL is submitted, and post-submit testing succeeds on all
first-class ports across all supported Go versions, this repository
will be tagged with its next minor version.
Change-Id: Id40feba36dfc31c7033c91b952ec824a38e048ee
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/515976
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Heschi Kreinick <heschi@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Gopher Robot <gobot@golang.org >
2023-08-04 16:57:07 +00:00
Nicola Murino
edc325d13a
ssh: fix call to Fatalf from a non-test goroutine
...
Also fix some redundant type declarations.
Change-Id: Iad2950b67b1ec2e2590c59393b8ad15421ed3add
GitHub-Last-Rev: 41cf552f11387208491dee7b867050475043b25e
GitHub-Pull-Request: golang/crypto#263
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/505798
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: David Chase <drchase@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Run-TryBot: Filippo Valsorda <filippo@golang.org >
2023-07-31 18:14:41 +00:00
Nicola Murino
eab9315960
ssh: add diffie-hellman-group16-sha512 kex
...
This group is disabled by default because it is a bit slower than
the others.
The group18-sha512 variant is too slow to include.
Benchstat results including diffie-hellman-group18-sha512:
name time/op
Kexes/diffie-hellman-group-exchange-sha256-12 22.6ms ± 9%
Kexes/diffie-hellman-group18-sha512-12 1.15s ±11%
Kexes/ecdh-sha2-nistp384-12 3.91ms ± 6%
Kexes/ecdh-sha2-nistp256-12 304µs ± 5%
Kexes/curve25519-sha256@libssh.org-12 413µs ± 7%
Kexes/ecdh-sha2-nistp521-12 11.6ms ±13%
Kexes/curve25519-sha256-12 361µs ± 5%
Kexes/diffie-hellman-group-exchange-sha1-12 22.9ms ± 9%
Kexes/diffie-hellman-group1-sha1-12 3.59ms ± 6%
Kexes/diffie-hellman-group14-sha1-12 22.1ms ±11%
Kexes/diffie-hellman-group14-sha256-12 21.6ms ± 8%
Kexes/diffie-hellman-group16-sha512-12 138ms ± 9%
name alloc/op
Kexes/diffie-hellman-group-exchange-sha256-12 67.8kB ± 1%
Kexes/diffie-hellman-group18-sha512-12 243kB ± 9%
Kexes/ecdh-sha2-nistp384-12 13.9kB ± 0%
Kexes/ecdh-sha2-nistp256-12 12.1kB ± 0%
Kexes/curve25519-sha256@libssh.org-12 8.22kB ± 0%
Kexes/ecdh-sha2-nistp521-12 16.5kB ± 0%
Kexes/curve25519-sha256-12 8.22kB ± 0%
Kexes/diffie-hellman-group-exchange-sha1-12 67.5kB ± 0%
Kexes/diffie-hellman-group1-sha1-12 34.9kB ± 0%
Kexes/diffie-hellman-group14-sha1-12 61.9kB ± 0%
Kexes/diffie-hellman-group14-sha256-12 62.0kB ± 0%
Kexes/diffie-hellman-group16-sha512-12 117kB ± 0%
name allocs/op
Kexes/diffie-hellman-group-exchange-sha256-12 314 ± 0%
Kexes/diffie-hellman-group18-sha512-12 271 ± 4%
Kexes/ecdh-sha2-nistp384-12 243 ± 0%
Kexes/ecdh-sha2-nistp256-12 213 ± 0%
Kexes/curve25519-sha256@libssh.org-12 168 ± 0%
Kexes/ecdh-sha2-nistp521-12 245 ± 0%
Kexes/curve25519-sha256-12 168 ± 0%
Kexes/diffie-hellman-group-exchange-sha1-12 314 ± 0%
Kexes/diffie-hellman-group1-sha1-12 255 ± 0%
Kexes/diffie-hellman-group14-sha1-12 255 ± 0%
Kexes/diffie-hellman-group14-sha256-12 255 ± 0%
Kexes/diffie-hellman-group16-sha512-12 256 ± 0%
Change-Id: Id119401fda7e417675325f37e3d442e70585206c
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/506839
Run-TryBot: Filippo Valsorda <filippo@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
Reviewed-by: David Chase <drchase@google.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
2023-07-31 17:46:52 +00:00
Nicola Murino
ddfa82138e
ssh: ignore invalid MACs and KEXs just like we do for ciphers
...
Tighter validation could cause backwards incompatibility issues, eg
configurations with valid and invalid MACs, KEXs, ciphers currently work
if a supported algorithm is negotiated and that's also the scenario of
removing support for an existing algorithm.
Fixes golang/go#39397
Change-Id: If90253ba89e1d8f732cc1e1c3d24fe0a1e2dac71
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/512175
Run-TryBot: Han-Wen Nienhuys <hanwen@google.com >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Han-Wen Nienhuys <hanwen@google.com >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
Reviewed-by: David Chase <drchase@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2023-07-31 15:35:32 +00:00
Gopher Robot
d08e19beac
x509roots/fallback: update bundle
...
This is an automated CL which updates the NSS root bundle.
Change-Id: Ic70152e674c60e48e85d96eab244add9b4fa5eb8
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/512595
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Run-TryBot: Gopher Robot <gobot@golang.org >
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Roland Shoemaker <roland@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
2023-07-25 17:50:45 +00:00
Dmitri Shuralyov
12e1fcd8c0
internal/wycheproof: skip all tests in short test mode
...
The testdata for this package is around 8 MB and downloaded dynamically
via 'go mod download' from its canonical source rather than being copied
to this repository. We're moving towards disallowing all network use in
short test mode, including proxy.golang.org, so add a corresponding test
skip.
Needing to lookup a go test flag is unfortunate, but I don't know of a
less bad available option while the test does the download in TestMain.
On balance, it becomes viable to no longer disable the checksum database
since the test will only run on builders that permit internet use and so
sum.golang.org should just work.
Change-Id: Iaffe3899351da375928aaba114c4875f5438336b
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/510695
Run-TryBot: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org >
Reviewed-by: Heschi Kreinick <heschi@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2023-07-18 15:17:25 +00:00
Nicola Murino
3f8f0645c2
ssh: prefer sha256 based RSA key algorithms
...
sha256 is more optimized than sha512 in Go and is secure enough
so prefer sha256 over sha512.
Change-Id: I3fcf7457791e3ef4539e97049aa905dcd293499d
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/507556
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Run-TryBot: Filippo Valsorda <filippo@golang.org >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2023-07-14 16:27:34 +00:00
Nicola Murino
5df3b59941
ssh: disable client agent tests on Windows
...
ssh-agent is implemented as a Windows service and exposed on a
named pipe. We don't currently support it.
See golang/go#60981
Change-Id: Iebdc42db30b37a87ac0766231b16aff3f17b3f56
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/509035
Run-TryBot: Heschi Kreinick <heschi@google.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: Heschi Kreinick <heschi@google.com >
Auto-Submit: Heschi Kreinick <heschi@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2023-07-13 13:29:36 +00:00
Boshi Lian
2e82bdd171
fix TestValidTerminalMode: missing output from echo SHELL $SHELL
...
add leading `echo` to have better compatibility
before
```
go test -run ^TestValidTerminalMode -v
=== RUN TestValidTerminalMode
session_test.go:261: echo SHELL $SHELL && stty -a && exit:
Last login: Thu Jul 6 12:24:38 2023 from 192.168.200.1
SHELL /bin/bashubuntu:~$
speed 38400 baud; rows 80; columns 40;
line = 0;
intr = ^C; quit = ^\; erase = ^?;
kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>;
start = ^Q; stop = ^S; susp = ^Z;
rprnt = ^R; werase = ^W; lnext = ^V;
discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl
-cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck
-istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret
-ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten -echo echoe echok
-echonl -noflsh -xcase -tostop -echoprt
echoctl echoke -flusho -extproc
logout
session_test.go:266: missing output from echo SHELL $SHELL
```
after
```
go test -run ^TestValidTerminalMode -v
=== RUN TestValidTerminalMode
session_test.go:261: echo SHELL $SHELL && stty -a && exit:
Last login: Thu Jul 6 12:24:38 2023 from 192.168.200.1
bolian@ubuntu:~$
SHELL /bin/bash
speed 38400 baud; rows 80; columns 40;
line = 0;
intr = ^C; quit = ^\; erase = ^?;
kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>;
start = ^Q; stop = ^S; susp = ^Z;
rprnt = ^R; werase = ^W; lnext = ^V;
discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl
-cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck
-istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret
-ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten -echo echoe echok
-echonl -noflsh -xcase -tostop -echoprt
echoctl echoke -flusho -extproc
logout
--- PASS: TestValidTerminalMode (0.06s)
```
Change-Id: If60c040edb8c78a7d86bf58a6be47636d9e8f173
GitHub-Last-Rev: a2cc1b1af09e47df82fcb8685d829dfed945e8b0
GitHub-Pull-Request: golang/crypto#264
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/508115
Reviewed-by: Heschi Kreinick <heschi@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Heschi Kreinick <heschi@google.com >
Auto-Submit: Heschi Kreinick <heschi@google.com >
Reviewed-by: Bryan Mills <bcmills@google.com >
2023-07-11 16:17:43 +00:00
Nicola Murino
64e0e99383
ssh: fix RSA certificate and public key authentication with older clients
...
After adding support for rsa-sha2-256/512 on the server side some edge
cases started to arise with old clients:
1) public key authentication with gpg-agent < 2.2.6 fails because we
receive ssh-rsa as signature format and rsa-sha2-256 or rsa-sha2-512
as algorithm.
This is a bug in gpg-agent fixed in this commit:
https://github.com/gpg/gnupg/commit/80b775bdbb852aa4a80292c9357e5b1876110c00
2) certificate authentication fails with OpenSSH 7.2-7.7 because we
receive ssh-rsa-cert-v01@openssh.com as algorithm and rsa-sha2-256
or rsa-sha2-512 as signature format.
This patch is based on CL 412854 and has been tested with every version
of OpenSSH from 7.1 to 7.9 and OpenSSH 9.3.
Fixes golang/go#53391
Change-Id: Id71f596f73d84efb5c76d6d5388432cccad3e3b1
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/506835
Auto-Submit: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Run-TryBot: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2023-07-10 19:57:54 +00:00
Nicola Murino
23b1b90df2
ssh: prefer sha256 based MAC algorithms
...
sha256 is more optimized than sha512 in Go and is secure enough
so prefer sha256 over sha512.
Fixes golang/go#61138
Change-Id: I7658808655367f1ab5f4ac8b52e6b20bd30ebf87
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/507555
Run-TryBot: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Joedian Reid <joedian@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2023-07-05 20:33:07 +00:00
Gopher Robot
e98487292d
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Once this CL is submitted, and post-submit testing succeeds on all
first-class ports across all supported Go versions, this repository
will be tagged with its next minor version.
Change-Id: Icede82501a3703fcaad524f6b91ff6e5452b4547
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/507837
Reviewed-by: Heschi Kreinick <heschi@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Run-TryBot: Gopher Robot <gobot@golang.org >
Auto-Submit: Gopher Robot <gobot@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
2023-07-05 13:50:10 +00:00
Roland Shoemaker
183630ada7
x509roots: generate a stable sort, for real this time
...
Sort based on the stringified subject, then break ties based on the raw
DER (which will, actually, be unique this time).
Change-Id: I3dd912fb19b103e92fabfb4562e31c6dcec40614
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/505695
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Roland Shoemaker <roland@golang.org >
2023-06-23 17:05:55 +00:00
Dmitri Shuralyov
a9e447dde7
x509roots/fallback: add //go:build go1.20 to bundle.go
...
Package fallback has no API; its only purpose is to automatically call
x509.SetFallbackRoots with a set of fallback roots. That API was added
in Go 1.20, hence the go1.20 build constraint in fallback.go.
Add that constraint to bundle.go too, so that it fails to build rather
than quietly being a no-op in Go 1.19.
Also simplify Write(fmt.Sprintf()) into fmt.Fprintf while here.
Add a temporary workaround for go.dev/issue/52287.
It has no effect on the public API in this module.
For golang/go#57792 .
For golang/go#52287 .
Change-Id: I1fe13f7d54b07b0b031e8bae685cffd7a8160165
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/505578
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org >
2023-06-23 16:46:51 +00:00
Stan Hu
64c3993f5c
ssh: add hmac-sha2-512
...
This adds support for hmac-sha2-512 to ensure compatibility with SSH clients that request this MAC algorithm.
This rebases https://github.com/golang/crypto/pull/18 .
Change-Id: Ia103c10a8b7e2e8dde556d5c36550eb5fa6bc1f6
GitHub-Last-Rev: 987ccae2bc7ae5e90a482d8797351c39dcb9bf33
GitHub-Pull-Request: golang/crypto#257
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/501455
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Commit-Queue: Han-Wen Nienhuys <hanwen@google.com >
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Han-Wen Nienhuys <hanwen@google.com >
Run-TryBot: Han-Wen Nienhuys <hanwen@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2023-06-22 14:36:59 +00:00
Roland Shoemaker
5fe8145aca
x509roots: remove list hash and generation date, change ordering
...
This makes the automated update workflow simpler.
Also switch the ordering from human readable subject (which is not
necessarily unique), to the raw SPKI (which should always be unique).
This makes it somewhat harder to read to a human (since it'll appear a
little jumbled) but results in a stable sort.
Note this results in adding two new roots, which were added since we
last generated the bundle.
Change-Id: Id4d34bf9e98164e7b2fc4f06f9b46b63c0013d23
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/504597
Run-TryBot: Roland Shoemaker <roland@golang.org >
Reviewed-by: Heschi Kreinick <heschi@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2023-06-20 21:21:47 +00:00
Roland Shoemaker
043e94c17a
x509roots: fix generate script argument checking
...
Check for supply of both arguments forgot that the URL is set by
default. Instead just let the local path supersede the URL.
Change-Id: I0499137c99c735e8e453ff1c2a925435f3cd8039
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/504596
Run-TryBot: Roland Shoemaker <roland@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Roland Shoemaker <roland@golang.org >
2023-06-20 18:34:45 +00:00
Roland Shoemaker
0d502d7cd6
x509roots: use "generate" build tag
...
Since go generate sets it automatically.
Change-Id: I4623e523392140c0472b250ac99c8c3fa31e5b15
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/504595
Auto-Submit: Roland Shoemaker <roland@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
Run-TryBot: Roland Shoemaker <roland@golang.org >
2023-06-20 18:28:47 +00:00
Bryan C. Mills
0ff60057bb
ssh/test: set a timeout and WaitDelay on sshd subcommands
...
This uses a copy of testenv.Command copied from the main repo, with
light edits to allow the testenv helpers to build with Go 1.19.
The testenv helper revealed an exec.Command leak in TestCertLogin, so
we also fix that leak and simplify server cleanup using
testing.T.Cleanup.
For golang/go#60099 .
Fixes golang/go#60343 .
Change-Id: I7f79fcdb559498b987ee7689972ac53b83870aaf
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/496935
Auto-Submit: Bryan Mills <bcmills@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Run-TryBot: Bryan Mills <bcmills@google.com >
2023-06-15 16:06:57 +00:00
Gopher Robot
8e447d8cc5
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Once this CL is submitted, and post-submit testing succeeds on all
first-class ports across all supported Go versions, this repository
will be tagged with its next minor version.
Change-Id: If19e251a79af033583e6968766b7a831741cebb7
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/502518
Reviewed-by: Heschi Kreinick <heschi@google.com >
Run-TryBot: Gopher Robot <gobot@golang.org >
Reviewed-by: Carlos Amedee <carlos@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Gopher Robot <gobot@golang.org >
2023-06-12 19:51:08 +00:00
Heschi Kreinick
22c9997952
go.mod: tell x repo tagging to ignore dep on net
...
CL 475438 introduced a cycle between net and crypto. This direction is
less important, so have the tagging process ignore it.
Change-Id: Ie424fef0238702a5a16aba79bb60f86f39dc66eb
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/502595
Auto-Submit: Heschi Kreinick <heschi@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Damien Neil <dneil@google.com >
Run-TryBot: Heschi Kreinick <heschi@google.com >
2023-06-12 17:20:30 +00:00
Roland Shoemaker
d0b316056b
x509roots: add new module
...
Adds the nss parser, under x509roots/nss, and the fallback
module/package, with the initial generated bundle.
Fixes golang/go#57792
Change-Id: Iebb1052e49126fa5baba1236f4ebc8dd8a823179
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/462036
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Roland Shoemaker <roland@golang.org >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Damien Neil <dneil@google.com >
Auto-Submit: Roland Shoemaker <roland@golang.org >
2023-06-09 17:23:14 +00:00
Stefan Klein
16222386f4
Add support for "hmac-sha2-512-etm@openssh.com"
...
Change-Id: I0203881afd7ad72e68f76650817451d7e292c91b
GitHub-Last-Rev: 42b4119e1987e7a46aa06a2b142d5fd3ef6f216a
GitHub-Pull-Request: golang/crypto#129
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/226982
Run-TryBot: Han-Wen Nienhuys <hanwen@google.com >
Reviewed-by: Han-Wen Nienhuys <hanwen@google.com >
Auto-Submit: Han-Wen Nienhuys <hanwen@google.com >
Reviewed-by: David Chase <drchase@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2023-06-05 16:42:04 +00:00
Gopher Robot
a4e984136a
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Once this CL is submitted, and post-submit testing succeeds on all
first-class ports across all supported Go versions, this repository
will be tagged with its next minor version.
Change-Id: I1eb2365549b72cbad23fa7c355f427c6ed75e450
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/493575
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Gopher Robot <gobot@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Run-TryBot: Gopher Robot <gobot@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
Reviewed-by: Heschi Kreinick <heschi@google.com >
2023-05-08 17:07:49 +00:00
Tobias Klauser
3ef8056490
ssh/test: enable on solaris
...
Change-Id: Icf9c867e64ef68f6f46dd7d4cec07cf7c315c2ad
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/490155
Reviewed-by: Bryan Mills <bcmills@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
2023-05-04 16:27:40 +00:00
Tobias Klauser
a8cc953517
ssh: skip unsupported tests on wasip1
...
Updates golang/go#32840
Updates golang/go#58141
Change-Id: Ib4425c1743d417920745205586af250dbf80c7e4
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/485695
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Bryan Mills <bcmills@google.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
2023-04-18 17:07:48 +00:00
Bryan C. Mills
7d6d3f5d4a
ssh/test: skip TestValidTerminalMode on non-Bourne shells
...
Fixes golang/go#38037 .
Change-Id: Ide77dddc9f57b3f0318a419a1474e11215623b64
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/485175
Run-TryBot: Bryan Mills <bcmills@google.com >
Commit-Queue: Bryan Mills <bcmills@google.com >
Auto-Submit: Bryan Mills <bcmills@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2023-04-17 17:20:41 +00:00
Mateusz Poliwczak
1faeef9713
cryptobyte: reject Object Identifiers with leading 0x80
...
Change-Id: Ie3a1b53e801077cd86963799e644b9783943933c
GitHub-Last-Rev: 6629bd74f1874eb9fde8e72bfb444ebf9073a1ab
GitHub-Pull-Request: golang/crypto#255
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/483955
Run-TryBot: Mateusz Poliwczak <mpoliwczak34@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Run-TryBot: Ian Lance Taylor <iant@google.com >
2023-04-12 18:30:42 +00:00
Gopher Robot
00fd4ff485
go.mod: update golang.org/x dependencies
...
Update golang.org/x dependencies to their latest tagged versions.
Once this CL is submitted, and post-submit testing succeeds on all
first-class ports across all supported Go versions, this repository
will be tagged with its next minor version.
Change-Id: I568d040817345a10881c31b8efc296f543e59113
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/482855
Reviewed-by: Heschi Kreinick <heschi@google.com >
Auto-Submit: Gopher Robot <gobot@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Gopher Robot <gobot@golang.org >
Reviewed-by: Carlos Amedee <carlos@golang.org >
2023-04-06 17:52:09 +00:00
cui fliter
018c28f8a1
all: fix some comments
...
Change-Id: Ia0410f1f3bb0a9ee68c6dbe1e6f62f65f9e00955
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/477755
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Auto-Submit: Roland Shoemaker <roland@golang.org >
Run-TryBot: shuang cui <imcusg@gmail.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2023-03-20 20:33:29 +00:00
Filippo Valsorda
9cd0187c09
curve25519: use crypto/ecdh on Go 1.20
...
For golang/go#52221
Change-Id: I27e867d4cc89cd52c8d510f0dbab4e89b7cd4763
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/451115
Auto-Submit: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Cherry Mui <cherryyz@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Filippo Valsorda <filippo@golang.org >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2023-03-13 18:33:59 +00:00
Anmol Sethi
c6a20f9984
ssh: document that ParseRawPrivateKey supports Ed25519 keys
...
From CL 173457 and CL 235358.
Change-Id: Ia46ab9c7e2c57472df3126ddc7050f0068fcaab9
GitHub-Last-Rev: c38e379355602fe4ff11ff65f98c296d5c326281
GitHub-Pull-Request: golang/crypto#146
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/241282
Auto-Submit: Han-Wen Nienhuys <hanwen@google.com >
Reviewed-by: Bryan Mills <bcmills@google.com >
Reviewed-by: Han-Wen Nienhuys <hanwen@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Han-Wen Nienhuys <hanwen@google.com >
2023-03-13 12:45:00 +00:00