|
myl7/fss 1.1.0
Function secret sharing (FSS) primitives including distributed point/comparison function (DPF/DCF)
|
Unsigned integers with arithmetic addition and optional modulo as a group. More...
Public Member Functions | |
| Uint | operator+ (Uint rhs) const |
| Uint | operator- () const |
| int4 | Into () const |
Static Public Member Functions | |
| static Uint | From (int4 buf) |
Public Attributes | |
| T | val |
Unsigned integers with arithmetic addition and optional modulo as a group.
| T | Type to store the value. From uint8_t to __uint128_t. |
| mod | Modulus, making the group addition defined as \(a + b \mod mod\). If 0, use \(a + b\) as the group addition, i.e., same as \(mod = 2^{sizeof(T) * 8}\). |
When T = __uint128_t, because elements are clamped, any element has < 2^127 and 0 < mod <= 2^127.
Note that if you will use these groups as fields, i.e., perform multiplication, you must set mod to a prime number so that for random \(a, b\), \(a \cdot b\) is uniformly distributed in the field.