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 >
v0.38.0
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 >
v0.37.0
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 >
v0.36.0
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 >
v0.35.0
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 >
v0.34.0
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 >
v0.33.0
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 >
v0.32.0
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 >
v0.31.0
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 >
v0.30.0
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