Derived concrete implementation of EncryptedArrayBase. More...
#include <EncryptedArray.h>
Public Member Functions | |
EncryptedArrayDerived (const FHEcontext &_context, const RX &_G=RX(1, 1)) | |
EncryptedArrayDerived (const EncryptedArrayDerived &other) | |
EncryptedArrayDerived & | operator= (const EncryptedArrayDerived &other) |
virtual EncryptedArrayBase * | clone () const |
const RX & | getG () const |
virtual const FHEcontext & | getContext () const |
virtual const long | getDegree () const |
virtual void | rotate (Ctxt &ctxt, long k) const |
Rotation/shift as a linear array. | |
virtual void | shift (Ctxt &ctxt, long k) const |
Non-cyclic shift with zero fill. | |
virtual void | rotate1D (Ctxt &ctxt, long i, long k, bool dc=false) const |
rotate k positions along the i'th dimension More... | |
virtual void | shift1D (Ctxt &ctxt, long i, long k) const |
Shift k positions along the i'th dimension with zero fill. | |
virtual void | encode (ZZX &ptxt, const vector< long > &array) const |
virtual void | encode (ZZX &ptxt, const vector< ZZX > &array) const |
virtual void | encode (ZZX &ptxt, const PlaintextArray &array) const |
virtual void | encodeUnitSelector (ZZX &ptxt, long i) const |
Encodes a vector with 1 at position i and 0 everywhere else. | |
virtual void | decode (vector< long > &array, const ZZX &ptxt) const |
virtual void | decode (vector< ZZX > &array, const ZZX &ptxt) const |
virtual void | decode (PlaintextArray &array, const ZZX &ptxt) const |
virtual void | encrypt (Ctxt &ctxt, const FHEPubKey &pKey, const vector< long > &ptxt) const |
virtual void | encrypt (Ctxt &ctxt, const FHEPubKey &pKey, const vector< ZZX > &ptxt) const |
virtual void | encrypt (Ctxt &ctxt, const FHEPubKey &pKey, const PlaintextArray &ptxt) const |
virtual void | decrypt (const Ctxt &ctxt, const FHESecKey &sKey, vector< long > &ptxt) const |
virtual void | decrypt (const Ctxt &ctxt, const FHESecKey &sKey, vector< ZZX > &ptxt) const |
virtual void | decrypt (const Ctxt &ctxt, const FHESecKey &sKey, PlaintextArray &ptxt) const |
virtual void | select (Ctxt &ctxt1, const Ctxt &ctxt2, const vector< long > &selector) const |
MUX: ctxt1 = ctxt1*selector + ctxt2*(1-selector) | |
virtual void | select (Ctxt &ctxt1, const Ctxt &ctxt2, const vector< ZZX > &selector) const |
virtual void | select (Ctxt &ctxt1, const Ctxt &ctxt2, const PlaintextArray &selector) const |
void | encode (ZZX &ptxt, const vector< RX > &array) const |
void | decode (vector< RX > &array, const ZZX &ptxt) const |
void | encrypt (Ctxt &ctxt, const FHEPubKey &pKey, const vector< RX > &ptxt) const |
void | decrypt (const Ctxt &ctxt, const FHESecKey &sKey, vector< RX > &ptxt) const |
void | buildLinPolyCoeffs (vector< ZZX > &C, const vector< ZZX > &L) const |
Linearized polynomials. L describes a linear map M by describing its action on the standard power basis: M(x^j mod G) = (L[j] mod G), for j = 0..d-1. The result is a coefficient vector C for the linearized polynomial representing M: for h in Z/(p^r)[X] of degree < d,. More... | |
![]() | |
long | size () const |
Total size (# of slots) of hypercube. | |
long | dimension () const |
Number of dimensions of hypercube. | |
long | sizeOfDimension (long i) const |
Size of given dimension. | |
long | nativeDimension (long i) const |
Is rotations in given dimension a "native" operation? | |
long | coordinate (long i, long k) const |
returns coordinate of index k along the i'th dimension | |
Derived concrete implementation of EncryptedArrayBase.
|
virtual |
Linearized polynomials. L describes a linear map M by describing its action on the standard power basis: M(x^j mod G) = (L[j] mod G), for j = 0..d-1. The result is a coefficient vector C for the linearized polynomial representing M: for h in Z/(p^r)[X] of degree < d,.
M(h(X) mod G) = sum_{i=0}^{d-1} (C[j] mod G) * (h(X^{p^j}) mod G).
Implements EncryptedArrayBase.
|
virtual |
rotate k positions along the i'th dimension
dc | means "don't care", which means that the caller guarantees that only zero elements rotate off the end – this allows for some optimizations that would not otherwise be possible |
Implements EncryptedArrayBase.