use included sha (#47)

This commit is contained in:
Giacomo Pasini 2025-01-07 11:27:01 +01:00 committed by GitHub
parent 236a0d0d47
commit 573ffab7a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 14 additions and 15 deletions

View File

@ -12,5 +12,6 @@ rand = "0.8.5"
rand_core = "0.6.0"
hex = "0.4.3"
curve25519-dalek = {version = "4.1", features = ["serde", "digest", "rand_core"]}
sha2 = "0.10"
lazy_static = "1.5.0"
lazy_static = "1.5.0"
risc0-zkvm = "1.2"
sha2 = "0.10"

View File

@ -1,6 +1,6 @@
use rand_core::CryptoRngCore;
use risc0_zkvm::sha::rust_crypto::{Digest, Sha256};
use serde::{Deserialize, Serialize};
use sha2::{Digest, Sha256};
use crate::cl::PartialTxWitness;

View File

@ -11,7 +11,7 @@ use crate::{
zone_layer::notes::ZoneId,
};
use serde::{Deserialize, Serialize};
use sha2::{Digest, Sha256};
use risc0_zkvm::sha::rust_crypto::{Digest, Sha256};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub struct Input {

View File

@ -1,5 +1,5 @@
use serde::{Deserialize, Serialize};
use sha2::{Digest, Sha256};
use risc0_zkvm::sha::rust_crypto::{Digest, Sha256};
pub fn padded_leaves<const N: usize>(elements: &[Vec<u8>]) -> [[u8; 32]; N] {
let mut leaves = [[0u8; 32]; N];

View File

@ -1,6 +1,6 @@
use crate::cl::merkle;
use risc0_zkvm::sha::rust_crypto::{Digest, Sha256};
use serde::{Deserialize, Serialize};
use sha2::{Digest, Sha256};
#[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)]
pub struct MMR {

View File

@ -1,8 +1,7 @@
use rand::RngCore;
use serde::{Deserialize, Serialize};
use sha2::{Digest, Sha256};
use crate::cl::{balance::Unit, nullifier::NullifierCommitment};
use rand::RngCore;
use risc0_zkvm::sha::rust_crypto::{Digest, Sha256};
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub struct Constraint(pub [u8; 32]);

View File

@ -8,7 +8,7 @@
use rand_core::RngCore;
use serde::{Deserialize, Serialize};
use sha2::{Digest, Sha256};
use risc0_zkvm::sha::rust_crypto::{Digest, Sha256};
use crate::cl::NoteCommitment;

View File

@ -14,5 +14,4 @@ risc0-zkvm = { version = "1.0", features = ["prove", "metal"] }
risc0-groth16 = { version = "1.0" }
rand = "0.8.5"
rand_core = "0.6.0"
thiserror = "1.0.62"
sha2 = "0.10"
thiserror = "1.0.62"

View File

@ -6,4 +6,4 @@ edition = "2021"
[dependencies]
cl = { path = "../cl" }
serde = { version = "1.0", features = ["derive"] }
sha2 = "0.10"
risc0-zkvm = "1.2"

View File

@ -4,8 +4,8 @@ use cl::{
cl::{BalanceWitness, NoteCommitment, Nullifier},
zone_layer::notes::ZoneId,
};
use risc0_zkvm::sha::rust_crypto::{Digest, Sha256};
use serde::{Deserialize, Serialize};
use sha2::{Digest, Sha256};
use crate::ptx::PtxPublic;