pub struct ToyOT {
pub p: u64,
pub g: u64,
}Expand description
Toy 1-of-2 Oblivious Transfer parameters.
Based on simplified Naor-Pinkas OT using DH assumptions.
§WARNING
This is a simplified, non-secure educational sketch. Real OT requires careful implementation with secure group operations and hash functions.
Fields§
§p: u64DH group prime p
g: u64Generator g
Implementations§
Source§impl ToyOT
impl ToyOT
Sourcepub fn sender_setup(&self, a: u64) -> u64
pub fn sender_setup(&self, a: u64) -> u64
Sender setup: pick random a, publish c = g^a mod p.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ToyOT
impl RefUnwindSafe for ToyOT
impl Send for ToyOT
impl Sync for ToyOT
impl Unpin for ToyOT
impl UnsafeUnpin for ToyOT
impl UnwindSafe for ToyOT
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more