myl7/fss 2.0.0
Function secret sharing (FSS) primitives including distributed point/comparison function (DPF/DCF)
Loading...
Searching...
No Matches
Public API

Classes in this group expose all of their public members as API. More...

Concepts

concept  fss::ValidForInputBits
 Unsigned input storage wide enough for an input domain of in_bits bits.
concept  Groupable
 Group interface.
concept  Hashable
 Collision-resistant hash interface.
concept  HasHash4
 Optional four-message batch extension of Hashable.
concept  XorHashable
 Collision-resistant and XOR-collision-resistant hash interface.
concept  CcrHashable
 Circular-correlation-robust (CCR) hash interface for HalfTree schemes.
concept  Prgable
 Pseudorandom generator (PRG) interface.
concept  HasGenHalf
 Optional selected-half extension of Prgable for positive even mul.
concept  HasGen8
 Optional eight-seed batch extension of Prgable.
concept  Permutable
 Small-domain pseudorandom permutation (PRP) interface.

Classes

class  fss::Dcf< in_bits, Group, Prg, In, pred >
 2-party DCF scheme. More...
struct  fss::Dcf< in_bits, Group, Prg, In, pred >::Cw
 Correction word. More...
class  fss::Dmpf< in_bits, max_points, bucket_bits, Group, Prg, Prp, In, ch_lambda >
 2-party DMPF scheme. More...
struct  fss::Dmpf< in_bits, max_points, bucket_bits, Group, Prg, Prp, In, ch_lambda >::Key
 DMPF key for one party. More...
class  fss::Dpf< in_bits, Group, Prg, In >
 2-party DPF scheme. More...
struct  fss::Dpf< in_bits, Group, Prg, In >::Cw
 Correction word. More...
struct  fss::Dpf< in_bits, Group, Prg, In >::Key
 One party's key in the aggregate Cw layout: the correction words plus the party's initial seed. More...
class  fss::GrottoDcf< in_bits, Prg, In >
 2-party DCF scheme over F2 from standard DPF (Grotto construction). More...
struct  fss::GrottoDcf< in_bits, Prg, In >::ParityTreeView
 Borrowed, read-only parity tree in level order. More...
class  fss::OwnedParityTree< Scheme >
 Own a host parity-tree allocation and expose a borrowed, read-only view. More...
class  fss::group::Bytes
 Bytes with XOR as a group. More...
class  fss::group::Uint< T, mod >
 Unsigned integers with arithmetic addition and optional modulo as a group. More...
class  fss::HalfTreeDpf< in_bits, Group, Hash, In >
 2-party DPF scheme using the Half-Tree construction. More...
struct  fss::HalfTreeDpf< in_bits, Group, Hash, In >::Cw
 Correction word. More...
class  fss::HalfTreeGrottoDcf< in_bits, Hash, In >
 2-party DCF scheme over F2 from the packed Half-Tree DPF (Grotto construction). More...
struct  fss::HalfTreeGrottoDcf< in_bits, Hash, In >::ParityTreeView
 Borrowed, read-only packed leaves and their block-parity tree. More...
class  fss::OwnedPackedParityTree< Scheme >
 Own packed host leaves and their block-parity tree. More...
class  fss::hash::Aes128Ccr< AesMmo >
 AES-128 CCR hash H(z) = AES_K(sigma(z)) xor sigma(z). More...
class  fss::PackedHalfTreeDpf< in_bits, out_bits, Hash, In >
 2-party DPF scheme with packed sub-128-bit outputs, using the Half-Tree construction. More...
struct  fss::PackedHalfTreeDpf< in_bits, out_bits, Hash, In >::Cw
 Correction word for a tree level or the final packed-output correction word. More...
class  fss::Vdmpf< in_bits, max_points, bucket_bits, Group, Prg, XorHash, Hash, Prp, In, ch_lambda >
 2-party VDMPF scheme. More...
struct  fss::Vdmpf< in_bits, max_points, bucket_bits, Group, Prg, XorHash, Hash, Prp, In, ch_lambda >::BucketKey
 Per-bucket VDPF key with shared correction words and one party's initial seed. More...
struct  fss::Vdmpf< in_bits, max_points, bucket_bits, Group, Prg, XorHash, Hash, Prp, In, ch_lambda >::Key
 VDMPF key for one party, containing the PRP seed and per-bucket keys. More...
class  fss::Vdpf< in_bits, Group, Prg, XorHash, Hash, In >
 2-party VDPF scheme. More...
