Files
MP-SPDZ/GC/AtlasShare.h
Marcel Keller 6a424539c9 SoftSpokenOT.
2022-08-25 13:23:18 +10:00

66 lines
1.0 KiB
C++

/*
* AtlasShare.h
*
*/
#ifndef GC_ATLASSHARE_H_
#define GC_ATLASSHARE_H_
#include "Protocols/AtlasShare.h"
#include "Protocols/ShamirMC.h"
#include "Math/Bit.h"
namespace GC
{
class AtlasSecret;
class AtlasShare : public ::AtlasShare<gf2n_<octet>>, public ShareSecret<AtlasSecret>
{
typedef AtlasShare This;
public:
typedef ::AtlasShare<gf2n_<octet>> super;
typedef Atlas<This> Protocol;
typedef ShamirMC<This> MAC_Check;
typedef MAC_Check Direct_MC;
typedef ShamirInput<This> Input;
typedef ReplicatedPrep<This> LivePrep;
typedef This small_type;
typedef Bit clear;
static MAC_Check* new_mc(mac_key_type)
{
return new MAC_Check;
}
AtlasShare()
{
}
template<class U>
AtlasShare(const U& other) :
super(other)
{
}
AtlasShare(const AtlasSecret& other);
void XOR(const This& a, const This& b)
{
*this = a + b;
}
void public_input(bool input)
{
*this = input;
}
};
}
#endif /* GC_ATLASSHARE_H_ */