deps/
- This directory contains the external code from ladnir/cryptoTools on which our codebase depends.add.cpp
andadd.h
- This contains the implementation of addition of two masked integers. It is used to replace the+
operator in EzPC.api.cpp
andapi.h
- This file contains the implementation of the Athos API using FSS. Every extern function called by Athos is implemented here. All the functions work in fixed bitwidth.api_varied.cpp
andapi_varied.h
- This file contains the implementation of the SeeDot mixed-bitwidth API using FSS. This means that all the extern functions that SeeDot dumps are implemented in this file. Some API endpoints also contain an implicit implementation of many FSS Gates in the paper.ArgMapping.h
- Argument parser for LLAMA binary.array.h
- Contains convenient functions and macros for array allocation and indexingcomms.cpp
andcomms.h
- Contains helper functions for transfering data between dealer-evaluator (offline communication) and evaluator-evaluator (online communication). Contains wrappers for transferring different kinds of keys using fundamental transfer ofblock
s andGroupElement
s.config.h
- Contains the compile time configuration macros.conv.cpp
andconv.h
- Contains the implementation of FSS gates for Convolution and Matmul.dcf.cpp
anddcf.h
- Contains the implementation of FSS scheme for DCF from BCG+21.fss.h
- Public header file for FSS.GroupElement.h
- Contains the definition of the GroupElement class - a wrapper overuint64_t
.input_prng.cpp
andinput_prng.h
- Contains the implementation of the input layers which uses a PRNG to compress the keysize required for input layers.keypack.h
- Contains structures of different FSS Keys.lib.cpp
,lib.h
andlib.ezpc
- Contains implementations of functions which can be written as wrappers over API endpoints.lib.cpp
andlib.h
are generated from thelib.ezpc
file by runningfssc --bitlen 64 --l lib.ezpc
.mult.cpp
andmult.h
- Contains the implementation of multiplication of two masked integers. It is used to replace the*
operator in EzPC. It contains both uniform bitwidth (from BCG+21) and varying bitwidth (from LLAMA paper).pubdiv.cpp
andpubdiv.h
- Contains the implementation of FSS gates for Public Division and ARS along with the FSS Gates for Signed Comparison and Interval Containment as the FSS Gate for Public Divison depends on these two gates.spline.cpp
andspline.h
- Contains implementation of FSS gates for Spline Evaluation. This gate is used to implement FSS Gates for ReLU and math functions like Sigmoid, Tanh and Reciprocal-Squareroot.utils.cpp
andutils.h
- Contains helper functions.
We have implemented the following protocols from the paper in the respective files:
- Sign Extension (Figure 1):
internalExtend
function inapi_varied.cpp
- Truncate-Reduce (Figure 2):
internalTruncateAndFix
function inapi_varied.cpp
- Signed Multiplication (Figure 3):
new_mult_signed_gen
andnew_mult_signed_eval
frommult.cpp
- Unsigned Multiplication (Figure 4):
new_mult_unsigned_gen
andnew_mult_unsigned_eval
frommult.cpp
- Signed Division (Figure 5):
keyGenSignedPublicDiv
,evalSignedPublicDiv_First
andevalSignedPublicDiv_Second
frompubdiv.cpp
- Mixed Bitwidth Splines (Figure 6):
keygenSigmoid
andevalSigmoid
(name is a bit misleading but same function is used for all math functions with different coefficients) fromspline.cpp