|
myl7/fss 1.1.0
Function secret sharing (FSS) primitives including distributed point/comparison function (DPF/DCF)
|
PRP-based hash for Cuckoo hashing. More...
Public Member Functions | |
| std::pair< int, int > | Locate (int4 sigma, In x, int k, __uint128_t n, int b_size) |
| Compute bucket index and within-bucket index for hash function k. | |
Public Attributes | |
| Prp | prp |
PRP-based hash for Cuckoo hashing.
Implements the hash functions from Equations (1) and (2) of the paper using a PRP.
| Prp | PRP type satisfying Permutable. |
| In | Input domain type (unsigned integer up to __uint128_t). |
|
inline |
Compute bucket index and within-bucket index for hash function k.
Implements the paper's Equations (1) and (2): y = PRP(sigma, x + n * k) bucket = y / b_size index = y % b_size
| sigma | PRP seed. |
| x | Input element. |
| k | Hash function index (0-indexed, in [0, kappa)). |
| n | Domain size (N = 2^{in_bits}). |
| b_size | Bucket size B. |