myl7/fss 2.0.0
Function secret sharing (FSS) primitives including distributed point/comparison function (DPF/DCF)
Loading...
Searching...
No Matches
fss::prp::ChaChaFeistel Class Reference

Small-domain ChaCha20-Feistel PRP for Cuckoo hashing. More...

Public Member Functions

__uint128_t Permu (int4 seed, __uint128_t x, __uint128_t domain)
 Small-domain PRP on [0, domain) using 4-round Feistel + cycle-walking.

Detailed Description

Small-domain ChaCha20-Feistel PRP for Cuckoo hashing.

This backend satisfies Permutable, is usable from both host and device, and is intended for DMPF/VDMPF paths that need a permutation over a compact integer domain.

Member Function Documentation

◆ Permu()

__uint128_t fss::prp::ChaChaFeistel::Permu ( int4 seed,
__uint128_t x,
__uint128_t domain )
inline

Small-domain PRP on [0, domain) using 4-round Feistel + cycle-walking.

Parameters
seed16-byte PRP key.
xInput in [0, domain).
domainDomain size. Must be >= 2.
Returns
Output in [0, domain).
Precondition
x < domain. A violation aborts with a diagnostic in Debug builds on both the host and the device, and is undefined behavior in Release builds.

The documentation for this class was generated from the following file: