MOTION
0.01
Framework for mixed-protocol multi-party computation
src
motioncore
oblivious_transfer
base_ots
base_ots/ot.h
Go to the documentation of this file.
1
// MIT License
2
//
3
// Copyright (c) 2018 Lennart Braun
4
//
5
// Permission is hereby granted, free of charge, to any person obtaining a copy
6
// of this software and associated documentation files (the "Software"), to deal
7
// in the Software without restriction, including without limitation the rights
8
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
// copies of the Software, and to permit persons to whom the Software is
10
// furnished to do so, subject to the following conditions:
11
//
12
// The above copyright notice and this permission notice shall be included in all
13
// copies or substantial portions of the Software.
14
//
15
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
// SOFTWARE.
22
23
#pragma once
24
25
#include <array>
26
#include <vector>
27
28
#include "
utility/bit_vector.h
"
29
30
namespace
encrypto::motion
{
31
32
class
Ot
{
33
public
:
34
virtual
~Ot
() =
default
;
35
virtual
void
Send
(
const
std::vector<std::vector<std::byte>>&) = 0;
36
virtual
std::vector<std::byte>
Receive
(
size_t
) = 0;
37
};
38
39
class
RandomOt
{
40
public
:
41
virtual
~RandomOt
() =
default
;
42
46
// virtual std::pair<std::vector<std::byte>, std::vector<std::byte>> send() = 0;
47
// virtual std::vector<std::byte> recv(bool) = 0;
48
52
virtual
std::vector<std::pair<std::vector<std::byte>, std::vector<std::byte>>>
Send
(
size_t
) = 0;
53
virtual
std::vector<std::vector<std::byte>>
Receive
(
const
BitVector<>
&) = 0;
58
// virtual std::vector<std::pair<std::vector<std::byte>, std::vector<std::byte>>> parallel_send(
59
// size_t, size_t number_threads) = 0;
60
// virtual std::vector<std::vector<std::byte>> parallel_recv(const std::vector<bool>&,
61
// size_t number_threads) = 0;
62
};
63
64
}
// namespace encrypto::motion
encrypto::motion::Ot::Receive
virtual std::vector< std::byte > Receive(size_t)=0
encrypto::motion::Ot
Definition:
base_ots/ot.h:32
bit_vector.h
encrypto::motion::BitVector<>
encrypto::motion::Ot::Send
virtual void Send(const std::vector< std::vector< std::byte >> &)=0
encrypto::motion::RandomOt::Receive
virtual std::vector< std::vector< std::byte > > Receive(const BitVector<> &)=0
encrypto::motion
Definition:
algorithm_description.cpp:35
encrypto::motion::RandomOt::~RandomOt
virtual ~RandomOt()=default
encrypto::motion::RandomOt
Definition:
base_ots/ot.h:39
encrypto::motion::Ot::~Ot
virtual ~Ot()=default
encrypto::motion::RandomOt::Send
virtual std::vector< std::pair< std::vector< std::byte >, std::vector< std::byte > > > Send(size_t)=0
Generated by
1.8.17