diff --git a/crypto/keccak_ziren.go b/crypto/keccak_ziren.go index 8e967c6dbf..2429012e92 100644 --- a/crypto/keccak_ziren.go +++ b/crypto/keccak_ziren.go @@ -21,6 +21,7 @@ package crypto import ( "github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto/keccak" ) // zirenKeccakState implements the KeccakState interface using the Ziren zkvm_runtime. @@ -31,7 +32,7 @@ type zirenKeccakState struct { dirty bool // whether new data has been written since last hash } -func newZirenKeccakState() KeccakState { +func newZirenKeccakState() keccak.KeccakState { return &zirenKeccakState{ buf: make([]byte, 0, 512), // pre-allocate reasonable capacity } @@ -85,7 +86,7 @@ func (s *zirenKeccakState) computeHashIfNeeded() { // NewKeccakState creates a new KeccakState // This uses a Ziren-optimized implementation that leverages the zkvm_runtime.Keccak256 system call. -func NewKeccakState() KeccakState { +func NewKeccakState() keccak.KeccakState { return newZirenKeccakState() }