|
myl7/fss 2.0.0
Function secret sharing (FSS) primitives including distributed point/comparison function (DPF/DCF)
|
2-party distributed comparison function (DCF). More...
#include <cuda_runtime.h>#include <type_traits>#include <cstddef>#include <cassert>#include <vector>#include <cuda/std/array>#include <fss/group.cuh>#include <fss/group/bytes.cuh>#include <fss/group/uint.cuh>#include <fss/group/uint128.cuh>#include <fss/prg.cuh>#include <fss/util.cuh>#include <fss/constraints.cuh>#include <fss/compat.cuh>#include <cuda/std/span>#include <limits>#include <cstdint>#include <stdexcept>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... | |
Enumerations | |
| enum class | fss::DcfPred { DcfPred::kLt , DcfPred::kGt } |
| Comparison predicate. More... | |
2-party distributed comparison function (DCF).
The scheme is from the paper, Function Secret Sharing for Mixed-Mode and Fixed-Point Secure Computation (1: the published version).
Comparison function: for the input domain \(\sG_{in} = \{0, 1\}^n\), the output domain \((\sG_{out}, +)\) that is a group, \(a \in \sG_{in}\), and \(b \in \sG_{out}\), a comparison function \(f^<_{a, b}\) is a function that for any input \(x\), the output \(y\) has \(y = b\) only when \(x < a\), otherwise \(y = 0\).
DCF: for the input domain \(\sG_{in} = \{0, 1\}^n\), the output domain \((\sG_{out}, +)\) that is a group, \(a \in \sG_{in}\), \(b \in \sG_{out}\), and a security parameter \(\lambda\), 2-party DCF is a scheme consisting of the methods:
That satisfies:
Similarly, we have \(f^>_{a, b}\) and DCF for it.
We fix the output domain size at 16B and always set the last word's LSB to 0, corresponding to \(\lambda = 127\). See Groupable for more details.
We limit the max input domain bit size to 128. This is enough for most applications and allows us to represent the input as an integer.