mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-10 05:57:57 -05:00
LowGear with higher statistical security.
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
template<int L>
|
||||
class fixint : public SignedZ2<64 * (L + 1)>
|
||||
{
|
||||
static const int OVERFLOW = 60;
|
||||
|
||||
public:
|
||||
typedef SignedZ2<64 * (L + 1)> super;
|
||||
|
||||
@@ -22,7 +24,7 @@ public:
|
||||
fixint(const T& other) :
|
||||
super(other)
|
||||
{
|
||||
char check = this->a[this->N_WORDS - 1] >> 56;
|
||||
auto check = mp_limb_signed_t(this->a[this->N_WORDS - 1]) >> OVERFLOW;
|
||||
assert(check == 0 or check == -1);
|
||||
}
|
||||
|
||||
@@ -68,7 +70,7 @@ public:
|
||||
void allocate_slots(const T& limit)
|
||||
{
|
||||
int n_bits = this->size_in_bits();
|
||||
if (numBits(limit) - 56 > n_bits)
|
||||
if (numBits(limit) - OVERFLOW > n_bits)
|
||||
{
|
||||
cerr << "cannot hold " << numBits(limit) << " bits, " << n_bits
|
||||
<< " available" << endl;
|
||||
|
||||
Reference in New Issue
Block a user