From 1df7ca5492232dd71926252c8d5f0a1b8f9d5cc2 Mon Sep 17 00:00:00 2001 From: drewstone Date: Thu, 23 May 2024 16:36:37 -0400 Subject: [PATCH] Fix spelling of receive --- mpc-algebra/src/channel.rs | 4 ++-- mpc-algebra/src/share/additive.rs | 8 ++++---- mpc-algebra/src/share/spdz.rs | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/mpc-algebra/src/channel.rs b/mpc-algebra/src/channel.rs index 6fac7fbb..69de1683 100644 --- a/mpc-algebra/src/channel.rs +++ b/mpc-algebra/src/channel.rs @@ -28,7 +28,7 @@ pub trait MpcSerNet: MpcNet { }) } - fn recieve_from_king(out: Option>) -> T { + fn receive_from_king(out: Option>) -> T { let bytes_in = Self::recv_bytes_from_king(out.map(|outs| { outs.iter() .map(|out| { @@ -73,7 +73,7 @@ pub trait MpcSerNet: MpcNet { f: impl Fn(Vec) -> Vec, ) -> T { let king_response = Self::send_to_king(x).map(f); - Self::recieve_from_king(king_response) + Self::receive_from_king(king_response) } } diff --git a/mpc-algebra/src/share/additive.rs b/mpc-algebra/src/share/additive.rs index 63bb7dd2..8081f479 100644 --- a/mpc-algebra/src/share/additive.rs +++ b/mpc-algebra/src/share/additive.rs @@ -98,7 +98,7 @@ impl Reveal for AdditiveFieldShare { let mut r: Vec = (0..(Net::n_parties() - 1)).map(|_| F::rand(rng)).collect(); let sum_r: F = r.iter().sum(); r.push(f - sum_r); - Self::from_add_shared(Net::recieve_from_king(if Net::am_king() { + Self::from_add_shared(Net::receive_from_king(if Net::am_king() { Some(r) } else { None @@ -112,7 +112,7 @@ impl Reveal for AdditiveFieldShare { .map(|i| f[i] - &rs.iter().map(|r| &r[i]).sum()) .collect(); rs.push(final_shares); - Net::recieve_from_king(if Net::am_king() { Some(rs) } else { None }) + Net::receive_from_king(if Net::am_king() { Some(rs) } else { None }) .into_iter() .map(Self::from_add_shared) .collect() @@ -366,7 +366,7 @@ impl Reveal for AdditiveGroupShare { let mut r: Vec = (0..(Net::n_parties() - 1)).map(|_| G::rand(rng)).collect(); let sum_r: G = r.iter().sum(); r.push(f - sum_r); - Self::from_add_shared(Net::recieve_from_king(if Net::am_king() { + Self::from_add_shared(Net::receive_from_king(if Net::am_king() { Some(r) } else { None @@ -380,7 +380,7 @@ impl Reveal for AdditiveGroupShare { .map(|i| f[i] - &rs.iter().map(|r| &r[i]).sum()) .collect(); rs.push(final_shares); - Net::recieve_from_king(if Net::am_king() { Some(rs) } else { None }) + Net::receive_from_king(if Net::am_king() { Some(rs) } else { None }) .into_iter() .map(Self::from_add_shared) .collect() diff --git a/mpc-algebra/src/share/spdz.rs b/mpc-algebra/src/share/spdz.rs index a6913fa4..0dd46926 100644 --- a/mpc-algebra/src/share/spdz.rs +++ b/mpc-algebra/src/share/spdz.rs @@ -145,7 +145,7 @@ impl Reveal for SpdzFieldShare { let mut r: Vec = (0..(Net::n_parties() - 1)).map(|_| F::rand(rng)).collect(); let sum_r: F = r.iter().sum(); r.push(f - sum_r); - Self::from_add_shared(Net::recieve_from_king(if Net::am_king() { + Self::from_add_shared(Net::receive_from_king(if Net::am_king() { Some(r) } else { None @@ -159,7 +159,7 @@ impl Reveal for SpdzFieldShare { .map(|i| f[i] - &rs.iter().map(|r| &r[i]).sum()) .collect(); rs.push(final_shares); - Net::recieve_from_king(if Net::am_king() { Some(rs) } else { None }) + Net::receive_from_king(if Net::am_king() { Some(rs) } else { None }) .into_iter() .map(Self::from_add_shared) .collect() @@ -305,7 +305,7 @@ impl Reveal for SpdzGroupShare { let mut r: Vec = (0..(Net::n_parties() - 1)).map(|_| G::rand(rng)).collect(); let sum_r: G = r.iter().sum(); r.push(f - sum_r); - Self::from_add_shared(Net::recieve_from_king(if Net::am_king() { + Self::from_add_shared(Net::receive_from_king(if Net::am_king() { Some(r) } else { None @@ -319,7 +319,7 @@ impl Reveal for SpdzGroupShare { .map(|i| f[i] - &rs.iter().map(|r| &r[i]).sum()) .collect(); rs.push(final_shares); - Net::recieve_from_king(if Net::am_king() { Some(rs) } else { None }) + Net::receive_from_king(if Net::am_king() { Some(rs) } else { None }) .into_iter() .map(Self::from_add_shared) .collect()