Skip to content

Commit

Permalink
hack pv digest into keccak
Browse files Browse the repository at this point in the history
  • Loading branch information
noel2004 committed Sep 23, 2024
1 parent 8db9e57 commit d61b29a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/zkvm/entrypoint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions crates/zkvm/entrypoint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")] {
Expand All @@ -36,13 +36,13 @@ mod zkvm {
}
}

pub static mut PUBLIC_VALUES_HASHER: Option<Sha256> = None;
pub static mut PUBLIC_VALUES_HASHER: Option<Keccak256> = 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]);
Expand Down

0 comments on commit d61b29a

Please sign in to comment.