|
myl7/fss 1.1.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 <omp.h>#include <fss/group.cuh>#include <fss/prg.cuh>#include <fss/util.cuh>Go to the source code of this file.
Classes | |
| class | fss::Dcf< in_bits, Group, Prg, In, pred, par_depth > |
| 2-party DCF scheme. More... | |
| struct | fss::Dcf< in_bits, Group, Prg, In, pred, par_depth >::Cw |
| Correction word. More... | |
Enumerations | |
| enum class | fss::DcfPred { kLt , 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.
|
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\) |