The public key. More...
#include <FHE.h>
Public Member Functions | |
FHEPubKey (const FHEcontext &_context) | |
void | clear () |
bool | operator== (const FHEPubKey &other) const |
bool | operator!= (const FHEPubKey &other) const |
const FHEcontext & | getContext () const |
long | getSKeyWeight (long keyID=0) const |
The Hamming weight of the secret key. | |
bool | isReachable (long k, long keyID=0) const |
Is it possible to re-linearize the automorphism X -> X^k See Section 3.2.2 in the design document (KeySwitchMap) | |
void | setKeySwitchMap (long keyId=0) |
Compute the reachability graph of key-switching matrices See Section 3.2.2 in the design document (KeySwitchMap) | |
long | Encrypt (Ctxt &ciphertxt, const ZZX &plaintxt, long ptxtSpace=0) const |
Result returned in the ciphertext argument, The resurn value is the plaintext-space for that ciphertext. | |
Find key-switching matrices | |
const KeySwitch & | getKeySWmatrix (const SKHandle &from, long toID=0) const |
Find a key-switching matrix by its indexes. If no such matrix exists it returns a dummy matrix with toKeyID==-1. | |
const KeySwitch & | getKeySWmatrix (long fromSPower, long fromXPower, long fromID=0, long toID=0) const |
bool | haveKeySWmatrix (const SKHandle &from, long toID=0) const |
bool | haveKeySWmatrix (long fromSPower, long fromXPower, long fromID=0, long toID=0) const |
const KeySwitch & | getAnyKeySWmatrix (const SKHandle &from) const |
Is there a matrix from this key to any base key? | |
bool | haveAnyKeySWmatrix (const SKHandle &from) const |
const KeySwitch & | getNextKSWmatrix (long fromXPower, long fromID=0) const |
Get the next matrix to use for multi-hop automorphism See Section 3.2.2 in the design document. | |
Friends | |
class | FHESecKey |
ostream & | operator<< (ostream &str, const FHEPubKey &pk) |
istream & | operator>> (istream &str, FHEPubKey &pk) |
The public key.