|
myl7/fss 2.0.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 |
| Return the group sum. | |
| Uint | operator- () const |
| Return the additive inverse. | |
| Uint () | |
| Construct the additive identity. | |
| int4 | Into () const |
| Encode this group element as a clamped block. | |
| T | Value () const |
| Return a copy of the underlying unsigned integer value. | |
Static Public Member Functions | |
| static Uint | From (int4 buf) |
| Convert a clamped block to a group element, reducing modulo mod when set. | |
Unsigned integers with arithmetic addition and optional modulo as a group.
| T | Type to store the value. From uint8_t to uint64_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}\). |
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.