mirror of
https://github.com/tlsnotary/ole-protocols.git
synced 2026-01-08 22:18:07 -05:00
Created a functionality module and moved OLE
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
3
src/func/mod.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
//! This module implements some functionalities.
|
||||
|
||||
pub mod ole;
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
#![feature(iter_map_windows)]
|
||||
|
||||
pub mod e2f;
|
||||
mod func;
|
||||
pub mod ghash;
|
||||
mod ole;
|
||||
|
||||
Reference in New Issue
Block a user