Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solana: align with keccak hashing #463

Merged
merged 1 commit into from
Jan 21, 2025
Merged

solana: align with keccak hashing #463

merged 1 commit into from
Jan 21, 2025

Conversation

aalu1418
Copy link
Collaborator

No description provided.

@aalu1418 aalu1418 requested a review from a team as a code owner January 16, 2025 22:30
@@ -19,7 +19,7 @@ import (
var leafDomainSeparator = [32]byte{}

func HashCommitReport(ctx [3][32]byte, report ccip_router.CommitInput) ([]byte, error) {
hash := sha256.New()
hash := sha3.NewLegacyKeccak256()
Copy link
Contributor

Choose a reason for hiding this comment

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

why legacy?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's the one that MCMS also uses - the sha3 package only exports keccak hashing via the legacy function

https://pkg.go.dev/golang.org/x/crypto/sha3#NewLegacyKeccak256

Copy link

Metric solana/ccip-keccak main
Coverage 76.7% 76.6%

@aalu1418 aalu1418 merged commit 2c505d8 into main Jan 21, 2025
17 checks passed
@aalu1418 aalu1418 deleted the solana/ccip-keccak branch January 21, 2025 18:15
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.

2 participants