Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cryprot-ot/src/extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub const BASE_OT_COUNT: usize = 128;
pub const DEFAULT_OT_BATCH_SIZE: usize = 2_usize.pow(16);

/// OT extension sender generic over its [`Security`] level.
pub struct OtExtensionSender<S: Security> {
pub struct OtExtensionSender<S> {
rng: StdRng,
base_ot: SimplestOt,
conn: Connection,
Expand All @@ -59,7 +59,7 @@ pub struct OtExtensionSender<S: Security> {
}

/// OT extension receiver generic over its [`Security`] level.
pub struct OtExtensionReceiver<S: Security> {
pub struct OtExtensionReceiver<S> {
base_ot: SimplestOt,
conn: Connection,
base_rngs: Vec<[AesRng; 2]>,
Expand Down
10 changes: 3 additions & 7 deletions cryprot-ot/src/silent_ot.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Semi-honest and malicious Silent OT implementation using expand-convolute code [[RRT23](https://eprint.iacr.org/2023/882)].
#![allow(non_snake_case)]
use std::{io, marker::PhantomData, mem};
use std::{io, mem};

use bytemuck::cast_slice_mut;
use cryprot_codes::ex_conv::{ExConvCode, ExConvCodeConfig};
Expand Down Expand Up @@ -34,9 +34,8 @@ pub type MaliciousSilentOtReceiver = SilentOtReceiver<MaliciousMarker>;

pub struct SilentOtSender<S> {
conn: Connection,
ot_sender: OtExtensionSender<SemiHonestMarker>,
ot_sender: OtExtensionSender<S>,
rng: StdRng,
s: PhantomData<S>,
}

#[derive(Default, Debug, Copy, Clone, PartialEq, Eq)]
Expand Down Expand Up @@ -73,7 +72,6 @@ impl<S: Security> SilentOtSender<S> {
conn,
ot_sender,
rng: StdRng::from_os_rng(),
s: PhantomData,
}
}

Expand Down Expand Up @@ -224,9 +222,8 @@ impl<S: Security> SilentOtSender<S> {

pub struct SilentOtReceiver<S> {
conn: Connection,
ot_receiver: OtExtensionReceiver<SemiHonestMarker>,
ot_receiver: OtExtensionReceiver<S>,
rng: StdRng,
s: PhantomData<S>,
}

impl<S: Security> SilentOtReceiver<S> {
Expand All @@ -236,7 +233,6 @@ impl<S: Security> SilentOtReceiver<S> {
conn,
ot_receiver,
rng: StdRng::from_os_rng(),
s: PhantomData,
}
}

Expand Down
Loading