Browse Source

Fixed a bug in pir_client.get_one_ct()

Andrew Beams 2 years ago
parent
commit
e8ffad1f7a
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/pir_client.cpp

+ 6 - 1
src/pir_client.cpp

@@ -298,6 +298,11 @@ Plaintext PIRClient::replace_element(Plaintext pt, vector<uint64_t> new_element,
 Ciphertext PIRClient::get_one(){
     Plaintext pt("1");
     Ciphertext ct;
-    encryptor_->encrypt(pt, ct);
+    if(pir_params_.enable_symmetric){
+        encryptor_->encrypt_symmetric(pt, ct);
+    }
+    else{
+        encryptor_->encrypt(pt, ct);
+    }
     return ct;
 }