'privPointLoc'
Encryptor.h
1 
7 #ifndef PRIVPOINTLOC_ENCRYPTOR_H
8 #define PRIVPOINTLOC_ENCRYPTOR_H
9 
10 #include <helib/helib.h>
11 
12 class Encryptor {
13 public:
14  Encryptor(const std::string &, const std::string &, long, long, long, long, long);
15 
16  Encryptor(const std::string &, const std::string &, long, long, long, long, long, long);
17 
18  Encryptor(const std::string &, const std::string &);
19 
20  ~Encryptor();
21 
22  void testEncryption();
23 
24  void decryptAndPrint(const std::string &, const helib::Ctxt &);
25 
30  void decryptAndPrintCondensed(const std::string &, const helib::Ctxt &, int);
31 
32  helib::Context *getContext() const;
33 
34  helib::SecKey *getSecretKey() const;
35 
36  helib::PubKey *getPublicKey() const;
37 
38  helib::EncryptedArray *getEncryptedArray() const;
39 
40  int getSlotCount();
41 
42 private:
43  // Plaintext prime modulus.
44  long plaintextModulus = 2;
45  // Cyclotomic polynomial - defines phi(m).
46  long phiM = 0;
47  // Hensel lifting (default = 1).
48  long lifting = 1;
49  // Number of bits of the modulus chain.
50  long numOfBitsOfModulusChain = 500;
51  // Number of columns of Key-Switching matrix (typically 2 or 3).
52  long numOfColOfKeySwitchingMatrix = 2;
53  // slot count
54  long desiredSlotCount = 3000;
55  // security level
56  long securityLevel = 80;
57 
58  helib::Context *context;
59  helib::SecKey *secret_key;
60  helib::PubKey *public_key;
61  helib::EncryptedArray *encrypted_array;
62 };
63 
64 #endif //PRIVPOINTLOC_ENCRYPTOR_H
Definition: Encryptor.h:12
void decryptAndPrintCondensed(const std::string &, const helib::Ctxt &, int)
Definition: Encryptor.cpp:199