Created a functionality module and moved OLE

This commit is contained in:
th4s
2023-12-18 17:37:14 +01:00
parent a0258343bb
commit c305513d6e
9 changed files with 10 additions and 8 deletions

View File

@@ -3,7 +3,7 @@
mod prover;
mod verifier;
use crate::ole::Ole;
use crate::func::ole::Ole;
use mpz_share_conversion_core::fields::p256::P256;
pub use prover::Prover;
pub use verifier::Verifier;

View File

@@ -1,6 +1,6 @@
//! The prover implementation
use crate::ole::{Ole, Role};
use crate::func::ole::{Ole, Role};
use mpz_share_conversion_core::fields::{p256::P256, Field, UniformRand};
use rand::thread_rng;

View File

@@ -1,6 +1,6 @@
//! The verifier implementation
use crate::ole::{Ole, Role};
use crate::func::ole::{Ole, Role};
use mpz_share_conversion_core::fields::{p256::P256, Field, UniformRand};
use rand::thread_rng;

3
src/func/mod.rs Normal file
View File

@@ -0,0 +1,3 @@
//! This module implements some functionalities.
pub mod ole;

View File

@@ -3,12 +3,11 @@
mod prover;
mod verifier;
use crate::func::ole::Ole;
use mpz_share_conversion_core::{fields::gf2_128::Gf2_128, Field};
pub use prover::Prover;
pub use verifier::Verifier;
use crate::ole::Ole;
pub fn ghash(blocks: &[Gf2_128], prover: &mut Prover, verifier: &mut Verifier) -> Gf2_128 {
let mut ole = Ole::default();

View File

@@ -1,5 +1,5 @@
use super::pascal_tri;
use crate::ole::{Ole, Role};
use crate::func::ole::{Ole, Role};
use mpz_share_conversion_core::{
fields::{compute_product_repeated, gf2_128::Gf2_128, UniformRand},
Field,

View File

@@ -1,5 +1,5 @@
use super::pascal_tri;
use crate::ole::{Ole, Role};
use crate::func::ole::{Ole, Role};
use mpz_share_conversion_core::{
fields::{compute_product_repeated, gf2_128::Gf2_128, UniformRand},
Field,

View File

@@ -2,5 +2,5 @@
#![feature(iter_map_windows)]
pub mod e2f;
mod func;
pub mod ghash;
mod ole;