Browse Source

Correction: Adding functions to lib.rs

Hovsep Papoyan 8 months ago
parent
commit
2c40b563b4
2 changed files with 12 additions and 3 deletions
  1. 0 1
      src/CryptoContext.h
  2. 12 2
      src/lib.rs

+ 0 - 1
src/CryptoContext.h

@@ -327,7 +327,6 @@ public:
         const uint32_t dim1 /* 0 */, const uint32_t L /* 0 */) const;
     void EvalSchemeSwitchingKeyGen(const KeyPairDCRTPoly& keyPair,
         const LWEPrivateKey& lwesk) const;
-
     [[nodiscard]] std::shared_ptr<CryptoContextImpl> GetInternal() const;
 };
 // cxx currently does not support static class methods

+ 12 - 2
src/lib.rs

@@ -719,7 +719,8 @@ pub mod ffi
                                             -> UniquePtr<DecryptResult>;
         fn GetRingDimension(self: &CryptoContextDCRTPoly) -> u32;
         fn GetCyclotomicOrder(self: &CryptoContextDCRTPoly) -> u32;
-        fn MakeStringPlaintext(self: &CryptoContextDCRTPoly, s: &CxxString) -> UniquePtr<Plaintext>;
+        fn MakeStringPlaintext(self: &CryptoContextDCRTPoly, s: &CxxString)
+                               -> UniquePtr<Plaintext>;
         fn MakeCoefPackedPlaintext(self: &CryptoContextDCRTPoly, value: &CxxVector<i64>,
                                    noiseScaleDeg: /* 1 */ usize, level: /* 0 */ u32)
                                    -> UniquePtr<Plaintext>;
@@ -814,7 +815,8 @@ pub mod ffi
                         newPrivateKey: SharedPtr<PrivateKeyImpl>) -> UniquePtr<EvalKeyDCRTPoly>;
         fn ReKeyGen(self: &CryptoContextDCRTPoly, oldPrivateKey: SharedPtr<PrivateKeyImpl>,
                     newPublicKey: SharedPtr<PublicKeyImpl>) -> UniquePtr<EvalKeyDCRTPoly>;
-        fn MultiKeySwitchGen(self: &CryptoContextDCRTPoly, originalPrivateKey: SharedPtr<PrivateKeyImpl>,
+        fn MultiKeySwitchGen(self: &CryptoContextDCRTPoly,
+                             originalPrivateKey: SharedPtr<PrivateKeyImpl>,
                              newPrivateKey: SharedPtr<PrivateKeyImpl>, evalKey: &EvalKeyDCRTPoly)
                              -> UniquePtr<EvalKeyDCRTPoly>;
         fn MultiAddEvalKeys(self: &CryptoContextDCRTPoly, evalKey1: &EvalKeyDCRTPoly,
@@ -829,6 +831,14 @@ pub mod ffi
         fn EvalSumKeyGen(self: &CryptoContextDCRTPoly, privateKey: SharedPtr<PrivateKeyImpl>,
                          publicKey: /* null() */ SharedPtr<PublicKeyImpl>);
 
+        fn EvalCKKStoFHEWKeyGen(self: &CryptoContextDCRTPoly, keyPair: &KeyPairDCRTPoly,
+                                lwesk: &LWEPrivateKey);
+        fn EvalFHEWtoCKKSKeyGen(self: &CryptoContextDCRTPoly, keyPair: &KeyPairDCRTPoly,
+                                lwesk: &LWEPrivateKey, numSlots: /* 0 */ u32,
+                                numCtxts: /* 0 */ u32, dim1: /* 0 */ u32, L: /* 0 */ u32);
+        fn EvalSchemeSwitchingKeyGen(self: &CryptoContextDCRTPoly, keyPair: &KeyPairDCRTPoly,
+                                     lwesk: &LWEPrivateKey);
+
         // cxx currently does not support static class methods
         fn ClearEvalMultKeys();
         fn ClearEvalMultKeysById(id: &CxxString);