Skip to content

Commit

Permalink
Remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Mactherobot committed Nov 29, 2023
1 parent 1de1123 commit 6e7aaba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ impl Node {
/// Converts an array of boolean values, representing the
/// input of Alice or Bob, into input nodes, to be used in
/// the boolean circuit.
#[allow(dead_code)]
pub fn as_nodes(arr: [Nat; 3], modulus: NonZero<Nat>) -> [Node; 3] {
// Sample random bits
let mut buf = [0];
Expand Down Expand Up @@ -149,7 +150,6 @@ mod tests {

use crate::{
circuit::{deal_rands, push_node, Circuit, Rands},
groups::GroupSpec,
nat::{mul_mod, Nat},
node::{Const, Node},
shares::Shares,
Expand Down Expand Up @@ -379,4 +379,3 @@ mod tests {
}
}
}

8 changes: 4 additions & 4 deletions src/schnorr.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::env;

use crypto_bigint::Encoding;
use sha2::{Digest, Sha256, Sha512};
use sha2::{Digest, Sha256};

use crate::{
circuit::{push_node, Circuit},
Expand Down Expand Up @@ -51,10 +51,10 @@ pub fn run_schnorr(m: Nat, verbose: bool) {
let sk_share = Shares::new(&sk, group.q);

// Construct net schnorr circuit
let curcuit = schnorr_circuit(r_shares, sk_share, e);
let circuit = schnorr_circuit(r_shares, sk_share, e);

// Evaluate the circuit
let result = curcuit.eval();
let result = circuit.eval();

// Open the result to get the second component z of the signature
let z = result.open();
Expand All @@ -77,7 +77,7 @@ pub fn run_schnorr(m: Nat, verbose: bool) {
// Compute e_verify = Sha256(c_verify, m)
let e_verify = compute_e(c_verify, m);

if (verbose) {
if verbose {
println!("group: {:?}", group);
println!("r1: {:?}", r1);
println!("r2: {:?}", r2);
Expand Down

0 comments on commit 6e7aaba

Please sign in to comment.