1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00
This commit is contained in:
sdeml 2019-01-15 11:53:06 +01:00
parent c0db24bb79
commit 809e2f4018
3 changed files with 4 additions and 4 deletions

View file

@ -7,7 +7,7 @@ use zokrates_field::field::Field;
#[derive(Clone, PartialEq, Debug, Serialize, Deserialize)]
pub enum LibsnarkGadgetHelper {
Sha256Round
Sha256Round,
}
impl fmt::Display for LibsnarkGadgetHelper {
@ -42,7 +42,7 @@ impl<T: Field> Executable<T> for LibsnarkGadgetHelper {
impl Signed for LibsnarkGadgetHelper {
fn get_signature(&self) -> (usize, usize) {
match self {
LibsnarkGadgetHelper::Sha256Round => (768, 25817)
LibsnarkGadgetHelper::Sha256Round => (768, 25817),
}
}
}

View file

@ -154,7 +154,7 @@ mod tests {
0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1,
1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1,
0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1,
1, 0, 0, 1
1, 0, 0, 1,
];
let r = sha
.execute(&inputs.iter().map(|&i| FieldPrime::from(i)).collect())

View file

@ -127,7 +127,7 @@ impl Importer {
#[cfg(feature = "libsnark")]
{
use helpers::LibsnarkGadgetHelper;
use libsnark::{get_sha256round_constraints};
use libsnark::get_sha256round_constraints;
use serde_json::from_str;
use standard::{DirectiveR1CS, R1CS};
use std::io::BufReader;