diff --git a/Cargo.lock b/Cargo.lock index 77521540b..d35d3d438 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6543,6 +6543,7 @@ dependencies = [ "rand 0.8.5", "serde", "sha2 0.10.8", + "sha3", "sp1-lib", "sp1-primitives", ] diff --git a/crates/zkvm/entrypoint/Cargo.toml b/crates/zkvm/entrypoint/Cargo.toml index e24ef6b10..2859eac7b 100644 --- a/crates/zkvm/entrypoint/Cargo.toml +++ b/crates/zkvm/entrypoint/Cargo.toml @@ -18,6 +18,7 @@ rand = "0.8.5" serde = { version = "1.0.204", features = ["derive"] } libm = { version = "0.2.8", optional = true } sha2 = { version = "0.10.8" } +sha3 = { version = "0.10.8" } lazy_static = "1.5.0" # optional diff --git a/crates/zkvm/entrypoint/src/lib.rs b/crates/zkvm/entrypoint/src/lib.rs index c49e856d1..9a43e494f 100644 --- a/crates/zkvm/entrypoint/src/lib.rs +++ b/crates/zkvm/entrypoint/src/lib.rs @@ -25,7 +25,7 @@ mod zkvm { use crate::syscalls::syscall_halt; use cfg_if::cfg_if; - use sha2::{Digest, Sha256}; + use sha3::{Digest, Keccak256}; cfg_if! { if #[cfg(feature = "verify")] { @@ -36,13 +36,13 @@ mod zkvm { } } - pub static mut PUBLIC_VALUES_HASHER: Option = None; + pub static mut PUBLIC_VALUES_HASHER: Option = None; #[cfg(not(feature = "interface"))] #[no_mangle] unsafe extern "C" fn __start() { { - PUBLIC_VALUES_HASHER = Some(Sha256::new()); + PUBLIC_VALUES_HASHER = Some(Keccak256::new()); #[cfg(feature = "verify")] { DEFERRED_PROOFS_DIGEST = Some([BabyBear::zero(); 8]);