This commit is contained in:
Marcel Keller
2021-08-06 18:24:58 +10:00
parent e6dbb4cb81
commit c597554af9
159 changed files with 3667 additions and 1378 deletions

33
GC/AtlasSecret.cpp Normal file
View File

@@ -0,0 +1,33 @@
/*
* AtlasSecret.cpp
*
*/
#include "AtlasSecret.h"
#include "TinyMC.h"
#include "Protocols/ShamirMC.hpp"
#include "Protocols/MAC_Check_Base.hpp"
#include "Secret.hpp"
namespace GC
{
typename AtlasSecret::MC* AtlasSecret::new_mc(typename AtlasSecret::mac_key_type mac_key)
{
return new MC(mac_key);
}
AtlasShare::AtlasShare(const AtlasSecret& other) :
AtlasShare(other.get_bit(0))
{
}
void AtlasShare::random()
{
AtlasSecret tmp;
this->get_party().DataF.get_one(DATA_BIT, tmp);
*this = tmp.get_reg(0);
}
}