struct  fss::Vdpf< in_bits, Group, Prg, XorHash, Hash, In >::Cw
 Correction word. More...

Typedefs

using fss::Vdmpf< in_bits, max_points, bucket_bits, Group, Prg, XorHash, Hash, Prp, In, ch_lambda >::EvalProof = cuda::std::array<cuda::std::array<int4, 4>, kCuckooChoices>
 Per-candidate corrected per-point hashes of one input, in candidate order.

Enumerations

enum class  fss::DcfPred { DcfPred::kLt , DcfPred::kGt }
 Comparison predicate. More...

Functions

constexpr int fss::cuckoo_hash::ChBucket (int t, int lambda)
 Estimate the number of buckets for three-choice Cuckoo hashing.
int4 fss::util::Xor (int4 lhs, int4 rhs)
 Return the bitwise XOR of two 128-bit blocks.
template<size_t N>
requires (N != cuda::std::dynamic_extent)
cuda::std::array< int4, N > fss::util::Xor (cuda::std::span< const int4, N > lhs, cuda::std::span< const int4, N > rhs)
 Return the element-wise XOR of two equally sized fixed-length block sequences.
int4 fss::util::SetLsb (int4 val, bool bit)
 Return val with bit 0 of its fourth word set to bit.
bool fss::util::GetLsb (int4 val)
 Return bit 0 of the fourth word of val.
void fss::util::RequireArg (bool ok, const char *msg)
 Check a caller precondition.

Detailed Description

Classes in this group expose all of their public members as API.

Private members and entities in detail namespaces are implementation details. Field access does not imply a portable serialized format or a stable binary layout.

Typedef Documentation

◆ EvalProof

template<int in_bits, int max_points, int bucket_bits, typename Group, typename Prg, typename XorHash, typename Hash, typename Prp, typename In = uint, int ch_lambda = 80>
using fss::Vdmpf< in_bits, max_points, bucket_bits, Group, Prg, XorHash, Hash, Prp, In, ch_lambda >::EvalProof = cuda::std::array<cuda::std::array<int4, 4>, kCuckooChoices>

Per-candidate corrected per-point hashes of one input, in candidate order.

Entry k belongs to candidate k of the input; it stays zero when that candidate locates outside the allocated buckets or repeats an earlier candidate. Prove() and ProveMerkle() re-locate the candidates from sigma, b_size_rt, and the input.

Enumeration Type Documentation

◆ DcfPred

enum class fss::DcfPred
strong

Comparison predicate.

For the input domain \(\sG_{in} = \{0, 1\}^n\) as bits and \(x, a \in \sG_{in}\), \(x < a\) is defined as that the unsigned integer represented by \(x\) is less than that represented by \(a\), i.e., comparison starts from the most significant bit (MSB).

Enumerator
kLt 

\(y = b\) when \(x < a\)

kGt 

\(y = b\) when \(x > a\)

Function Documentation

◆ ChBucket()

int fss::cuckoo_hash::ChBucket ( int t,
int lambda )
constexpr

Estimate the number of buckets for three-choice Cuckoo hashing.

Uses the fit in Lemma 5 of the paper, simplified per Remark 1 for t >= 30: e = (lambda + 130 + log2(t)) / 123.5 and m = ceil(e * t). This estimate is monotonic in t.

Parameters
tNumber of elements, at least 30.
lambdaTarget Cuckoo-hashing failure exponent in bits.
Returns
Estimated bucket count m.
Precondition
The estimated bucket count is representable by int.
Exceptions
std::invalid_argumentif t is less than 30.

◆ RequireArg()

void fss::util::RequireArg ( bool ok,
const char * msg )
inline

Check a caller precondition.

A Debug build aborts with a diagnostic when ok is false, on both the host and the device. A Release build does not check it, and a violation is undefined behavior.

Parameters
okThe condition the caller must satisfy.
msgThe precondition description, naming the function and the violated requirement.

◆ Xor()

template<size_t N>
requires (N != cuda::std::dynamic_extent)
cuda::std::array< int4, N > fss::util::Xor ( cuda::std::span< const int4, N > lhs,
cuda::std::span< const int4, N > rhs )
inline

Return the element-wise XOR of two equally sized fixed-length block sequences.

The common extent N enforces equal lengths at compile time. Dynamic extents are not supported. The result owns its N blocks and does not allocate memory.

Template Parameters
NNumber of blocks, known at compile time.