PKE Encoding documentation
Github Source: Encoding of plaintext into intermediate form
Page Contents
Interactions
File Listings
- CKKS Packed Encoding (ckkspackedencoding.h)
Describes the CKKS packing. Accepts a
std::vector<double>
or astd::vector<std::complex>
(although the double is recommended) unlike the other schemes.
- Coef Packed Encoding (coefpackedencoding.h)
Packs integers into a vector of size
n
Element-wise ops: Supports only element-wise addition (
EvalAdd
), but not multiplication. Thus, typically only works well when no multiplications are necessaryScalar ops: multiplication supported
Note
Coef Packed Encoding
is rarely used.- Encoding Params (encodingparams.h)
The object containing the parameters for encoding. These parameters are kept and continually reused (can be modified) during the encoding of new values
- Encodings (encodings.h)
“import” file which can be used for a single
#include
- Packed Encoding (packedencoding.h)
Packs integers into a vector of size
n
Supports element-wise addition and multiplication via
EvalAdd
andEvalMult
respectively- Supports automorphisms (commonly known as rotations) via
EvalAtIndex
Right Shift: positive index
Left Shift: negative index
Rotations work cyclically
- Supports automorphisms (commonly known as rotations) via
Note
is almost always what you want to use (other than if you want to deal with floating numbers)
- Plaintext (plaintext.h)
The base plaintext implementation
- Plaintext Factory (plaintextfactory.h)
Factory class that instantiates plaintexts
- String Encoding (stringencoding.h)
Encodes strings