|
myl7/fss 2.0.0
Function secret sharing (FSS) primitives including distributed point/comparison function (DPF/DCF)
|
Small-domain AES-128 Feistel PRP for Cuckoo hashing. More...
Public Member Functions | |
| Aes128Feistel () | |
| Construct with a new OpenSSL cipher context. | |
| Aes128Feistel (const Aes128Feistel &) | |
| Copy by creating a new OpenSSL cipher context. | |
| __uint128_t | Permu (int4 seed, __uint128_t x, __uint128_t domain) |
| Small-domain PRP on [0, domain) using 4-round Feistel + cycle-walking. | |
Small-domain AES-128 Feistel PRP for Cuckoo hashing.
This backend is host-only because it uses OpenSSL. It satisfies Permutable and is intended for VDMPF setup paths that need a permutation over a compact integer domain. All special members and Permu() are __host__ __device__, so pure host use of schemes that hold a Prp by value builds without execution-space warnings. Device use of any of them, e.g. calling Permu() or copying the object in a kernel, fails to build with an unresolved-extern error that names fss_host_only_Aes128Feistel_used_in_device_code.
After a move the source owns no context. It may be destroyed or assigned to. Permu() on a moved-from object is undefined behavior, and only a successful assignment restores the context. A failed assignment does not restore it.
|
inline |
Construct with a new OpenSSL cipher context.
| std::runtime_error | if an OpenSSL context allocation or setup call fails. |
|
inline |
Copy by creating a new OpenSSL cipher context.
Copy assignment reuses the destination context, or creates one when the destination is moved-from.
| std::runtime_error | if an OpenSSL context allocation or setup call fails. |
|
inline |
Small-domain PRP on [0, domain) using 4-round Feistel + cycle-walking.
Host-only. Device use fails to build with an unresolved-extern error naming fss_host_only_Aes128Feistel_used_in_device_code.
| seed | 16-byte PRP key. |
| x | Input in [0, domain). |
| domain | Domain size. Must be >= 2. |