|
| void | Gen (Cw cws[], int4 &ocw, const int4 s0s[2], In a, int4 b_buf) |
| | Key generation method.
|
| |
| int4 | Eval (bool b, int4 s0, const Cw cws[], int4 ocw, In x) |
| | Evaluation method.
|
| |
| void | EvalAll (bool b, int4 s0, const Cw cws[], int4 ocw, int4 ys[]) |
| | Full domain evaluation method.
|
| |
template<int in_bits, typename Group, typename Prg, typename In = uint, int par_depth = -1>
requires ((std::is_unsigned_v<In> || std::is_same_v<In, __uint128_t>) && in_bits <= sizeof(In) * 8 &&
Groupable<Group> &&
Prgable<Prg, 1>)
class fss::HalfTreeDpf< in_bits, Group, Prg, In, par_depth >
2-party DPF scheme using the Half-Tree construction.
- Template Parameters
-
| in_bits | Input domain bit size. |
| Group | Type for the output domain. See Groupable. |
| Prg | See Prgable. Requires mul=1 (CCR hash, 128->128 bits). |
| In | Type for the input domain. From uint8_t to __uint128_t. |
| par_depth | -1 is to use ceil(log(num of threads)), which should be good enough. Only EvalAll() uses it. See EvalAll() for details. |
template<int in_bits, typename Group , typename Prg , typename In = uint, int par_depth = -1>
| void fss::HalfTreeDpf< in_bits, Group, Prg, In, par_depth >::EvalAll |
( |
bool |
b, |
|
|
int4 |
s0, |
|
|
const Cw |
cws[], |
|
|
int4 |
ocw, |
|
|
int4 |
ys[] |
|
) |
| |
|
inline |
Full domain evaluation method.
Evaluate the key on each input, i.e., 0b00...0 - 0b11...1.
- Parameters
-
| ys | Pre-allocated output array. Its size must be at least 2 ** in_bits. |
Support parallel using OpenMP.