cryptocontext_wrapper.h 1.7 KB

123456789101112131415161718192021222324252627282930313233
  1. #ifndef OPENFHE_CRYPTOCONTEXT_BINDINGS_H
  2. #define OPENFHE_CRYPTOCONTEXT_BINDINGS_H
  3. #include <pybind11/pybind11.h>
  4. #include <pybind11/stl.h>
  5. #include <vector>
  6. #include <algorithm>
  7. #include <complex>
  8. #include "openfhe.h"
  9. #include "bindings.h"
  10. namespace py = pybind11;
  11. using namespace lbcrypto;
  12. using ParmType = typename DCRTPoly::Params;
  13. Ciphertext<DCRTPoly> EvalFastRotationPrecomputeWrapper(CryptoContext<DCRTPoly>& self,
  14. ConstCiphertext<DCRTPoly> ciphertext);
  15. Ciphertext<DCRTPoly> EvalFastRotationWrapper(CryptoContext<DCRTPoly>& self,
  16. ConstCiphertext<DCRTPoly> ciphertext,
  17. const usint index,
  18. const usint m,
  19. ConstCiphertext<DCRTPoly> digits);
  20. Ciphertext<DCRTPoly> EvalFastRotationExtWrapper(CryptoContext<DCRTPoly>& self,ConstCiphertext<DCRTPoly> ciphertext, const usint index, ConstCiphertext<DCRTPoly> digits, bool addFirst);
  21. Plaintext DecryptWrapper(CryptoContext<DCRTPoly>& self,
  22. ConstCiphertext<DCRTPoly> ciphertext,const PrivateKey<DCRTPoly> privateKey);
  23. Plaintext DecryptWrapper(CryptoContext<DCRTPoly>& self,
  24. const PrivateKey<DCRTPoly> privateKey,ConstCiphertext<DCRTPoly> ciphertext);
  25. const std::map<usint, EvalKey<DCRTPoly>> EvalAutomorphismKeyGenWrapper(CryptoContext<DCRTPoly>& self,const PrivateKey<DCRTPoly> privateKey,const std::vector<usint> &indexList);
  26. const std::map<usint, EvalKey<DCRTPoly>> EvalAutomorphismKeyGenWrapper_PublicKey(CryptoContext<DCRTPoly>& self,const PublicKey<DCRTPoly> publicKey, const PrivateKey<DCRTPoly> privateKey, const std::vector<usint> &indexList);
  27. #endif // OPENFHE_CRYPTOCONTEXT_BINDINGS_H