mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-09 13:37:58 -05:00
ATLAS.
This commit is contained in:
33
GC/AtlasSecret.cpp
Normal file
33
GC/AtlasSecret.cpp
Normal 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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user