Skip to content

chore(deps): replace golang.org/x/crypto/sha3 with go-keccak, upgrade x/crypto#13477

Merged
rvagg merged 1 commit intomasterfrom
rvagg/keccak
Jan 29, 2026
Merged

chore(deps): replace golang.org/x/crypto/sha3 with go-keccak, upgrade x/crypto#13477
rvagg merged 1 commit intomasterfrom
rvagg/keccak

Conversation

@rvagg
Copy link
Copy Markdown
Member

@rvagg rvagg commented Jan 28, 2026

Replace all usage of golang.org/x/crypto/sha3.NewLegacyKeccak256() with github.com/filecoin-project/go-keccak, which vendors the assembly-optimised Keccak permutation from x/crypto@v0.43.0. Starting with x/crypto v0.44.0, the upstream package removed its amd64 assembly in favor of Go's standard library crypto/sha3, which does not provide an assembly fast path for legacy Keccak functions.

With the keccak dependency decoupled, upgrade golang.org/x/crypto to v0.47.0.

Ref: filecoin-project/go-f3#1055
Ref: ethereum/go-ethereum#33323
Closes: #13476
Closes: #13443

Copilot AI review requested due to automatic review settings January 28, 2026 01:29
@rvagg rvagg added the skip/changelog This change does not require CHANGELOG.md update label Jan 28, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FilOz Jan 28, 2026
@rvagg rvagg requested a review from Kubuxu January 28, 2026 01:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request replaces the usage of golang.org/x/crypto/sha3.NewLegacyKeccak256() with github.com/filecoin-project/go-keccak across the codebase and upgrades golang.org/x/crypto to v0.47.0. This change is necessary because starting with x/crypto v0.44.0, the upstream package removed its AMD64 assembly optimization for legacy Keccak functions in favor of Go's standard library crypto/sha3, which doesn't provide fast paths for legacy Keccak operations.

Changes:

  • Replaced all imports of golang.org/x/crypto/sha3 with github.com/filecoin-project/go-keccak across 8 files
  • Updated all function calls from sha3.NewLegacyKeccak256() to keccak.NewLegacyKeccak256()
  • Added github.com/filecoin-project/go-keccak v0.1.0 as a new dependency
  • Upgraded golang.org/x/crypto from v0.45.0 to v0.47.0 along with other golang.org/x/* dependencies

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/sigs/delegated/init.go Updated imports and keccak calls in delegated signature signing and verification
itests/kit/solidity.go Updated keccak usage in Solidity test helper functions
itests/kit/evm.go Updated keccak usage in EVM test utilities
itests/fevm_address_test.go Updated keccak usage in FEVM address testing
itests/eth_deploy_test.go Updated keccak usage in Ethereum deployment tests
chain/types/ethtypes/eth_types.go Updated keccak usage in Ethereum type definitions and utilities
chain/types/ethtypes/eth_transactions.go Updated keccak usage in Ethereum transaction handling
chain/types/ethtypes/eth_1559_transactions_test.go Updated keccak usage in EIP-1559 transaction tests
go.mod Added go-keccak dependency and upgraded golang.org/x/* packages
go.sum Updated checksums for new and upgraded dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread go.mod Outdated
… x/crypto

Replace all usage of golang.org/x/crypto/sha3.NewLegacyKeccak256() with
github.com/filecoin-project/go-keccak, which vendors the assembly-optimised
Keccak permutation from x/crypto@v0.43.0. Starting with x/crypto v0.44.0,
the upstream package removed its amd64 assembly in favor of Go's standard
library crypto/sha3, which does not provide an assembly fast path for
legacy Keccak functions.

With the keccak dependency decoupled, upgrade golang.org/x/crypto to v0.47.0.

Ref: filecoin-project/go-f3#1055
Ref: #13443
Ref: ethereum/go-ethereum#33323
@github-project-automation github-project-automation Bot moved this from 📌 Triage to ✔️ Approved by reviewer in FilOz Jan 28, 2026
@rvagg rvagg merged commit 034217e into master Jan 29, 2026
99 checks passed
@rvagg rvagg deleted the rvagg/keccak branch January 29, 2026 12:53
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FilOz Jan 29, 2026
rjan90 pushed a commit that referenced this pull request Feb 5, 2026
… x/crypto (#13477)

Replace all usage of golang.org/x/crypto/sha3.NewLegacyKeccak256() with
github.com/filecoin-project/go-keccak, which vendors the assembly-optimised
Keccak permutation from x/crypto@v0.43.0. Starting with x/crypto v0.44.0,
the upstream package removed its amd64 assembly in favor of Go's standard
library crypto/sha3, which does not provide an assembly fast path for
legacy Keccak functions.

With the keccak dependency decoupled, upgrade golang.org/x/crypto to v0.47.0.

Ref: filecoin-project/go-f3#1055
Ref: ethereum/go-ethereum#33323
Closes: #13476
Closes: #13443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip/changelog This change does not require CHANGELOG.md update

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

Downgrade golang.org/x/crypto to v0.44.0 (or use fork)

3 participants