Skip to content

feat: use old golang.org/x/crypto v0.43.0 with asm optimized sha3#5364

Draft
janos wants to merge 1 commit intomasterfrom
legacy-keccak-amd64-asm
Draft

feat: use old golang.org/x/crypto v0.43.0 with asm optimized sha3#5364
janos wants to merge 1 commit intomasterfrom
legacy-keccak-amd64-asm

Conversation

@janos
Copy link
Member

@janos janos commented Feb 12, 2026

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

This PR addresses the problem with removed asm optimized sha3 package for amd64 architecture.

Package golang.org/x/crypto removed optimized files in version 0.44.0 which leaves its version 0.43.0 the latest one with more performant legacy keccak 256 implementation:

https://cs.opensource.google/go/x/crypto/+/refs/tags/v0.43.0:sha3/
https://cs.opensource.google/go/x/crypto/+/refs/tags/v0.44.0:sha3/

Some project decided to fork the implementation such as go-ethereum ethereum/go-ethereum#33323 and filecoin https://github.com/filecoin-project/go-keccak, but in this PR, an already published golang.org/x/crypto v0.43.0 is used with the help of go.mod replace directive to avoid any possibility of compromizing the hash function in the forked code.

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant