Skip to content

Commit

Permalink
keystore: Aptos should use blake2b since blake2s is unavailable
Browse files Browse the repository at this point in the history
Blake2b costs about a third of SHA2/SHA3/keccak256

https://aptos.dev/en/build/smart-contracts/cryptography
  • Loading branch information
archseer committed Jul 16, 2024
1 parent dd494d7 commit 75cab0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/services/keystore/keys/ocr2key/aptos_keyring.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/hdevalence/ed25519consensus"
"github.com/pkg/errors"
"golang.org/x/crypto/blake2s"
"golang.org/x/crypto/blake2b"

"github.com/smartcontractkit/chainlink/v2/core/utils"

Expand Down Expand Up @@ -37,7 +37,7 @@ func (akr *aptosKeyring) PublicKey() ocrtypes.OnchainPublicKey {

func (akr *aptosKeyring) reportToSigData(reportCtx ocrtypes.ReportContext, report ocrtypes.Report) ([]byte, error) {
rawReportContext := evmutil.RawReportContext(reportCtx)
h, err := blake2s.New256(nil)
h, err := blake2b.New256(nil)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 75cab0f

Please sign in to comment.