keySwitching.h
void writeTo(std::ostream &str) const
Raw IO.
Definition: keySwitching.cpp:196
KeySwitch(const SKHandle &_fromKey, long fromID=0, long toID=0, long p=0)
bool operator==(const KeySwitch &other) const
Definition: keySwitching.cpp:46
KeySwitch(long sPow=0, long xPow=0, long fromID=0, long toID=0, long p=0)
Definition: keySwitching.cpp:35
JsonWrapper writeToJSON() const
Write out the switch key (KeySwitch) object to a JsonWrapper.
Definition: keySwitching.cpp:243
void readMatrix(std::istream &str, const Context &context)
Read a key-switching matrix from input.
Definition: keySwitching.cpp:191
static KeySwitch readFromJSON(std::istream &str, const Context &context)
Read from the stream the serialized switch key (KeySwitch) object using JSON format.
Definition: keySwitching.cpp:264
void readJSON(std::istream &str, const Context &context)
In-place read from the stream the serialized switch key (KeySwitch) object using JSON format.
Definition: keySwitching.cpp:278
bool operator!=(const KeySwitch &other) const
Definition: keySwitching.cpp:69
static KeySwitch readFrom(std::istream &str, const Context &context)
Read from the stream the serialized KeySwitch object in binary format.
Definition: keySwitching.cpp:221
static constexpr std::string_view typeName
Class label to be added to JSON serialization as object type information.
Definition: keySwitching.h:93
static const KeySwitch & dummy()
returns a dummy static matrix with toKeyId == -1
Definition: keySwitching.cpp:177
A handle, describing the secret-key element that "matches" a part, of the form s^r(X^t).
Definition: Ctxt.h:81
Definition: apiAttributes.h:21
void addMinimal1DMatrices(SecKey &sKey, long keyID=0)
These routines just add a single matrix (or two, for bad dimensions)
Definition: keySwitching.cpp:648
void addSome1DMatrices(SecKey &sKey, long bound=HELIB_KEYSWITCH_THRESH, long keyID=0)
Generate some matrices of the form s(X^{g^i})->s(X), but not all. For a generator g whose order is la...
Definition: keySwitching.cpp:573
void addSomeFrbMatrices(SecKey &sKey, long bound=HELIB_KEYSWITCH_THRESH, long keyID=0)
Generate all/some Frobenius matrices of the form s(X^{p^i})->s(X)
Definition: keySwitching.cpp:599
void addAllMatrices(SecKey &sKey, long keyID=0)
Maximalistic approach: generate matrices s(X^e)->s(X) for all e in Zm*.
Definition: keySwitching.cpp:307
long KSGiantStepSize(long D)
Function that returns number of baby steps. Used to keep this and matmul routines "in sync".
Definition: keySwitching.cpp:297
void addFrbMatrices(SecKey &sKey, long keyID=0)
Definition: keySwitching.cpp:610
void addBSGS1DMatrices(SecKey &sKey, long keyID=0)
Definition: keySwitching.cpp:593
void addMatrices4Network(SecKey &sKey, const PermNetwork &net, long keyID=0)
Definition: keySwitching.cpp:667
void add1DMatrices(SecKey &sKey, long keyID=0)
Generate all matrices s(X^{g^i})->s(X) for generators g of Zm* /(p) and i<ord(g). If g has different ...
Definition: keySwitching.cpp:588
void addTheseMatrices(SecKey &sKey, const std::set< long > &automVals, long keyID=0)
Generate specific key-switching matrices, described by the given set.
Definition: keySwitching.cpp:688
void addMinimalFrbMatrices(SecKey &sKey, long keyID=0)
Definition: keySwitching.cpp:660
void addFewMatrices(SecKey &sKey, long keyID=0)
Generate matrices so every s(X^e) can be reLinearized in at most two steps.
std::ostream & operator<<(std::ostream &os, const ContextBuilder< SCHEME > &cb)
ostream operator for serializing the ContextBuilder object.
void addBSGSFrbMatrices(SecKey &sKey, long keyID=0)
Definition: keySwitching.cpp:615
Definition: JsonWrapper.h:9