<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go-x-crypto, branch v0.31.0</title>
<subtitle>Fork of golang.org/x/crypto with my patches.</subtitle>
<id>http://git.kilabit.info/go-x-crypto/atom?h=v0.31.0</id>
<link rel='self' href='http://git.kilabit.info/go-x-crypto/atom?h=v0.31.0'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/'/>
<updated>2024-12-11T17:50:49Z</updated>
<entry>
<title>ssh: make the public key cache a 1-entry FIFO cache</title>
<updated>2024-12-11T17:50:49Z</updated>
<author>
<name>Roland Shoemaker</name>
<email>roland@golang.org</email>
</author>
<published>2024-12-03T17:03:03Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/commit/?id=b4f1988a35dee11ec3e05d6bf3e90b695fbd8909'/>
<id>urn:sha1:b4f1988a35dee11ec3e05d6bf3e90b695fbd8909</id>
<content type='text'>
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 &lt;roland@golang.org&gt;
Auto-Submit: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Nicola Murino &lt;nicola.murino@gmail.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>openpgp/clearsign: just use rand.Reader in tests</title>
<updated>2024-12-04T19:36:17Z</updated>
<author>
<name>Roland Shoemaker</name>
<email>roland@golang.org</email>
</author>
<published>2024-12-04T18:46:07Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/commit/?id=7042ebcbe097f305ba3a93f9a22b4befa4b83d29'/>
<id>urn:sha1:7042ebcbe097f305ba3a93f9a22b4befa4b83d29</id>
<content type='text'>
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 &lt;tatianabradley@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Auto-Submit: Roland Shoemaker &lt;roland@golang.org&gt;
Reviewed-by: Filippo Valsorda &lt;filippo@golang.org&gt;
</content>
</entry>
<entry>
<title>go.mod: update golang.org/x dependencies</title>
<updated>2024-12-04T16:35:48Z</updated>
<author>
<name>Gopher Robot</name>
<email>gobot@golang.org</email>
</author>
<published>2024-12-04T16:27:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/commit/?id=3e90321ac7bcee3d924ed63ed3ad97be2079cb56'/>
<id>urn:sha1:3e90321ac7bcee3d924ed63ed3ad97be2079cb56</id>
<content type='text'>
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 &lt;drchase@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Auto-Submit: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>x509roots/fallback: update bundle</title>
<updated>2024-11-27T18:44:53Z</updated>
<author>
<name>Gopher Robot</name>
<email>gobot@golang.org</email>
</author>
<published>2024-11-25T16:01:21Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/commit/?id=8c4e668694ccbaa1be4785da7e7a40f2ef93152b'/>
<id>urn:sha1:8c4e668694ccbaa1be4785da7e7a40f2ef93152b</id>
<content type='text'>
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 &lt;gobot@golang.org&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Reviewed-by: Roland Shoemaker &lt;roland@golang.org&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>go.mod: update golang.org/x dependencies</title>
<updated>2024-11-07T22:54:53Z</updated>
<author>
<name>Gopher Robot</name>
<email>gobot@golang.org</email>
</author>
<published>2024-11-07T22:09:40Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/commit/?id=6018723c74059e3b91c84268b212c2f6cdab1f64'/>
<id>urn:sha1:6018723c74059e3b91c84268b212c2f6cdab1f64</id>
<content type='text'>
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 &lt;drchase@google.com&gt;
Auto-Submit: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>README: don't recommend go get</title>
<updated>2024-11-04T00:10:25Z</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2024-10-31T22:31:36Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/commit/?id=71ed71b4faf97caafd1863fed003e9ac311f10ee'/>
<id>urn:sha1:71ed71b4faf97caafd1863fed003e9ac311f10ee</id>
<content type='text'>
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 &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Commit-Queue: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Roland Shoemaker &lt;roland@golang.org&gt;
</content>
</entry>
<entry>
<title>sha3: add MarshalBinary, AppendBinary, and UnmarshalBinary</title>
<updated>2024-10-22T19:51:02Z</updated>
<author>
<name>Filippo Valsorda</name>
<email>filippo@golang.org</email>
</author>
<published>2024-09-30T11:39:09Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/commit/?id=750a45fe5e473d5afa193e9088f3d135e64eca26'/>
<id>urn:sha1:750a45fe5e473d5afa193e9088f3d135e64eca26</id>
<content type='text'>
Fixes golang/go#24617

Change-Id: I1d9d529950aa8a5953435e8d3412cda44b075d55
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/616635
Reviewed-by: Roland Shoemaker &lt;roland@golang.org&gt;
Auto-Submit: Filippo Valsorda &lt;filippo@golang.org&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Daniel McCarney &lt;daniel@binaryparadox.net&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>sha3: avoid trailing permutation</title>
<updated>2024-10-22T19:50:23Z</updated>
<author>
<name>Filippo Valsorda</name>
<email>filippo@golang.org</email>
</author>
<published>2024-10-02T10:44:13Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/commit/?id=36b172546bd03a74c79e109ec84c599b672ea9e4'/>
<id>urn:sha1:36b172546bd03a74c79e109ec84c599b672ea9e4</id>
<content type='text'>
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 &lt;daniel@binaryparadox.net&gt;
Reviewed-by: Roland Shoemaker &lt;roland@golang.org&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
Auto-Submit: Filippo Valsorda &lt;filippo@golang.org&gt;
</content>
</entry>
<entry>
<title>sha3: fix padding for long cSHAKE parameters</title>
<updated>2024-10-22T19:50:19Z</updated>
<author>
<name>Filippo Valsorda</name>
<email>filippo@golang.org</email>
</author>
<published>2024-09-29T22:57:48Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/commit/?id=80ea76eb17c0c52f5d5d04e833d6aeb6b062d81d'/>
<id>urn:sha1:80ea76eb17c0c52f5d5d04e833d6aeb6b062d81d</id>
<content type='text'>
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 &lt;andrew.ekstedt@gmail.com&gt;
Reviewed-by: Daniel McCarney &lt;daniel@binaryparadox.net&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Auto-Submit: Filippo Valsorda &lt;filippo@golang.org&gt;
Reviewed-by: Roland Shoemaker &lt;roland@golang.org&gt;
</content>
</entry>
<entry>
<title>sha3: avoid buffer copy</title>
<updated>2024-10-21T19:02:20Z</updated>
<author>
<name>Filippo Valsorda</name>
<email>filippo@golang.org</email>
</author>
<published>2024-09-29T21:27:16Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/commit/?id=c17aa50fbd32393e5d52fa65ca51cbfff0a75aea'/>
<id>urn:sha1:c17aa50fbd32393e5d52fa65ca51cbfff0a75aea</id>
<content type='text'>
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 &lt;daniel@binaryparadox.net&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Roland Shoemaker &lt;roland@golang.org&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Auto-Submit: Filippo Valsorda &lt;filippo@golang.org&gt;
Reviewed-by: Andrew Ekstedt &lt;andrew.ekstedt@gmail.com&gt;
</content>
</entry>
</feed>
