myl7/fss 2.0.0
Function secret sharing (FSS) primitives including distributed point/comparison function (DPF/DCF)
Loading...
Searching...
No Matches
half_tree_grotto_dcf.cuh File Reference

2-party distributed comparison function (DCF) over F2 from the packed Half-Tree DPF. More...

#include <cuda_runtime.h>
#include <cuda/std/bit>
#include <fss/grotto_dcf.cuh>
#include <fss/packed_half_tree_dpf.cuh>
#include <fss/util.cuh>
#include <memory>
#include <cuda/std/span>
#include <utility>
#include <stdexcept>

Classes

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...

Detailed Description

2-party distributed comparison function (DCF) over F2 from the packed Half-Tree DPF.

Author
Yulong Ming i@myl.nosp@m.7.or.nosp@m.g
Warning
Experimental, like PackedHalfTreeDpf, whose keys it evaluates. The API may change without notice.

The comparison is the prefix-parity algorithm of Grotto (1), which GrottoDcf runs on the BGI DPF, applied to a PackedHalfTreeDpf key with out_bits = 1 and beta = 1. SIGMA (2) runs the same algorithm on the BGI DPF with early termination. A key is the DPF key itself, so PackedHalfTreeDpf::Eval() on the same key still gives the shares of 1[x == alpha].

Output shares are in F2 (XOR sharing). Each party holds a single bool per query. For inputs x: share_0 XOR share_1 = 1[alpha <= x], as in GrottoDcf.

Evaluation

The two parties' control bits of a node XOR to 1 exactly when the node is on alpha's path, i.e., to the parity of the 1-bit outputs below it. Eval() walks x's path and XORs the control bit of every node at which x's bit differs from the previous bit, taking the bit before the first as 0. These are the nodes where the path turns. If x leaves alpha's path at tree level d, the XORed bits reconstruct to x's bit at level d, and x's output block reconstructs to zero. If x stays on the path, they reconstruct to x's last tree bit r, and the block holds a single 1 at alpha's lane. Eval() then XORs the block lanes up to and including x's lane when r = 0, or the lanes above it when r = 1, which gives 1[alpha <= x] in both cases.

Complexity

Gen makes 2 * (kDepth + 1) hash calls and Eval kDepth + 1, the costs of PackedHalfTreeDpf. A key is 16 * (kDepth + 2) bytes with kDepth = in_bits - 7.

References

  1. Kyle Storrier, Adithya Vadapalli, Allan Lyons, Ryan Henry: Grotto: Screaming fast (2+1)-PC for Z_{2^n} via (2, 2)-DPFs. CCS 2023: 2143-2157. https://doi.org/10.1145/3576915.3623147. https://eprint.iacr.org/2023/108.
  2. Kanav Gupta, Neha Jawalkar, Ananta Mukherjee, Nishanth Chandran, Divya Gupta, Ashish Panwar, Rahul Sharma: SIGMA: Secure GPT Inference with Function Secret Sharing. Cryptology ePrint Archive, Paper 2023/1269. https://eprint.iacr.org/2023/1269.