8 class OTCO:
public OT<OTCO> {
public:
18 gTbl = eb_curve_get_tab();
22 bn_t * a =
new bn_t[length];
23 eb_t * B =
new eb_t[length];
24 eb_t * A =
new eb_t[length];
25 for(
int i = 0; i < length; ++i) {
32 for(
int i = 0; i < length; ++i) {
33 eb_mul_fix_norm(A[i], gTbl, a[i]);
37 for(
int i = 0; i < length; ++i) {
39 eb_mul_norm(B[i], B[i], a[i]);
41 bn_mod(a[i], a[i], q);
42 eb_mul_fix_norm(A[i], gTbl, a[i]);
43 eb_sub_norm(A[i], B[i], A[i]);
46 for(
int i = 0; i < length; ++i){
55 for(
int i = 0; i < length; ++i) {
65 bn_t * bb =
new bn_t[length];
66 eb_t * B =
new eb_t[length];
67 eb_t * A =
new eb_t[length];
68 for(
int i = 0; i < length; ++i) {
74 for(
int i = 0; i < length; ++i) {
75 eb_mul_fix_norm(B[i], gTbl, bb[i]);
78 eb_add_norm(B[i], A[i], B[i]);
83 for(
int i = 0; i < length; ++i) {
84 eb_mul_norm(A[i], A[i], bb[i]);
88 for(
int i = 0; i < length; ++i) {
96 for(
int i = 0; i < length; ++i) {
void send_data(const void *data, int nbyte)
Definition: io_channel.h:14
void recv_data(void *data, int nbyte)
Definition: io_channel.h:17
__m128i block
Definition: block.h:8
block xorBlocks(block x, block y)
Definition: block.h:35
Definition: net_io_channel.h:22
void recv_eb(eb_t *eb, size_t num)
Definition: io_channel.h:150
const eb_t * gTbl
Definition: co.h:12
void send_eb(const eb_t *eb, size_t num)
Definition: io_channel.h:140
bn_t q
Definition: co.h:11
block KDF(eb_t in)
Definition: utils_ec.hpp:20
NetIO * io
Definition: ot.h:9
eb_t g
Definition: co.h:10
void initialize_relic()
Definition: utils_ec.hpp:8
void random_bn(T t, L... l)
Definition: prg.h:87
OTCO(NetIO *io)
Definition: co.h:14
int cnt
Definition: co.h:9
void send_impl(const block *data0, const block *data1, int length)
Definition: co.h:21
void recv_impl(block *data, const bool *b, int length)
Definition: co.h:64
PRG prg
Definition: co.h:13