Commit c6c9d2f5 authored by Hoang Gia NGUYEN's avatar Hoang Gia NGUYEN
Browse files

first commit

parent fe2d6195
Pipeline #60 failed with stages
in 0 seconds

Too many changes to show.

To preserve performance only 275 of 275+ files are displayed.
# Decrypt Result
CURR_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
###################### General - Begin ######################
resultPath=$1 # ex: result/l.ct
sample=$2 # ex: 40
keyDir=$3 # ex: keys/
time ${CURR_DIR}/similarityMatch_decrypt_result "$resultPath" "$sample" "$keyDir"
###################### General - End ########################
\ No newline at end of file
# Encrypt Data
CURR_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
###################### General - Begin ######################
licenseNo=$1 # ex: "23 65 78 127 255" (en ASCII)
outputFileName=$2 # ex: "l" (extension will be .ct)
outputDir=$3 # ex: lcheck/
sample=$4 # ex: 40
keyDir=$5 # ex: keys/
time ${CURR_DIR}/similarityMatch_encrypt "$licenseNo" "$outputFileName" "$outputDir" "$sample" "$keyDir"
###################### General - End ########################
\ No newline at end of file
# Evaluate
CURR_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
###################### General - Begin ######################
licensePath=$1 # ex: lcheck/l.ct
licensePathList=${@: 2:$#-5} # ex: parent/l0/l.ct parent/l1/l.ct parent/l2/l.ct parent/l3/l.ct parent/l4/l.ct parent/l5/l.ct parent/l6/l.ct parent/l7/l.ct parent/l8/l.ct parent/l9/l.ct
outputFileName=${@: -4:1} # ex: "l" (extension will be .ct)
outputDir=${@: -3:1} # ex: result/
sample=${@: -2:1} # ex: 40
KeyDir=${@: -1} # ex: keys/
time ${CURR_DIR}/similarityMatch_evaluate "$licensePath" $licensePathList "$outputFileName" "$outputDir" "$sample" "$KeyDir"
###################### General - End ########################
\ No newline at end of file
# Generate Keys
CURR_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
###################### General - Begin ######################
keyDir=$1 # ex: keys/
time ${CURR_DIR}/similarityMatch_genkey "$keyDir"
###################### General - End ########################
\ No newline at end of file
#include "seal_api.h"
/* namespaces */
using namespace std;
using namespace seal;
/* functions */
int open_binary_file(ifstream &in_file, const string &filename)
{
int ret = 1;
in_file = ifstream(filename, ios::binary);
if (!in_file)
{
// cerr << "[ERRROR] file opening failure" << endl;
ret = 0;
}
return ret;
}
int open_binary_file(ofstream &out_file, const string &filename)
{
int ret = 1;
out_file = ofstream(filename, ios::binary);
if (!out_file)
{
// cerr << "[ERRROR] file opening failure" << endl;
ret = 0;
}
return ret;
}
int save_params(EncryptionParameters &params, const string &filename)
{
int ret = 1;
ofstream out_file;
if (open_binary_file(out_file, filename))
params.save(out_file);
else
ret = 0;
return ret;
}
int load_params(EncryptionParameters &params, const string &filename)
{
int ret = 1;
ifstream in_file;
if (open_binary_file(in_file, filename))
params.load(in_file);
else
ret = 0;
return ret;
}
void init_context(size_t poly_d, size_t p_modulus, shared_ptr<SEALContext> &context)
{
EncryptionParameters params(scheme_type::BFV);
params.set_poly_modulus_degree(poly_d);
params.set_coeff_modulus(CoeffModulus::BFVDefault(poly_d));
params.set_plain_modulus(p_modulus);
save_params(params, "bfv_params.conf");
context = SEALContext::Create(params);
print_context(context);
}
void init_context_batching(size_t poly_d, int bit_size, shared_ptr<SEALContext> &context, const std::string &key_dir)
{
EncryptionParameters params(scheme_type::BFV);
params.set_poly_modulus_degree(poly_d);
params.set_coeff_modulus(CoeffModulus::BFVDefault(poly_d));
params.set_plain_modulus(PlainModulus::Batching(poly_d, bit_size));
save_params(params, key_dir + "bfv_params.conf");
context = SEALContext::Create(params);
print_context(context);
}
void init_context_batching(
size_t poly_d, vector<int> bit_sizes, std::uint64_t plain_modulus, shared_ptr<SEALContext> &context,
const std::string &key_dir)
{
EncryptionParameters params(scheme_type::BFV);
params.set_poly_modulus_degree(poly_d);
params.set_coeff_modulus(CoeffModulus::Create(poly_d, { 36, 36, 37 }));
params.set_plain_modulus(plain_modulus);
save_params(params, key_dir + "bfv_params.conf");
context = SEALContext::Create(params);
print_context(context);
}
void load_context(shared_ptr<SEALContext> &context, const string &filename)
{
EncryptionParameters params;
load_params(params, filename);
context = SEALContext::Create(params);
print_context(context);
}
/* print paramaeters function from examples.h */
void print_context(shared_ptr<SEALContext> &context)
{
if (!context)
throw invalid_argument("[ERROR] context is not set");
auto &context_data = *context->key_context_data();
/* which scheme is used */
string scheme_name;
switch (context_data.parms().scheme())
{
case seal::scheme_type::BFV:
scheme_name = "BFV";
break;
case seal::scheme_type::CKKS:
scheme_name = "CKKS";
break;
default:
throw invalid_argument("[ERROR] unsupported scheme");
}
// cout << "[CONTEXT] scheme: " << scheme_name << endl;
// cout << "[CONTEXT] poly_modulus_degree: " << context_data.parms().poly_modulus_degree() << endl;
/* Print the size of the true (product) coefficient modulus */
// cout << "[CONTEXT] coeff_modulus size: ";
// cout << context_data.total_coeff_modulus_bit_count() << " (";
// auto coeff_modulus = context_data.parms().coeff_modulus();
// size_t coeff_modulus_size = coeff_modulus.size();
// for (size_t i = 0; i < coeff_modulus_size - 1; i++)
// cout << coeff_modulus[i].bit_count() << " + ";
// cout << coeff_modulus.back().bit_count();
// cout << ") bits" << endl;
// cout << "[CONTEXT] coeff_modulus values: (" ;
// for (int i = 0; i < (coeff_modulus.size() - 1); ++i)
// {
// cout << coeff_modulus[i].value() << ",\t";
// cout << coeff_modulus[coeff_modulus.size() - 1].value() << ")" << endl;
// }
/* For the BFV scheme print the plain_modulus parameter */
// if (context_data.parms().scheme() == seal::scheme_type::BFV)
// {
// cout << "[CONTEXT] plain_modulus: " << context_data.parms().plain_modulus().value() << endl;
// }
}
int save_key(PublicKey &k, const string &filename)
{
int ret = 1;
ofstream out_file;
if (open_binary_file(out_file, filename))
k.save(out_file);
else
ret = 0;
return ret;
}
int save_key(SecretKey &k, const string &filename)
{
int ret = 1;
ofstream out_file;
if (open_binary_file(out_file, filename))
k.save(out_file);
else
ret = 0;
return ret;
}
int save_key(RelinKeys &k, const string &filename)
{
int ret = 1;
ofstream out_file;
if (open_binary_file(out_file, filename))
k.save(out_file);
else
ret = 0;
return ret;
}
int save_key(Serializable<RelinKeys> &k, const string &filename)
{
int ret = 1;
ofstream out_file;
if (open_binary_file(out_file, filename))
k.save(out_file);
else
ret = 0;
return ret;
}
int save_key(GaloisKeys &k, const string &filename)
{
int ret = 1;
ofstream out_file;
if (open_binary_file(out_file, filename))
k.save(out_file);
else
ret = 0;
return ret;
}
int save_key(Serializable<GaloisKeys> &k, const string &filename)
{
int ret = 1;
ofstream out_file;
if (open_binary_file(out_file, filename))
k.save(out_file);
else
ret = 0;
return ret;
}
int load_key(shared_ptr<SEALContext> &context, const string &filename, PublicKey &k)
{
int ret = 1;
ifstream in_file;
if (open_binary_file(in_file, filename))
k.load(context, in_file);
else
ret = 0;
return ret;
}
int load_key(shared_ptr<SEALContext> &context, const string &filename, SecretKey &k)
{
int ret = 1;
ifstream in_file;
if (open_binary_file(in_file, filename))
k.load(context, in_file);
else
ret = 0;
return ret;
}
int load_key(shared_ptr<SEALContext> &context, const string &filename, RelinKeys &k)
{
int ret = 1;
ifstream in_file;
if (open_binary_file(in_file, filename))
k.load(context, in_file);
else
ret = 0;
return ret;
}
int load_key(shared_ptr<SEALContext> &context, const string &filename, GaloisKeys &k)
{
int ret = 1;
ifstream in_file;
if (open_binary_file(in_file, filename))
k.load(context, in_file);
else
ret = 0;
return ret;
}
void generate_keys(size_t poly_d, size_t p_modulus, bool serializable)
{
shared_ptr<SEALContext> context;
init_context(poly_d, p_modulus, context);
KeyGenerator keygen(context);
PublicKey pk = keygen.public_key();
save_key(pk, "bfv.pk");
SecretKey sk = keygen.secret_key();
save_key(sk, "bfv.sk");
if (serializable)
{
Serializable<RelinKeys> lk = keygen.relin_keys();
save_key(lk, "bfv.lk");
}
else
{
RelinKeys lk = keygen.relin_keys_local();
save_key(lk, "bfv.lk");
}
}
bool suffix_exist(const std::string &str, const std::string &suffix)
{
return str.size() >= suffix.size() && str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
}
/*
Helper function: Prints the parameters in a SEALContext.
*/
inline void print_parameters(std::shared_ptr<seal::SEALContext> context)
{
// Verify parameters
if (!context)
{
throw std::invalid_argument("context is not set");
}
auto &context_data = *context->key_context_data();
/*
Which scheme are we using?
*/
std::string scheme_name;
switch (context_data.parms().scheme())
{
case seal::scheme_type::BFV:
scheme_name = "BFV";
break;
case seal::scheme_type::CKKS:
scheme_name = "CKKS";
break;
default:
throw std::invalid_argument("unsupported scheme");
}
// cout << "/" << std::endl;
// cout << "| Encryption parameters :" << std::endl;
// cout << "| scheme: " << scheme_name << std::endl;
// cout << "| poly_modulus_degree: " << context_data.parms().poly_modulus_degree() << std::endl;
/*
Print the size of the true (product) coefficient modulus.
*/
// cout << "| coeff_modulus size: ";
// cout << context_data.total_coeff_modulus_bit_count() << " (";
// auto coeff_modulus = context_data.parms().coeff_modulus();
// std::size_t coeff_modulus_size = coeff_modulus.size();
// for (std::size_t i = 0; i < coeff_modulus_size - 1; i++)
// {
// cout << coeff_modulus[i].bit_count() << " + ";
// }
// cout << coeff_modulus.back().bit_count();
// cout << ") bits" << std::endl;
/*
For the BFV scheme print the plain_modulus parameter.
*/
// if (context_data.parms().scheme() == seal::scheme_type::BFV)
// {
// cout << "| plain_modulus: " << context_data.parms().plain_modulus().value() << std::endl;
// }
// cout << "\\" << std::endl;
}
void batching_generate_keys(size_t poly_d, int bit_size, string key_dir, bool serializable)
{
shared_ptr<SEALContext> context;
// init_context_batching(poly_d, bit_size, context, key_dir);
// auto qualifiers = context->first_context_data()->qualifiers();
// cout << "Batching enabled: " << boolalpha << qualifiers.using_batching << endl;
string keypath("");
string keypath1("/bfv.pk");
string keypath2("/bfv.sk");
string keypath3("/bfv.lk");
string keypath4("/bfv.gk");
string bfv_params_path(key_dir + "/");
if (suffix_exist(key_dir, "/"))
{
keypath1 = "bfv.pk";
keypath2 = "bfv.sk";
keypath3 = "bfv.lk";
keypath4 = "bfv.gk";
bfv_params_path = key_dir;
}
init_context_batching(poly_d, bit_size, context, bfv_params_path);
KeyGenerator keygen(context);
PublicKey pk = keygen.public_key();
keypath.append(key_dir);
keypath.append(keypath1);
// cout << "[INFO] Keypathname pk: " << keypath << endl;
save_key(pk, keypath);
keypath = "";
keypath.append(key_dir);
keypath.append(keypath2);
SecretKey sk = keygen.secret_key();
// cout << "[INFO] Keypathname sk: " << keypath << endl;
save_key(sk, keypath);
keypath = "";
keypath.append(key_dir);
keypath.append(keypath3);
// cout << "[INFO] Keypathname lk: " << keypath << endl;
if (serializable)
{
Serializable<RelinKeys> lk = keygen.relin_keys();
save_key(lk, keypath);
}
else
{
RelinKeys lk = keygen.relin_keys_local();
save_key(lk, keypath);
}
keypath = "";
keypath.append(key_dir);
keypath.append(keypath4);
// cout << "[INFO] Keypathname gk: " << keypath << endl;
if (serializable)
{
Serializable<GaloisKeys> gk = keygen.galois_keys();
save_key(gk, keypath);
}
else
{
GaloisKeys gk = keygen.galois_keys_local();
save_key(gk, keypath);
}
// print_parameters(context);
}
void batching_generate_keys(
size_t poly_d, vector<int> bit_sizes, std::uint64_t plain_modulus, string key_dir, bool serializable)
{
shared_ptr<SEALContext> context;
// init_context_batching(poly_d, bit_sizes, plain_modulus, context, key_dir);
// auto qualifiers = context->first_context_data()->qualifiers();
// cout << "Batching enabled: " << boolalpha << qualifiers.using_batching << endl;
string keypath("");
string keypath1("/bfv.pk");
string keypath2("/bfv.sk");
string keypath3("/bfv.lk");
string keypath4("/bfv.gk");
string bfv_params_path(key_dir + "/");
if (suffix_exist(key_dir, "/"))
{
keypath1 = "bfv.pk";
keypath2 = "bfv.sk";
keypath3 = "bfv.lk";
keypath4 = "bfv.gk";
bfv_params_path = key_dir;
}
init_context_batching(poly_d, bit_sizes, plain_modulus, context, bfv_params_path);
KeyGenerator keygen(context);
PublicKey pk = keygen.public_key();
keypath.append(key_dir);
keypath.append(keypath1);
// cout << "[INFO] Keypathname pk: " << keypath << endl;
save_key(pk, keypath);
keypath = "";
keypath.append(key_dir);
keypath.append(keypath2);
SecretKey sk = keygen.secret_key();
// cout << "[INFO] Keypathname sk: " << keypath << endl;
save_key(sk, keypath);
keypath = "";
keypath.append(key_dir);
keypath.append(keypath3);
// cout << "[INFO] Keypathname lk: " << keypath << endl;
if (serializable)
{
Serializable<RelinKeys> lk = keygen.relin_keys();
save_key(lk, keypath);
}
else
{
RelinKeys lk = keygen.relin_keys_local();
save_key(lk, keypath);
}
keypath = "";
keypath.append(key_dir);
keypath.append(keypath4);
// cout << "[INFO] Keypathname gk: " << keypath << endl;
if (serializable)
{
Serializable<GaloisKeys> gk = keygen.galois_keys();
save_key(gk, keypath);
}
else
{
GaloisKeys gk = keygen.galois_keys_local();
save_key(gk, keypath);
}
// print_parameters(context);
}
void init_operator(struct encryptor_t &op_st)
{
load_context(op_st.context, "bfv_params.conf");
PublicKey pk;
load_key(op_st.context, "bfv.pk", pk);
op_st.encr = new Encryptor(op_st.context, pk);
op_st.icode = new IntegerEncoder(op_st.context);
}
void init_operator(struct encryptor_t &op_st, const string &key_dir)
{
string bfv_params_path("");
string bfv_params_path1("/bfv_params.conf");
bfv_params_path = "";
bfv_params_path.append(key_dir);
bfv_params_path.append(bfv_params_path1);
// cout << "[INFO] bfvparams: " << bfv_params_path << endl;
load_context(op_st.context, bfv_params_path);
PublicKey pk;
string keypath("");
string keypath1("bfv.pk");
keypath.append(key_dir);
keypath.append(keypath1);
// cout << "[INFO] Keypath encrypt: " << keypath << endl;
load_key(op_st.context, keypath, pk);
op_st.encr = new Encryptor(op_st.context, pk);
op_st.icode = new IntegerEncoder(op_st.context);
}
void init_operator_batching(struct encryptor_t &op_st, const string &key_dir)
{
init_operator(op_st, key_dir);
op_st.bcode = new BatchEncoder(op_st.context);
}
void delete_operator(struct encryptor_t &op_st)
{
delete op_st.encr;
delete op_st.icode;
}
void delete_operator_batching(struct encryptor_t &op_st)
{
delete_operator(op_st);
delete op_st.bcode;
}
void init_operator(struct decryptor_t &op_st)
{
load_context(op_st.context, "bfv_params.conf");
SecretKey sk;
load_key(op_st.context, "bfv.sk", sk);
op_st.decr = new Decryptor(op_st.context, sk);
op_st.icode = new IntegerEncoder(op_st.context);
}
void init_operator(struct decryptor_t &op_st, const std::string &key_dir)
{
string bfv_params_path("");
string bfv_params_path1("/bfv_params.conf");
bfv_params_path = "";
bfv_params_path.append(key_dir);
bfv_params_path.append(bfv_params_path1);
// cout << "[INFO] bfvparams: " << bfv_params_path << endl;
load_context(op_st.context, bfv_params_path);
SecretKey sk;
string keypath("");
string keypath1("bfv.sk");
keypath.append(key_dir);
keypath.append(keypath1);
// cout << "[INFO] Keypath decrypt: " << keypath << endl;
load_key(op_st.context, keypath, sk);
op_st.decr = new Decryptor(op_st.context, sk);
op_st.icode = new IntegerEncoder(op_st.context);
}
void init_operator_batching(struct decryptor_t &op_st, const string &key_dir)
{
init_operator(op_st, key_dir);
op_st.bcode = new BatchEncoder(op_st.context);
}
void delete_operator(struct decryptor_t &op_st)
{
delete op_st.decr;
delete op_st.icode;
}
void delete_operator_batching(struct decryptor_t &op_st)
{
delete_operator(op_st);
delete op_st.bcode;
}
void init_operator(struct evaluator_t &op_st)
{
load_context(op_st.context, "bfv_params.conf");
load_key(op_st.context, "bfv.lk", op_st.lk);
op_st.eval = new Evaluator(op_st.context);
}
void init_operator(struct evaluator_t &op_st, const string &relink_key_path)
{
load_context(op_st.context, "bfv_params.conf");
load_key(op_st.context, relink_key_path, op_st.lk);
op_st.eval = new Evaluator(op_st.context);
}
void init_operator_batching(struct evaluator_t &op_st, const string &key_dir)
{
string bfv_params_path("");
string bfv_params_path1("/bfv_params.conf");
bfv_params_path = "";
bfv_params_path.append(key_dir);
bfv_params_path.append(bfv_params_path1);
// cout << "[INFO] bfvparams: " << bfv_params_path << endl;
load_context(op_st.context, bfv_params_path);
string keypath("");
string keypath1("bfv.lk");
keypath.append(key_dir);
keypath.append(keypath1);
// cout << "[INFO] Keypath evaluator: " << keypath << endl;
load_key(op_st.context, keypath, op_st.lk);
string keypath3("");
string keypath4("bfv.gk");
keypath3.append(key_dir);
keypath3.append(keypath4);
// cout << "[INFO] Keypath evaluator: " << keypath3 << endl;
load_key(op_st.context, keypath3, op_st.gk);
op_st.eval = new Evaluator(op_st.context);
}
void delete_operator(struct evaluator_t &op_st)
{
delete op_st.eval;
}
void delete_operator_batching(struct evaluator_t &op_st)
{
delete_operator(op_st);
}
void init_plaintext(struct encryptor_t &op_st, int64_t plain, Plaintext &pt)
{
pt = Plaintext(op_st.icode->encode(plain));
}
void init_ciphertext(struct encryptor_t &op_st, int64_t plain, Ciphertext &ct)
{
// cout << "[INFO] encrypting: " << endl;
op_st.encr->encrypt(Plaintext(op_st.icode->encode(plain)), ct);
// cout << plain << endl;
}
void init_ciphermatrix(struct encryptor_t &op_st, vector<int64_t> &plain_matrix, Ciphertext &encrypted_matrix)
{
// cout << "[INFO] encrypting: " << endl;
Plaintext plaintext_matrix;
// BatchEncoder batch_encoder(op_st.context);
// batch_encoder.encode(plain_matrix, plaintext_matrix);
op_st.bcode->encode(plain_matrix, plaintext_matrix);
op_st.encr->encrypt(plaintext_matrix, encrypted_matrix);
// cout << plain << endl;
}
void decrypt_ciphertext(struct decryptor_t &op_st, Ciphertext &ct)
{
Plaintext pt;
op_st.decr->decrypt(ct, pt);
int64_t res = op_st.icode->decode_int64(pt);
// cout << "[INFO] decrypted result: " << res << endl;
}
int64_t decrypt_ciphertext_and_return_value(struct decryptor_t &op_st, Ciphertext &ct)
{
Plaintext pt;
op_st.decr->decrypt(ct, pt);
int64_t res = op_st.icode->decode_int64(pt);
// cout << "[INFO] Decrypted result: " << res << endl;
return res;
}
vector<int64_t> decrypt_ciphermatrix(struct decryptor_t &op_st, Ciphertext &ct)
{
Plaintext pt;
op_st.decr->decrypt(ct, pt);
vector<int64_t> pod_matrix;
BatchEncoder batch_encoder(op_st.context);
batch_encoder.decode(pt, pod_matrix);
// print_matrix(pod_matrix, 3);
return pod_matrix;
}
int save_plaintext(Plaintext &pt, const string &filename)
{
int ret = 1;
ofstream out_file;
if (open_binary_file(out_file, filename))
pt.save(out_file);
else
ret = 0;
return ret;
}
int save_ciphertext(Ciphertext &ct, const string &filename)
{
int ret = 1;
ofstream out_file;
if (open_binary_file(out_file, filename))
ct.save(out_file);
else
ret = 0;
return ret;
}
int load_plaintext(shared_ptr<SEALContext> &context, Plaintext &pt, const string &filename)
{
int ret = 1;
ifstream in_file;
if (open_binary_file(in_file, filename))
pt.load(context, in_file);
else
ret = 0;
return ret;
}
int load_plaintext(struct evaluator_t &op_st, Plaintext &pt, const string &filename)
{
return load_plaintext(op_st.context, pt, filename);
}
int load_plaintext(struct decryptor_t &op_st, Plaintext &pt, const string &filename)
{
return load_plaintext(op_st.context, pt, filename);
}
int load_ciphertext(shared_ptr<SEALContext> &context, Ciphertext &ct, const string &filename)
{
int ret = 1;
ifstream in_file;
if (open_binary_file(in_file, filename))
ct.load(context, in_file);
else
ret = 0;
return ret;
}
int load_ciphertext(struct evaluator_t &op_st, Ciphertext &ct, const string &filename)
{
return load_ciphertext(op_st.context, ct, filename);
}
int load_ciphertext(struct decryptor_t &op_st, Ciphertext &ct, const string &filename)
{
return load_ciphertext(op_st.context, ct, filename);
}
#ifndef _SEAL_API_H_
#define _SEAL_API_H_
/* includes */
#include <sys/time.h>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <cstdio>
#include <cassert>
#include <cstdint>
#include <boost/lexical_cast.hpp>
#include "seal/seal.h"
/* definitions */
struct encryptor_t {
std::shared_ptr<seal::SEALContext> context;
seal::Encryptor *encr;
seal::BatchEncoder *bcode;
seal::IntegerEncoder *icode;
};
struct decryptor_t {
std::shared_ptr<seal::SEALContext> context;
seal::Decryptor *decr;
seal::BatchEncoder *bcode;
seal::IntegerEncoder *icode;
};
struct evaluator_t {
std::shared_ptr<seal::SEALContext> context;
seal::RelinKeys lk;
seal::GaloisKeys gk;
seal::Evaluator *eval;
};
/* prototypes */
/** for binary files management **/
int open_binary_file(std::ifstream& in_file, const std::string& filename);
int open_binary_file(std::ofstream& out_file, const std::string& filename);
/** for context management **/
int save_params(seal::EncryptionParameters &params, const std::string &filename);
int load_params(seal::EncryptionParameters &params, const std::string &filename);
void init_context(size_t poly_d, size_t p_modulus, std::shared_ptr<seal::SEALContext>& context);
void load_context(std::shared_ptr<seal::SEALContext>& context, const std::string& filename);
void print_context(std::shared_ptr<seal::SEALContext>& context);
/** for key management **/
int save_key(seal::PublicKey& k, const std::string& filename);
int save_key(seal::SecretKey& k, const std::string& filename);
int save_key(seal::RelinKeys& k, const std::string& filename);
int save_key(seal::GaloisKeys& k, const std::string& filename);
int load_key(std::shared_ptr<seal::SEALContext>& context, const std::string& filename, seal::PublicKey& k);
int load_key(std::shared_ptr<seal::SEALContext>& context, const std::string& filename, seal::SecretKey& k);
int load_key(std::shared_ptr<seal::SEALContext>& context, const std::string& filename, seal::RelinKeys& k);
void generate_keys(size_t poly_d, size_t p_modulus, bool seriablizable = false);
void batching_generate_keys(size_t poly_d, int bit_size, const std::string key_path, bool serializable = false);
void batching_generate_keys(size_t poly_d, std::vector<int> bit_sizes, std::uint64_t plain_modulus, std::string key_dir, bool serializable = false);
/** for homomorphic operators management **/
void init_operator(struct encryptor_t& op_st);
void init_operator(struct encryptor_t &op_st, const std::string& public_key_path);
void init_operator_batching(struct encryptor_t &op_st, const std::string& key_dir);
void init_operator(struct decryptor_t& op_st);
void init_operator(struct decryptor_t &op_st, const std::string& secret_key_path);
void init_operator_batching(struct decryptor_t &op_st, const std::string& key_dir);
void init_operator(struct evaluator_t& op_st);
void init_operator(struct evaluator_t& op_st, const std::string& relink_key_path);
void init_operator_batching(struct evaluator_t &op_st, const std::string &key_dir);
void delete_operator(struct encryptor_t& op_st);
void delete_operator_batching(struct encryptor_t& op_st);
void delete_operator(struct decryptor_t& op_st);
void delete_operator_batching(struct decryptor_t& op_st);
void delete_operator(struct evaluator_t& op_st);
void delete_operator_batching(struct evaluator_t& op_st);
/** for plaintexts and ciphertexts management **/
void init_plaintext(struct encryptor_t& op_st, int64_t plain, seal::Plaintext& pt);
void init_ciphertext(struct encryptor_t& op_st, int64_t plain, seal::Ciphertext& ct);
void init_ciphermatrix(struct encryptor_t &op_st, std::vector<int64_t> &plain_matrix, seal::Ciphertext &encrypted_matrix);
void decrypt_ciphertext(struct decryptor_t& op_st, seal::Ciphertext& ct);
std::int64_t decrypt_ciphertext_and_return_value(struct decryptor_t& op_st, seal::Ciphertext& ct);
std::vector<int64_t> decrypt_ciphermatrix(struct decryptor_t &op_st, seal::Ciphertext &ct);
int save_plaintext(seal::Plaintext& pt, const std::string& filename);
int save_ciphertext(seal::Ciphertext& ct, const std::string& filename);
int load_plaintext(std::shared_ptr<seal::SEALContext>& context, seal::Plaintext& pt, const std::string& filename);
int load_plaintext(struct evaluator_t& op_st, seal::Plaintext& pt, const std::string& filename);
int load_plaintext(struct decryptor_t& op_st, seal::Plaintext& pt, const std::string& filename);
int load_ciphertext(std::shared_ptr<seal::SEALContext>& context, seal::Ciphertext& ct, const std::string& filename);
int load_ciphertext(struct evaluator_t& op_st, seal::Ciphertext& ct, const std::string& filename);
int load_ciphertext(struct decryptor_t& op_st, seal::Ciphertext& ct, const std::string& filename);
#endif
#include <iomanip>
#include "seal_api.h"
#include "util.h"
using namespace seal;
using namespace std;
string ciphertext_name;
string key_dir;
// vector<int64_t> decrypt(size_t poly_d, size_t p_modulus, int &sample_size, string &ciphertext_dir);
vector<int64_t> decrypt(int &sample_size, string &ciphertext_dir);
int main(int argc, char **argv)
{
if (argc != 4)
{
// cout << "[ERROR] please enter /full/path/to/file/to/decrypt full/path/key " << endl;
// cout << "[ERROR] please enter prefix_file_to_decrypt full/path/key /full/path/to/storage" << endl;
cout << "[ERROR] please enter a ciphertext file path, sample size and secret key path" << endl;
return -1;
}
else
{
string dir = argv[1];
int sample_size = atol(argv[2]);
key_dir = argv[3];
vector<int64_t> result = decrypt(sample_size, dir);
for (int i = 0; i < result.size(); ++i)
{
std::cout << result[i] << ' ';
}
std::cout << endl;
return 0;
}
}
vector<int64_t> decrypt(int &sample_size, string &ciphertext_dir)
{
struct decryptor_t decr;
init_operator_batching(decr, key_dir);
// init_operator_batching(2048, 4294967296, decr, key_dir);
// init_operator_batching(4096, 4294967296, decr, key_dir);
// init_operator_batching(8192, 4294967296, decr, key_dir);
// init_operator_batching(16384, 4294967296, decr, key_dir);
// init_operator_batching(32768, 4294967296, decr, key_dir);
vector<int64_t> v;
if (sample_size <= decr.bcode->slot_count()/2)
{
Ciphertext cipher_matrix;
vector<int64_t> pod_matrix;
load_ciphertext(decr, cipher_matrix, ciphertext_dir);
pod_matrix = decrypt_ciphermatrix(decr, cipher_matrix);
for (size_t i = 0; i < sample_size; i++)
{
v.push_back(pod_matrix[i]);
}
}
else
{
// cout << endl << "Sample size is too large" << endl;
}
delete_operator_batching(decr);
return v;
}
#include <iomanip>
#include "seal_api.h"
#include "util.h"
using namespace seal;
using namespace std;
string ciphertext_name;
string key_dir;
void binarySimilarityCalculateDecrypt1st(int &sample_size, string &ciphertext_dir);
int main(int argc, char **argv)
{
if (argc != 4)
{
// cout << "[ERROR] please enter /full/path/to/file/to/decrypt full/path/key " << endl;
// cout << "[ERROR] please enter prefix_file_to_decrypt full/path/key /full/path/to/storage" << endl;
// cout << "[ERROR] please enter a ciphertext file path, sample size and secret key path" << endl;
return -1;
}
else
{
string dir = argv[1];
int sample_size = atol(argv[2]);
key_dir = argv[3];
binarySimilarityCalculateDecrypt1st(sample_size, dir);
return 0;
}
}
void binarySimilarityCalculateDecrypt1st(int &sample_size, string &ciphertext_dir)
{
struct decryptor_t decr;
init_operator_batching(decr, key_dir);
if (sample_size <= decr.bcode->slot_count() / 2)
{
Ciphertext cipher_matrix;
vector<int64_t> pod_matrix;
load_ciphertext(decr, cipher_matrix, ciphertext_dir);
pod_matrix = decrypt_ciphermatrix(decr, cipher_matrix);
vector<int64_t> v1;
for (size_t i = 0; i < sample_size; i++)
{
v1.push_back(pod_matrix[i]);
}
float sum = 0;
for (size_t i = 0; i < v1.size(); i++)
{
if (v1[i] == 0)
{
sum = sum + 1;
}
if ((i + 1) % sample_size == 0)
{
// cout << ((i + 1) / 40) << " : ";
cout << ((sum / sample_size) * 100);
sum = 0;
cout << endl;
}
}
}
else
{
cout << endl << "Sample size is too large" << endl;
}
delete_operator_batching(decr);
// return isContain;
}
\ No newline at end of file
#include <iomanip>
#include "seal_api.h"
#include "util.h"
using namespace seal;
using namespace std;
string ciphertext_name;
string key_dir;
// bool decrypt(size_t poly_d, size_t p_modulus, int &sample_size, string &ciphertext_dir);
bool decrypt(int &sample_size, string &ciphertext_dir);
void binarySimilarityCalculateDecrypt(int &sample_size, string &ciphertext_dir);
void binarySimilarityCalculateDecrypt1st(int &sample_size, string &ciphertext_dir);
int main(int argc, char **argv)
{
if (argc != 4)
{
// cout << "[ERROR] please enter /full/path/to/file/to/decrypt full/path/key " << endl;
// cout << "[ERROR] please enter prefix_file_to_decrypt full/path/key /full/path/to/storage" << endl;
// cout << "[ERROR] please enter a ciphertext file path, sample size and secret key path" << endl;
return -1;
}
else
{
string dir = argv[1];
int sample_size = atol(argv[2]);
key_dir = argv[3];
binarySimilarityCalculateDecrypt(sample_size, dir);
// binarySimilarityCalculateDecrypt1st(sample_size, dir);
// bool result_str = decrypt(sample_size, dir);
// cout << result_str << endl;
return 0;
}
}
bool decrypt(int &sample_size, string &ciphertext_dir)
{
struct decryptor_t decr;
init_operator_batching(decr, key_dir);
bool isContain = false;
if (sample_size <= decr.bcode->slot_count() / 2)
{
Ciphertext cipher_matrix;
vector<int64_t> pod_matrix;
load_ciphertext(decr, cipher_matrix, ciphertext_dir);
pod_matrix = decrypt_ciphermatrix(decr, cipher_matrix);
// cout << pod_matrix.size() << endl;
int no_dual_vectors = (decr.bcode->slot_count() / 2) / (sample_size);
for (size_t i = 0; i < decr.bcode->slot_count(); i++)
{
cout << (pod_matrix[i]);
}
vector<int64_t> v1, v2;
for (size_t i = 0; i < no_dual_vectors * sample_size; i++)
{
v1.push_back(pod_matrix[i]);
v2.push_back(pod_matrix[(pod_matrix.size() / 2) + i]);
}
int64_t sum = 0;
if (isContain == false)
{
cout << "1 : ";
for (size_t i = 0; i < v1.size(); i++)
{
cout << v1[i];
if ((i + 1) % sample_size == 0)
{
cout << endl;
if (i < v1.size() - 1)
{
cout << ((i + 1) / 40) + 1 << " : ";
}
}
else
{
cout << ", ";
}
if (v1[i] == 0)
{
sum = sum + 1;
}
else
{
sum = 0;
}
if (sum == sample_size)
{
isContain = true;
}
}
}
cout << endl;
if (isContain == false)
{
sum = 0;
cout << (v2.size() + 1) / 40 + 1 << " : ";
for (size_t i = 0; i < v2.size(); i++)
{
cout << v2[i];
if ((i + 1) % sample_size == 0)
{
cout << endl;
if (i < v2.size() - 1)
{
cout << ((v2.size() + i + 1) / 40) + 1 << " : ";
}
}
else
{
cout << ", ";
}
if (v2[i] == 0)
{
sum = sum + 1;
}
else
{
sum = 0;
}
if (sum == sample_size)
{
isContain = true;
}
}
}
cout << sample_size;
}
else
{
cout << endl << "Sample size is too large" << endl;
}
delete_operator_batching(decr);
return isContain;
}
void binarySimilarityCalculateDecrypt(int &sample_size, string &ciphertext_dir)
{
struct decryptor_t decr;
init_operator_batching(decr, key_dir);
if (sample_size <= decr.bcode->slot_count() / 2)
{
Ciphertext cipher_matrix;
vector<int64_t> pod_matrix;
load_ciphertext(decr, cipher_matrix, ciphertext_dir);
pod_matrix = decrypt_ciphermatrix(decr, cipher_matrix);
// cout << pod_matrix.size() << endl;
int no_dual_vectors = (decr.bcode->slot_count() / 2) / (sample_size);
vector<int64_t> v1, v2;
for (size_t i = 0; i < no_dual_vectors * sample_size; i++)
{
v1.push_back(pod_matrix[i]);
v2.push_back(pod_matrix[(pod_matrix.size() / 2) + i]);
}
float sum = 0;
for (size_t i = 0; i < v1.size(); i++)
{
if (v1[i] == 0)
{
sum = sum + 1;
}
if ((i + 1) % sample_size == 0)
{
// cout << ((i + 1) / 40) << " : ";
cout << ((sum / sample_size) * 100);
sum = 0;
cout << endl;
}
}
float sum2 = 0;
for (size_t i = 0; i < v2.size(); i++)
{
if (v2[i] == 0)
{
sum2 = sum2 + 1;
}
if ((i + 1) % sample_size == 0)
{
// cout << ((v2.size() + i + 1) / 40) << " : ";
cout << ((sum2 / sample_size) * 100);
sum2 = 0;
cout << endl;
}
}
}
else
{
cout << endl << "Sample size is too large" << endl;
}
delete_operator_batching(decr);
}
void binarySimilarityCalculateDecrypt1st(int &sample_size, string &ciphertext_dir)
{
struct decryptor_t decr;
init_operator_batching(decr, key_dir);
if (sample_size <= decr.bcode->slot_count() / 2)
{
Ciphertext cipher_matrix;
vector<int64_t> pod_matrix;
load_ciphertext(decr, cipher_matrix, ciphertext_dir);
pod_matrix = decrypt_ciphermatrix(decr, cipher_matrix);
vector<int64_t> v1;
for (size_t i = 0; i < sample_size; i++)
{
v1.push_back(pod_matrix[i]);
}
int unMatched = 0;
int other = 0;
float sum = 0;
for (size_t i = 0; i < v1.size(); i++)
{
if (v1[i] == 0)
{
sum = sum + 1;
} else if (v1[i] == 1 || v1[i] == -1)
{
unMatched = unMatched + 1;
} else {
other = other + 1;
}
if ((i + 1) % sample_size == 0)
{
// cout << ((i + 1) / 40) << " : ";
cout << (sum / (sample_size - other) * 100);
sum = 0;
cout << endl;
}
}
}
else
{
cout << endl << "Sample size is too large" << endl;
}
delete_operator_batching(decr);
// return isContain;
}
\ No newline at end of file
#include "seal_api.h"
using namespace seal;
using namespace std;
int main(int argc, char **argv)
{
if (argc != 6)
{
// cout << "[ERROR] please enter 1 plaintext values, prefix pathstorage(exists) " << endl;
cout << "[ERROR] please enter plaintext vector value (eg. 75 67 8 23 076 2 23), output ciphertext file name or "
"prefix, ciphertext output file directory, sample size and public key path"
<< endl;
// cout << "patternSearchN_encrypt \"1 2 3 ... 99\" filename directory/subdirectory/ 40 keys/" << endl;
return -1;
}
else
{
string plaintext = argv[1];
string ciphertext_name = argv[2];
string ciphertext_dir = argv[3];
int sample_size = atol(argv[4]);
string key_dir = argv[5];
struct encryptor_t encr;
init_operator_batching(encr, key_dir);
stringstream ss;
ss << plaintext;
vector<int64_t> pod_matrix;
int64_t x = 0;
while (ss >> x)
{
pod_matrix.push_back(x);
}
if (pod_matrix.size() <= encr.bcode->slot_count() / 2 && pod_matrix.size() <= sample_size)
{
Ciphertext encrypted_matrix;
init_ciphermatrix(encr, pod_matrix, encrypted_matrix);
save_ciphertext(encrypted_matrix, ciphertext_dir + "/" + ciphertext_name + ".ct");
delete_operator_batching(encr);
return 0;
}
else
{
delete_operator_batching(encr);
return -1;
}
// delete_operator_batching(encr);
// return 0;
}
}
// #include <algorithm>
// #include <iterator>
// #include <vector>
// #include <filesystem>
#include <iostream>
#include "seal_api.h"
#include "util.h"
using namespace seal;
using namespace std;
void sub_ciphertext(struct evaluator_t &op_st, Ciphertext &ct1, Ciphertext &ct2, Ciphertext &ct_out);
void add_ciphertext(struct evaluator_t &op_st, Ciphertext &ct1, Ciphertext &ct2, Ciphertext &ct_out);
void multiply_ciphertext(struct evaluator_t &op_st, Ciphertext &ct1, Ciphertext &ct2, Ciphertext &ct_out);
bool is_number(const string &s);
void printStrVector(const vector<string> &v);
void multiply_ciphertexts(struct evaluator_t &op_st, vector<Ciphertext> &cts, Ciphertext &ct_out);
void relinearize_inplace(struct evaluator_t &op_st, Ciphertext &ct);
void rescale_to_next_inplace(struct evaluator_t &op_st, Ciphertext &ct);
void multiply_inplace_ciphertext(struct evaluator_t &op_st, Ciphertext &ct1, Ciphertext &ct2);
void relinearize(struct evaluator_t &op_st, Ciphertext &ct, Ciphertext &ct_out);
void sub_inplace_ciphertext(struct evaluator_t &op_st, Ciphertext &ct1, Ciphertext &ct2);
void negate_inplace__ciphertext(struct evaluator_t &op_st, Ciphertext &ct);
void add_plain_inplace_ciphertext(struct evaluator_t &op_st, struct Ciphertext &ct, const Plaintext &plain);
void multiply_plain_inplace(struct evaluator_t &op_st, Ciphertext &ct, const Plaintext &plain);
void add_many_ciphertext(struct evaluator_t &op_st, vector<Ciphertext> &cts, Ciphertext &ct_out);
void exponentiate_inplace_ciphertext(struct evaluator_t &op_st, Ciphertext &ct, uint64_t &exponent);
void sub_plain_inplace_ciphertext(struct evaluator_t &op_st, Ciphertext &ct, const Plaintext &plain);
void mod_switch_to_next_inplace_ciphertext(struct evaluator_t &op_st, Ciphertext &ct);
int computeSimilarity(
string &source, vector<string> &data, string &result_name, string &result_dir, int &sample_size, string &key_dir);
int checkSq(
string &source, vector<string> &data, string &result_name, string &result_dir, int &sample_size, string &key_dir);
// string relink_key_path;
// string galois_key_path;
// string public_key_path;
string key_dir = "";
vector<vector<string>> split_ends(const vector<string> &data, const vector<int> &ends);
Ciphertext check(
string &source, vector<string> &data, string &result_name, string &result_dir, int &sample_size, string &key_dir,
struct encryptor_t &encr, struct evaluator_t &eval);
int main(int argc, char **argv)
{
// input processing - begin
// string result_name = argv[argc - 6];
// string result_dir = argv[argc - 5];
// int sample_size = atoi(argv[argc - 4]);
// relink_key_path = argv[argc - 3];
// galois_key_path = argv[argc - 2];
// public_key_path = argv[argc - 1];
string source = argv[1];
string result_name = argv[argc - 4];
string result_dir = argv[argc - 3];
int sample_size = atoi(argv[argc - 2]);
key_dir = argv[argc - 1];
vector<string> data;
for (int i = 2; i < argc - 4; i++)
{
data.push_back(argv[i]);
}
// if (source == "" || data.size() == 0 || result_name == "" || result_dir == "" || sample_size == 0 ||
// relink_key_path == "" || galois_key_path == "" || public_key_path == "")
if (source == "" || data.size() == 0 || result_name == "" || result_dir == "" || sample_size == 0 || key_dir == "")
{
// error handling
cout << "[ERROR] please enter a source path, data paths, output ciphertext file name or prefix, output "
"ciphertext directory, sample size, linking key path, galois key path and public key path"
<< endl;
return -1;
}
// input processing - end
int result = computeSimilarity(source, data, result_name, result_dir, sample_size, key_dir);
// int result = checkSq(source, data, result_name, result_dir, sample_size, key_dir);
// checkSq(source, data, result_name, result_dir, sample_size, relink_key_path, galois_key_path, public_key_path);
// error handling
if (result == -1)
{
fprintf(stderr, "error!\n");
}
else
{
cout << "done";
}
return result;
}
int computeSimilarity(
string &source, vector<string> &data, string &result_name, string &result_dir, int &sample_size, string &key_dir)
{
// cout << "\n[INFO] Start Similarity Search Algorithm!" << endl;
// cout << "\n[INFO] Start Initializing Evaluator!" << endl;
struct evaluator_t eval;
init_operator_batching(eval, key_dir);
// cout << "[INFO] End Initializing Evaluator!" << endl;
// cout << "\n[INFO] Start Initializing Encryptor!" << endl;
struct encryptor_t encr;
init_operator_batching(encr, key_dir);
// cout << "[INFO] End Initializing Encryptor!" << endl;
// cout << "\n[INFO] Input Parameters:" << endl;
// cout << " Sample Size: " << sample_size << endl;
// cout << " Required Slots (Sample Size x Data Size): " << sample_size * data.size() << endl;
// cout << " Provided Slots: " << encr.bcode->slot_count() << endl;
if (sample_size * data.size() > encr.bcode->slot_count() || sample_size > encr.bcode->slot_count() / 2)
{
// Error handling
delete_operator_batching(encr);
delete_operator_batching(eval);
return -1;
}
else
{
Ciphertext encrypted_result_matrix;
vector<int64_t> result_matrix;
init_ciphermatrix(encr, result_matrix, encrypted_result_matrix);
vector<int64_t> dummy_matrix;
for (size_t i = 0; i < sample_size; i++)
{
dummy_matrix.push_back(1);
}
Ciphertext encrypted_dummy_matrix;
init_ciphermatrix(encr, dummy_matrix, encrypted_dummy_matrix);
// Normalizing data input if the number ciphertext is odd
int normalized_data_size;
if (data.size() % 2 == 0)
{
normalized_data_size = data.size();
}
else
{
normalized_data_size = data.size() + 1;
}
// cout << "[INFO] normalized_data_size: " << normalized_data_size << endl;
int normalized_required_slots = normalized_data_size * sample_size;
int half_normalized_required_slots = normalized_required_slots / 2;
// int required_range_row = normalized_required_slots / 2;
// Create padding matrix
int padding_slots = (encr.bcode->slot_count() / 2) - half_normalized_required_slots;
// cout << "[INFO] padding_slots: " << padding_slots << endl;
vector<int64_t> padding_matrix(encr.bcode->slot_count(), 0ULL);
for (size_t i = 0; i < padding_slots; i++)
{
padding_matrix[half_normalized_required_slots + i] = 1;
padding_matrix[encr.bcode->slot_count() - 1 - i] = 1;
}
Ciphertext encrypted_padding_matrix;
init_ciphermatrix(encr, padding_matrix, encrypted_padding_matrix);
if (half_normalized_required_slots > 0 && half_normalized_required_slots <= encr.bcode->slot_count())
{
for (int index = 0; index < normalized_data_size / 2; index++)
{
Ciphertext ct1, ct2, ct3;
Ciphertext temp1, temp2;
// cout << "[INFO] loading ciphertext 1" << endl;
load_ciphertext(eval, ct1, source);
// cout << "[INFO] loading ciphertext 2" << endl;
load_ciphertext(eval, ct2, data.at(index));
sub_ciphertext(eval, ct1, ct2, temp1);
if ((normalized_data_size / 2) + index < data.size())
{
// cout << "[INFO] loading ciphertext 3" << endl;
load_ciphertext(eval, ct3, data.at((normalized_data_size / 2) + index));
sub_ciphertext(eval, ct1, ct3, temp2);
}
else
{
// Add dummy vector for oddy data
temp2 = encrypted_dummy_matrix;
}
// Switching column
eval.eval->rotate_columns_inplace(temp2, eval.gk);
add_ciphertext(eval, temp1, temp2, temp1);
add_ciphertext(eval, temp1, encrypted_result_matrix, encrypted_result_matrix);
// Shifting slots
// cout << "[INFO] index: " << index << endl;
// eval.eval->rotate_rows_inplace(encrypted_result_matrix, +sample_size, eval.gk);
// avoid the last shift
if (index + 1 != (normalized_data_size / 2))
{
eval.eval->rotate_rows_inplace(encrypted_result_matrix, -sample_size, eval.gk);
}
}
add_ciphertext(eval, encrypted_result_matrix, encrypted_padding_matrix, encrypted_result_matrix);
// Shifting the remaining slots
// eval.eval->rotate_rows_inplace(encrypted_result_matrix, +((encr.bcode->slot_count() - sample_size *
// data.size()) / 2), eval.gk); eval.eval->rotate_rows_inplace(encrypted_result_matrix,
// +((encr.bcode->slot_count()%sample_size))/2, eval.gk);
}
save_ciphertext(encrypted_result_matrix, result_dir + "/" + result_name + ".ct");
delete_operator_batching(encr);
delete_operator_batching(eval);
// cout << "\n[INFO] End Similarity Search Algorithm!" << endl;
return 0;
}
}
// This is advance algorithm - Testing
// int checkSq(
// string &source, vector<string> &data, string &result_name, string &result_dir, int &sample_size,
// string &relink_key_path, string &galois_key_path, string &public_key_path)
int checkSq(
string &source, vector<string> &data, string &result_name, string &result_dir, int &sample_size, string &key_dir)
{
struct evaluator_t eval;
// init_operator_batching(2048, 4294967296, eval, relink_key_path, galois_key_path);
// init_operator_batching(4096, 4294967296, eval, relink_key_path, galois_key_path);
// init_operator_batching(8192, 4294967296, eval, relink_key_path, galois_key_path);
// init_operator_batching(16384, 4294967296, eval, relink_key_path, galois_key_path);
// init_operator_batching(32768, 4294967296, eval, relink_key_path, galois_key_path);
init_operator_batching(eval, key_dir);
struct encryptor_t encr;
// init_operator_batching(4096, 4294967296, encr, public_key_path);
// init_operator_batching(8192, 4294967296, encr, public_key_path);
// init_operator_batching(16384, 4294967296, encr, public_key_path);
// init_operator_batching(32768, 4294967296, encr, public_key_path);
init_operator_batching(encr, key_dir);
// if (sample_size*data.size() > encr.bcode->slot_count() || sample_size > encr.bcode->slot_count()/2)
if (sample_size > encr.bcode->slot_count() / 2)
{
// error handling
delete_operator_batching(encr);
delete_operator_batching(eval);
return -1;
}
else
{
// struct evaluator_t eval;
// // init_operator_batching(2048, 4294967296, eval, relink_key_path, galois_key_path);
// // init_operator_batching(4096, 4294967296, eval, relink_key_path, galois_key_path);
// init_operator_batching(8192, 4294967296, eval, relink_key_path, galois_key_path);
// // init_operator_batching(16384, 4294967296, eval, relink_key_path, galois_key_path);
// // init_operator_batching(32768, 4294967296, eval, relink_key_path, galois_key_path);
// struct encryptor_t encr;
// // init_operator_batching(4096, 4294967296, encr, public_key_path);
// init_operator_batching(8192, 4294967296, encr, public_key_path);
// // init_operator_batching(16384, 4294967296, encr, public_key_path);
// // init_operator_batching(32768, 4294967296, encr, public_key_path);
int capacity = (encr.bcode->slot_count()) / sample_size;
// cout << capacity << endl;
// vector<string> v_temp;
// vector<string> v_v_temp;
// Ciphertext result;
vector<Ciphertext> v_result;
int nSq = data.size() / capacity;
for (size_t i = 0; i < nSq; i++)
{
Ciphertext result;
// cout << "sq : " << i << endl;
vector<string> v_temp;
for (size_t j = 0; j < capacity; j++)
{
string str = data.back();
v_temp.push_back(str);
data.pop_back();
}
if (i == 0)
{
// cout << "sq : init" << endl;
// result = check(
// source, v_temp, result_name, result_dir, sample_size, relink_key_path, galois_key_path,
// public_key_path, encr, eval);
result = check(source, v_temp, result_name, result_dir, sample_size, key_dir, encr, eval);
v_result.push_back(result);
}
else
{
// cout << "sq : other" << endl;
// Ciphertext result2 = check(
// source, v_temp, result_name, result_dir, sample_size, relink_key_path, galois_key_path,
// public_key_path, encr, eval);
// multiply_ciphertext(eval, result2, result, result);
// relinearize_inplace(eval, result);
// result = check(
// source, v_temp, result_name, result_dir, sample_size, relink_key_path, galois_key_path,
// public_key_path, encr, eval);
result = check(source, v_temp, result_name, result_dir, sample_size, key_dir, encr, eval);
v_result.push_back(result);
}
}
if (data.size() % capacity != 0)
{
// cout << "oddy!!! " << endl;
// Ciphertext result = check(
// source, data, result_name, result_dir, sample_size, relink_key_path, galois_key_path,
// public_key_path, encr, eval);
Ciphertext result = check(source, data, result_name, result_dir, sample_size, key_dir, encr, eval);
// multiply_ciphertext(eval, result2, result, result);
// relinearize_inplace(eval, result);
v_result.push_back(result);
}
Ciphertext result;
multiply_ciphertexts(eval, v_result, result);
relinearize_inplace(eval, result);
save_ciphertext(result, result_dir + "/" + result_name + ".ct");
delete_operator_batching(encr);
delete_operator_batching(eval);
return 0;
}
}
// Ciphertext check(
// string &source, vector<string> &data, string &result_name, string &result_dir, int &sample_size,
// string &relink_key_path, string &galois_key_path, string &public_key_path, struct encryptor_t &encr,
// struct evaluator_t &eval)
Ciphertext check(
string &source, vector<string> &data, string &result_name, string &result_dir, int &sample_size, string &key_dir,
struct encryptor_t &encr, struct evaluator_t &eval)
{
// if (source == "" || data.size() == 0 || result_name == "" || result_dir == "" || sample_size == 0)
// {
// // error handling
// // return -1;
// }
// else
// {
Ciphertext encrypted_result_matrix;
vector<int64_t> result_matrix;
init_ciphermatrix(encr, result_matrix, encrypted_result_matrix);
vector<int64_t> dummy_matrix;
for (size_t i = 0; i < sample_size; i++)
{
dummy_matrix.push_back(1);
}
Ciphertext encrypted_dummy_matrix;
init_ciphermatrix(encr, dummy_matrix, encrypted_dummy_matrix);
// normalize input data if its size is odd
int normalized_data_size;
if (data.size() % 2 == 0)
{
normalized_data_size = data.size();
}
else
{
normalized_data_size = data.size() + 1;
}
int required_range = normalized_data_size * sample_size;
int required_no_row_elements = required_range / 2;
int required_range_row = required_range / 2;
// create padding matrix
int padding_slots = (encr.bcode->slot_count() / 2) - required_range_row;
vector<int64_t> padding_matrix(encr.bcode->slot_count(), 0ULL);
for (size_t i = 0; i < padding_slots; i++)
{
padding_matrix[required_no_row_elements + i] = 1;
padding_matrix[encr.bcode->slot_count() - i] = 1;
}
Ciphertext encrypted_padding_matrix;
init_ciphermatrix(encr, padding_matrix, encrypted_padding_matrix);
if (required_range_row <= encr.bcode->slot_count() && required_range_row > 0)
{
for (int index = 0; index < normalized_data_size / 2; index++)
{
Ciphertext ct1, ct2, ct3;
Ciphertext temp1, temp2;
// cout << "[INFO] loading ciphertext 1" << endl;
load_ciphertext(eval, ct1, source);
// cout << "[INFO] loading ciphertext 2" << endl;
load_ciphertext(eval, ct2, data.at(index));
sub_ciphertext(eval, ct1, ct2, temp1);
if ((normalized_data_size / 2) + index < data.size())
{
// cout << "[INFO] loading ciphertext 3" << endl;
load_ciphertext(eval, ct3, data.at((normalized_data_size / 2) + index));
sub_ciphertext(eval, ct1, ct3, temp2);
}
else
{
// add dummy vector for oddy data
temp2 = encrypted_dummy_matrix;
}
eval.eval->rotate_columns_inplace(temp2, eval.gk);
add_ciphertext(eval, temp1, temp2, temp1);
add_ciphertext(eval, temp1, encrypted_result_matrix, encrypted_result_matrix);
// avoid the last shift
if (index + 1 != (normalized_data_size / 2))
{
eval.eval->rotate_rows_inplace(encrypted_result_matrix, -sample_size, eval.gk);
}
}
// add renmaining padding slots
add_ciphertext(eval, encrypted_result_matrix, encrypted_padding_matrix, encrypted_result_matrix);
}
// // save_ciphertext(encrypted_result_matrix, result_dir + "/" + result_name + ".ct");
// delete_operator_batching(eval);
return encrypted_result_matrix;
// }
}
void sub_ciphertext(struct evaluator_t &op_st, Ciphertext &ct1, Ciphertext &ct2, Ciphertext &ct_out)
{
op_st.eval->sub(ct1, ct2, ct_out);
}
void sub_inplace_ciphertext(struct evaluator_t &op_st, Ciphertext &ct1, Ciphertext &ct2)
{
op_st.eval->sub_inplace(ct1, ct2);
}
void sub_plain_inplace_ciphertext(struct evaluator_t &op_st, Ciphertext &ct, const Plaintext &plain)
{
op_st.eval->sub_plain_inplace(ct, plain);
}
void negate_inplace_ciphertext(struct evaluator_t &op_st, Ciphertext &ct)
{
op_st.eval->negate_inplace(ct);
}
void add_plain_inplace_ciphertext(struct evaluator_t &op_st, struct Ciphertext &ct, const Plaintext &plain)
{
op_st.eval->add_plain_inplace(ct, plain);
}
void add_ciphertext(struct evaluator_t &op_st, Ciphertext &ct1, Ciphertext &ct2, Ciphertext &ct_out)
{
op_st.eval->add(ct1, ct2, ct_out);
}
void add_many_ciphertext(struct evaluator_t &op_st, vector<Ciphertext> &cts, Ciphertext &ct_out)
{
op_st.eval->add_many(cts, ct_out);
}
void multiply_ciphertext(struct evaluator_t &op_st, Ciphertext &ct1, Ciphertext &ct2, Ciphertext &ct_out)
{
op_st.eval->multiply(ct1, ct2, ct_out);
}
void multiply_inplace_ciphertext(struct evaluator_t &op_st, Ciphertext &ct1, Ciphertext &ct2)
{
op_st.eval->multiply_inplace(ct1, ct2);
}
void multiply_ciphertexts(struct evaluator_t &op_st, vector<Ciphertext> &cts, Ciphertext &ct_out)
{
op_st.eval->multiply_many(cts, op_st.lk, ct_out);
}
void multiply_plain_inplace(struct evaluator_t &op_st, Ciphertext &ct, const Plaintext &plain)
{
op_st.eval->multiply_plain_inplace(ct, plain);
}
void relinearize_inplace(struct evaluator_t &op_st, Ciphertext &ct)
{
op_st.eval->relinearize_inplace(ct, op_st.lk);
}
void relinearize(struct evaluator_t &op_st, Ciphertext &ct, Ciphertext &ct_out)
{
op_st.eval->relinearize(ct, op_st.lk, ct_out);
}
void rescale_to_next_inplace(struct evaluator_t &op_st, Ciphertext &ct)
{
op_st.eval->rescale_to_next_inplace(ct);
}
void exponentiate_inplace_ciphertext(struct evaluator_t &op_st, Ciphertext &ct, uint64_t &exponent)
{
op_st.eval->exponentiate_inplace(ct, exponent, op_st.lk);
}
void mod_switch_to_next_inplace_ciphertext(struct evaluator_t &op_st, Ciphertext &ct)
{
op_st.eval->mod_switch_to_next_inplace(ct);
}
#include "seal_api.h"
using namespace std;
using namespace seal;
int main(int argc, char **argv)
{
string key_dir = argv[1];
size_t poly_d = 4096;
// Params option 1
int bit_size = 20;
// Params option 2
// uint64_t plain_modulus = 1032193;
// vector<int> bit_sizes = { 36, 36, 37 };
// timeval t0, t1;
// unsigned long dt = 0;
// gettimeofday(&t0, NULL);
batching_generate_keys(poly_d, bit_size, key_dir, true);
// batching_generate_keys(poly_d, bit_sizes, plain_modulus, key_dir, true);
// gettimeofday(&t1, NULL);
// dt = 1000000 * (t1.tv_sec - t0.tv_sec) + (t1.tv_usec - t0.tv_usec);
// cout << "[INFO] keys generation time in seconds: " << ((float)dt)/1000000 << endl;
return 0;
}
# Testing Script
CURR_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
###################### Test 1 - Begin ######################
mkdir -p keys/
mkdir -p lcheck/
mkdir -p parent/
mkdir -p result/
# rm ls.txt
# Number of ciphertext data, eg: (0..99)
min=0
max=0 # max=101 or 1631
n_char=39 # Number of chars/words of a ciphertext, eg: 9
# Encrypted number range, eg: 2(1-bit), 10, 100, 255(8-bit), 1000
# range=255
range=2
sample=40 # sampling size
# Generate keys
${CURR_DIR}/similarityMatch_genkey keys/ # gen keys
# Get random data line
if [[ "$max" -ne 0 ]]
then
line=$((RANDOM %max))
else
line=0
fi
lcheck=""
# Generate data randomly
for i in $(seq $min $max)
do
mkdir -p parent/l"$i"/
echo "Created folder $i"
value=""
for j in $(seq 0 $n_char)
do
value+="$((RANDOM %$range)) "
done
echo $value
echo $value >> ls.txt
# ./similarityMatch_encrypt "$value" "l" parent/l"$i"/ $sample keys/
${CURR_DIR}/similarityMatch_encrypt "$value" "l" parent/l"$i"/ $sample keys/
if [[ "$line" -eq "$i" ]]
then
lcheck="$value"
fi
done
echo "Pick up data to check: $lcheck"
${CURR_DIR}/similarityMatch_encrypt "$lcheck" "l" lcheck/ $sample keys/
# Evaluate
value1="lcheck/l.ct "
value2=""
for i in $(seq 0 $max)
do
value2+="parent/l${i}/l.ct "
done
value3="$value1$value2"
echo "$value3"
time ${CURR_DIR}/similarityMatch_evaluate $value3 "l" result/ $sample keys/
echo ""
${CURR_DIR}/similarityMatch_decrypt_1st_result result/l.ct $sample keys/
# rm -r keys/*
# rm -r lcheck/*
# rm -r parent/*
# rm -r result/*
# rm ls.txt
###################### Test 1 - End ########################
###################### Report - Begin ######################
# sim: (eval: 0.465s, 0.488s, 0.480s decrypt: 0.028s, 0.080s, 0.077s)
# seq: (eval: 0.xxx, 0.xxx, 0.xxx decrypt: 0.xxx, 0.xxx, 0.xxx)
# max=203
# (eval: 3.635s, 3.510s, 3.628s decrypt: 0.062s, 0.153s. 0.134s)
# seq: (eval: 0.xxx, 0.xxx, 0.xxx decrypt: 0.xxx, 0.xxx, 0.xxx)
# max=407
# (eval: 38.607s, 39.600s, 39.565s decrypt: 0.264s, 0.260s, 0.245s)
# seq: (eval: 0.xxx, 0.xxx, 0.xxx decrypt: 0.xxx, 0.xxx, 0.xxx)
# max=815
# (eval: x decrypt: x )
###################### Report - End ########################
\ No newline at end of file
#include "util.h"
// #include <filesystem>
#include "seal_api.h"
// #include <boost/filesystem.hpp>
// namespace fs = boost::filesystem;
bool sub_str_exist(const std::string &str, const std::string &sub_str)
{
return str.size() >= sub_str.size() && str.compare(str.size() - sub_str.size(), sub_str.size(), sub_str) == 0;
}
// int findNumberOfFilesInDirectory(const std::string &path)
// {
// auto dirIter = std::filesystem::directory_iterator(path);
// int fileCount = std::count_if(
// begin(dirIter),
// end(dirIter),
// [](auto &entry) { return entry.is_regular_file(); });
// return fileCount;
// }
// int findNumberOfFilesInDirectory(std::string &path, std::string &ext)
// int findNumberOfFilesInDirectory(const std::string &path)
// {
// // namespace fs = boost::filesystem;
// std::string ext = ".ct";
// fs::path Path(path);
// int Nb_ext = 0;
// fs::directory_iterator end_iter; // Default constructor for an iterator is the end iterator
// for (fs::directory_iterator iter(Path); iter != end_iter; ++iter)
// if (iter->path().extension() == ext)
// ++Nb_ext;
// return Nb_ext;
// }
// c++ 17
// std::vector<std::string> get_directories(const std::string &s)
// {
// std::vector<std::string> r;
// for(auto& p : std::filesystem::recursive_directory_iterator(s))
// if (p.is_directory())
// r.push_back(p.path().string());
// return r;
// }
// struct path_leaf_string
// {
// std::string operator()(const boost::filesystem::directory_entry &entry) const
// {
// return entry.path().leaf().string();
// }
// };
// std::vector<std::string> get_directories(const std::string &s)
// {
// std::vector<std::string> v;
// boost::filesystem::path p(s);
// boost::filesystem::directory_iterator start(p);
// boost::filesystem::directory_iterator end;
// std::transform(start, end, std::back_inserter(v), path_leaf_string());
// std::copy(v.begin(), v.end(),
// std::ostream_iterator<std::string>(std::cout, "\n"));
// return v;
// }
#ifndef _UTIL_H_
#define _UTIL_H_
#include <string>
#include <vector>
// int findNumberOfFilesInDirectory(const std::string &path);
bool sub_str_exist(const std::string &str, const std::string &sub_str);
// std::vector<std::string> get_directories(const std::string &s);
// std::vector<std::string> get_directories_deep(const std::string &s);
#endif
@echo off
rem Copyright (c) Microsoft Corporation. All rights reserved.
rem Licensed under the MIT license.
setlocal
rem The purpose of this script is to have CMake generate config.h for use by Microsoft SEAL.
rem We assume that CMake was installed with Visual Studio, which should be the default
rem when the user installs the "Desktop Development with C++" workload.
set VSVERSION=%~1
set PROJECTCONFIGURATION=%~2
set PROJECTPLATFORM=%~3
set VSDEVENVDIR=%~4
set INCLUDEPATH=%~5
set LIBRARYPATH=%~6
echo Configuring Microsoft SEAL through CMake
if not exist "%VSDEVENVDIR%" (
rem We may be running in the CI server. Try a standard VS path.
echo Did not find VS at provided location: "%VSDEVENVDIR%".
echo Trying standard location.
set VSDEVENVDIR="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE"
)
set VSDEVENVDIR=%VSDEVENVDIR:"=%
set CMAKEPATH=%VSDEVENVDIR%\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe
if not exist "%CMAKEPATH%" (
echo ******************************************************************************************************************
echo ** Did not find CMake at "%CMAKEPATH%"
echo ** Please make sure "Visual C++ Tools for CMake" are enabled in the "Desktop development with C++" workload.
echo ******************************************************************************************************************
exit 1
)
echo Found CMake at %CMAKEPATH%
rem Identify Visual Studio version and set CMake generator accordingly.
set CMAKEGEN=""
if "%VSVERSION%"=="15.0" (
set CMAKEGEN="Visual Studio 15 2017"
) else if "%VSVERSION%"=="16.0" (
set CMAKEGEN="Visual Studio 16 2019"
) else (
echo ***************************************************
echo ** Unsupported Visual Studio version "%VSVERSION%"
echo ***************************************************
exit 1
)
rem Download Microsoft GSL
set MSGSLCONFIGDIR="..\..\thirdparty\msgsl\.config\%VSVERSION%\%PROJECTPLATFORM%"
cd %~dp0
if not exist %MSGSLCONFIGDIR% (
mkdir %MSGSLCONFIGDIR%
)
cd %MSGSLCONFIGDIR%
"%CMAKEPATH%" ..\..\.. -G %CMAKEGEN% -A %PROJECTPLATFORM%
"%CMAKEPATH%" --build . --config "%PROJECTCONFIGURATION%"
rem Copy Microsoft GSL header files into the local source directory
robocopy ..\..\..\src\include %~dp0 /s
rem Download and build ZLIB
set ZLIBCONFIGDIR="..\..\thirdparty\zlib\.config\%VSVERSION%\%PROJECTPLATFORM%"
cd %~dp0
if not exist %ZLIBCONFIGDIR% (
mkdir %ZLIBCONFIGDIR%
)
cd %ZLIBCONFIGDIR%
"%CMAKEPATH%" ..\..\.. -G %CMAKEGEN% -A %PROJECTPLATFORM% ^
-DZLIB_PLATFORM="%PROJECTPLATFORM%"
"%CMAKEPATH%" --build . --config "%PROJECTCONFIGURATION%"
rem Configure Microsoft SEAL
set CONFIGDIR="..\..\.config\%VSVERSION%\%PROJECTPLATFORM%"
cd %~dp0
if not exist %CONFIGDIR% (
mkdir %CONFIGDIR%
)
cd %CONFIGDIR%
echo Running CMake configuration in %cd%
"%CMAKEPATH%" ..\..\.. -G %CMAKEGEN% -A %PROJECTPLATFORM% ^
-DALLOW_COMMAND_LINE_BUILD=1 ^
-DCMAKE_BUILD_TYPE="%PROJECTCONFIGURATION%" ^
-DBUILD_SHARED_LIBS=OFF ^
-DSEAL_USE_MSGSL=ON ^
-DSEAL_USE_ZLIB=ON ^
-DSEAL_BUILD_TESTS=OFF ^
-DSEAL_BUILD_EXAMPLES=OFF ^
-DSEAL_BUILD_SEAL_C=OFF ^
--no-warn-unused-cli
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="seal\batchencoder.h" />
<ClInclude Include="seal\biguint.h" />
<ClInclude Include="seal\ciphertext.h" />
<ClInclude Include="seal\ckks.h" />
<ClInclude Include="seal\modulus.h" />
<ClInclude Include="seal\context.h" />
<ClInclude Include="seal\decryptor.h" />
<ClInclude Include="seal\encryptionparams.h" />
<ClInclude Include="seal\encryptor.h" />
<ClInclude Include="seal\evaluator.h" />
<ClInclude Include="seal\galoiskeys.h" />
<ClInclude Include="seal\intarray.h" />
<ClInclude Include="seal\intencoder.h" />
<ClInclude Include="seal\keygenerator.h" />
<ClInclude Include="seal\kswitchkeys.h" />
<ClInclude Include="seal\memorymanager.h" />
<ClInclude Include="seal\plaintext.h" />
<ClInclude Include="seal\publickey.h" />
<ClInclude Include="seal\randomgen.h" />
<ClInclude Include="seal\randomtostd.h" />
<ClInclude Include="seal\relinkeys.h" />
<ClInclude Include="seal\seal.h" />
<ClInclude Include="seal\secretkey.h" />
<ClInclude Include="seal\serializable.h" />
<ClInclude Include="seal\serialization.h" />
<ClInclude Include="seal\util\blake2.h" />
<ClInclude Include="seal\util\blake2-impl.h" />
<ClInclude Include="seal\util\clang.h" />
<ClInclude Include="seal\util\clipnormal.h" />
<ClInclude Include="seal\util\common.h" />
<ClInclude Include="seal\util\croots.h" />
<ClInclude Include="seal\util\defines.h" />
<ClInclude Include="seal\util\galois.h" />
<ClInclude Include="seal\util\gcc.h" />
<ClInclude Include="seal\util\globals.h" />
<ClInclude Include="seal\util\hash.h" />
<ClInclude Include="seal\util\hestdparms.h" />
<ClInclude Include="seal\util\iterator.h" />
<ClInclude Include="seal\util\locks.h" />
<ClInclude Include="seal\util\mempool.h" />
<ClInclude Include="seal\util\msvc.h" />
<ClInclude Include="seal\util\numth.h" />
<ClInclude Include="seal\util\pointer.h" />
<ClInclude Include="seal\util\polyarith.h" />
<ClInclude Include="seal\util\polyarithmod.h" />
<ClInclude Include="seal\util\polyarithsmallmod.h" />
<ClInclude Include="seal\util\polycore.h" />
<ClInclude Include="seal\util\rlwe.h" />
<ClInclude Include="seal\util\rns.h" />
<ClInclude Include="seal\util\scalingvariant.h" />
<ClInclude Include="seal\util\ntt.h" />
<ClInclude Include="seal\util\streambuf.h" />
<ClInclude Include="seal\util\uintarith.h" />
<ClInclude Include="seal\util\uintarithmod.h" />
<ClInclude Include="seal\util\uintarithsmallmod.h" />
<ClInclude Include="seal\util\uintcore.h" />
<ClInclude Include="seal\util\ztools.h" />
<ClInclude Include="seal\valcheck.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="seal\batchencoder.cpp" />
<ClCompile Include="seal\biguint.cpp" />
<ClCompile Include="seal\ciphertext.cpp" />
<ClCompile Include="seal\ckks.cpp" />
<ClCompile Include="seal\modulus.cpp" />
<ClCompile Include="seal\context.cpp" />
<ClCompile Include="seal\decryptor.cpp" />
<ClCompile Include="seal\encryptionparams.cpp" />
<ClCompile Include="seal\encryptor.cpp" />
<ClCompile Include="seal\evaluator.cpp" />
<ClCompile Include="seal\intencoder.cpp" />
<ClCompile Include="seal\keygenerator.cpp" />
<ClCompile Include="seal\kswitchkeys.cpp" />
<ClCompile Include="seal\memorymanager.cpp" />
<ClCompile Include="seal\plaintext.cpp" />
<ClCompile Include="seal\randomgen.cpp" />
<ClCompile Include="seal\serialization.cpp" />
<ClCompile Include="seal\util\rns.cpp" />
<ClCompile Include="seal\util\ztools.cpp" />
<ClCompile Include="seal\valcheck.cpp" />
<ClCompile Include="seal\util\blake2b.c" />
<ClCompile Include="seal\util\blake2xb.c" />
<ClCompile Include="seal\util\clipnormal.cpp" />
<ClCompile Include="seal\util\croots.cpp" />
<ClCompile Include="seal\util\galois.cpp" />
<ClCompile Include="seal\util\globals.cpp" />
<ClCompile Include="seal\util\hash.cpp" />
<ClCompile Include="seal\util\mempool.cpp" />
<ClCompile Include="seal\util\numth.cpp" />
<ClCompile Include="seal\util\polyarith.cpp" />
<ClCompile Include="seal\util\polyarithmod.cpp" />
<ClCompile Include="seal\util\polyarithsmallmod.cpp" />
<ClCompile Include="seal\util\rlwe.cpp" />
<ClCompile Include="seal\util\scalingvariant.cpp" />
<ClCompile Include="seal\util\ntt.cpp" />
<ClCompile Include="seal\util\streambuf.cpp" />
<ClCompile Include="seal\util\uintarith.cpp" />
<ClCompile Include="seal\util\uintarithmod.cpp" />
<ClCompile Include="seal\util\uintarithsmallmod.cpp" />
<ClCompile Include="seal\util\uintcore.cpp" />
</ItemGroup>
<ItemGroup>
<Text Include="seal\CMakeLists.txt" />
<Text Include="seal\util\CMakeLists.txt" />
</ItemGroup>
<ItemGroup>
<None Include="cmake\FindMSGSL.cmake" />
<None Include="cmake\SEALConfig.cmake.in" />
<None Include="seal\util\config.h.in" />
<None Include="CMakeConfig.cmd" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{7EA96C25-FC0D-485A-BB71-32B6DA55652A}</ProjectGuid>
<RootNamespace>SEAL</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<CLRSupport>false</CLRSupport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<CLRSupport>false</CLRSupport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<CLRSupport>false</CLRSupport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<CLRSupport>false</CLRSupport>
</PropertyGroup>
<PropertyGroup>
<ZlibName Condition="'$(ZLIB_ROOT)'!=''">zlibstatic.lib</ZlibName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(ProjectDir)..\..\lib\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(ProjectDir)obj\$(Platform)\$(Configuration)\seal\</IntDir>
<TargetExt>.lib</TargetExt>
<TargetName>seal</TargetName>
<ExtensionsToDeleteOnClean>
</ExtensionsToDeleteOnClean>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(ProjectDir)..\..\lib\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(ProjectDir)obj\$(Platform)\$(Configuration)\seal\</IntDir>
<TargetExt>.lib</TargetExt>
<TargetName>seal</TargetName>
<ExtensionsToDeleteOnClean>
</ExtensionsToDeleteOnClean>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(ProjectDir)..\..\lib\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(ProjectDir)obj\$(Platform)\$(Configuration)\seal\</IntDir>
<TargetExt>.lib</TargetExt>
<TargetName>seal</TargetName>
<ExtensionsToDeleteOnClean>
</ExtensionsToDeleteOnClean>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(ProjectDir)..\..\lib\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(ProjectDir)obj\$(Platform)\$(Configuration)\seal\</IntDir>
<TargetExt>.lib</TargetExt>
<TargetName>seal</TargetName>
<ExtensionsToDeleteOnClean>
</ExtensionsToDeleteOnClean>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)\thirdparty\zlib\build\$(Platform);$(SolutionDir)/thirdparty/zlib/src;$(ProjectDir)</AdditionalIncludeDirectories>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
<LanguageStandard>stdcpp17</LanguageStandard>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_ENABLE_EXTENDED_ALIGNED_STORAGE</PreprocessorDefinitions>
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<ControlFlowGuard>Guard</ControlFlowGuard>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<OmitFramePointers>false</OmitFramePointers>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PreBuildEvent>
<Command>"$(ProjectDir)CMakeConfig.cmd" "$(VisualStudioVersion)" "$(Configuration)" "$(Platform)" "$(DevEnvDir)" "$(IncludePath)" "$(LibraryPath)"</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Configure Microsoft SEAL through CMake</Message>
</PreBuildEvent>
<Lib>
<AdditionalDependencies>Bcrypt.lib;zlibstaticd.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\thirdparty\zlib\build\$(Platform)\$(Configuration)</AdditionalLibraryDirectories>
<AdditionalOptions>/IGNORE:4006 %(AdditionalOptions)</AdditionalOptions>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)/thirdparty/zlib/src;$(SolutionDir)/thirdparty/zlib/build/$(Platform);$(ProjectDir)</AdditionalIncludeDirectories>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
<LanguageStandard>stdcpp17</LanguageStandard>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_ENABLE_EXTENDED_ALIGNED_STORAGE</PreprocessorDefinitions>
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<ControlFlowGuard>Guard</ControlFlowGuard>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PreBuildEvent>
<Command>"$(ProjectDir)CMakeConfig.cmd" "$(VisualStudioVersion)" "$(Configuration)" "$(Platform)" "$(DevEnvDir)" "$(IncludePath)" "$(LibraryPath)"</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Configure Microsoft SEAL through CMake</Message>
</PreBuildEvent>
<Lib>
<AdditionalDependencies>Bcrypt.lib;zlibstaticd.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\thirdparty\zlib\build\$(Platform)\$(Configuration)</AdditionalLibraryDirectories>
<AdditionalOptions>/IGNORE:4006 %(AdditionalOptions)</AdditionalOptions>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)/thirdparty/zlib/src;$(SolutionDir)/thirdparty/zlib/build/$(Platform);$(ProjectDir)</AdditionalIncludeDirectories>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<LanguageStandard>stdcpp17</LanguageStandard>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_ENABLE_EXTENDED_ALIGNED_STORAGE</PreprocessorDefinitions>
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<ControlFlowGuard>Guard</ControlFlowGuard>
<OmitFramePointers>true</OmitFramePointers>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<PreBuildEvent>
<Command>"$(ProjectDir)CMakeConfig.cmd" "$(VisualStudioVersion)" "$(Configuration)" "$(Platform)" "$(DevEnvDir)" "$(IncludePath)" "$(LibraryPath)"</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Configure Microsoft SEAL through CMake</Message>
</PreBuildEvent>
<Lib>
<AdditionalDependencies>Bcrypt.lib;zlibstatic.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\thirdparty\zlib\build\$(Platform)\$(Configuration)</AdditionalLibraryDirectories>
<AdditionalOptions>/IGNORE:4006 %(AdditionalOptions)</AdditionalOptions>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)/thirdparty/zlib/src;$(SolutionDir)/thirdparty/zlib/build/$(Platform);$(ProjectDir)</AdditionalIncludeDirectories>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<LanguageStandard>stdcpp17</LanguageStandard>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_ENABLE_EXTENDED_ALIGNED_STORAGE</PreprocessorDefinitions>
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<ControlFlowGuard>Guard</ControlFlowGuard>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<PreBuildEvent>
<Command>"$(ProjectDir)CMakeConfig.cmd" "$(VisualStudioVersion)" "$(Configuration)" "$(Platform)" "$(DevEnvDir)" "$(IncludePath)" "$(LibraryPath)"</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Configure Microsoft SEAL through CMake</Message>
</PreBuildEvent>
<Lib>
<AdditionalDependencies>Bcrypt.lib;zlibstatic.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\thirdparty\zlib\build\$(Platform)\$(Configuration)</AdditionalLibraryDirectories>
<AdditionalOptions>/IGNORE:4006 %(AdditionalOptions)</AdditionalOptions>
</Lib>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Source Files\util">
<UniqueIdentifier>{a119ce23-aae9-4b06-be2c-1c8aada4ab20}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\util">
<UniqueIdentifier>{8740bd83-253c-49f3-8f9a-3b9c526f67c2}</UniqueIdentifier>
</Filter>
<Filter Include="Other">
<UniqueIdentifier>{8585bc5e-eaa9-481a-a6ee-c38be1319a32}</UniqueIdentifier>
</Filter>
<Filter Include="Other\cmake">
<UniqueIdentifier>{aaf838b1-cab2-4ccc-a016-a81c7edf506e}</UniqueIdentifier>
</Filter>
<Filter Include="Other\seal">
<UniqueIdentifier>{31fb1149-1a6f-438b-a86a-744384986d21}</UniqueIdentifier>
</Filter>
<Filter Include="Other\seal\util">
<UniqueIdentifier>{497d5f96-98a3-44e9-8b38-a2ea4bbea366}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="seal\batchencoder.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\biguint.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\ciphertext.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\ckks.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\context.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\decryptor.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\encryptionparams.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\encryptor.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\evaluator.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\galoiskeys.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\intarray.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\intencoder.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\keygenerator.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\kswitchkeys.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\memorymanager.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\plaintext.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\publickey.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\randomgen.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\randomtostd.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\relinkeys.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\seal.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\secretkey.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\modulus.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\valcheck.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\util\blake2.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\blake2-impl.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\clang.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\clipnormal.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\common.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\croots.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\defines.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\gcc.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\galois.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\globals.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\hash.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\hestdparms.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\locks.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\mempool.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\msvc.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\numth.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\pointer.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\polyarith.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\polyarithmod.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\polyarithsmallmod.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\polycore.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\rlwe.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\scalingvariant.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\ntt.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\streambuf.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\util\uintarith.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\uintarithmod.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\uintarithsmallmod.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\uintcore.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\serializable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\serialization.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\util\ztools.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\rns.h">
<Filter>Header Files\util</Filter>
</ClInclude>
<ClInclude Include="seal\util\iterator.h">
<Filter>Header Files\util</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="seal\batchencoder.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\biguint.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\ciphertext.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\ckks.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\context.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\decryptor.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\encryptionparams.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\encryptor.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\evaluator.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\intencoder.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\keygenerator.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\kswitchkeys.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\memorymanager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\modulus.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\plaintext.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\randomgen.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\serialization.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\valcheck.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\util\blake2xb.c">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\blake2b.c">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\clipnormal.cpp">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\croots.cpp">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\galois.cpp">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\globals.cpp">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\hash.cpp">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\mempool.cpp">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\numth.cpp">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\polyarith.cpp">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\polyarithmod.cpp">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\polyarithsmallmod.cpp">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\rlwe.cpp">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\rns.cpp">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\scalingvariant.cpp">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\ntt.cpp">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\streambuf.cpp">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\uintarith.cpp">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\uintarithmod.cpp">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\uintarithsmallmod.cpp">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\uintcore.cpp">
<Filter>Source Files\util</Filter>
</ClCompile>
<ClCompile Include="seal\util\ztools.cpp">
<Filter>Source Files\util</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Text Include="seal\CMakeLists.txt">
<Filter>Other\seal</Filter>
</Text>
<Text Include="seal\util\CMakeLists.txt">
<Filter>Other\seal\util</Filter>
</Text>
</ItemGroup>
<ItemGroup>
<None Include="cmake\SEALConfig.cmake.in">
<Filter>Other\cmake</Filter>
</None>
<None Include="seal\util\config.h.in">
<Filter>Other\seal\util</Filter>
</None>
<None Include="cmake\FindMSGSL.cmake">
<Filter>Other\cmake</Filter>
</None>
<None Include="CMakeConfig.cmd">
<Filter>Other</Filter>
</None>
</ItemGroup>
</Project>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{70BBB2AA-FA77-40C1-890F-7AA7DBB3AD3D}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>SEAL_C</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<ProjectName>SEAL_C</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(ProjectDir)..\..\lib\$(Platform)\$(Configuration)\</OutDir>
<TargetName>sealc</TargetName>
<IntDir>$(ProjectDir)obj\$(Platform)\$(Configuration)\seal\c\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(ProjectDir)..\..\lib\$(Platform)\$(Configuration)\</OutDir>
<TargetName>sealc</TargetName>
<IntDir>$(ProjectDir)obj\$(Platform)\$(Configuration)\seal\c\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(ProjectDir)..\..\lib\$(Platform)\$(Configuration)\</OutDir>
<TargetName>sealc</TargetName>
<IntDir>$(ProjectDir)obj\$(Platform)\$(Configuration)\seal\c\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(ProjectDir)..\..\lib\$(Platform)\$(Configuration)\</OutDir>
<TargetName>sealc</TargetName>
<IntDir>$(ProjectDir)obj\$(Platform)\$(Configuration)\seal\c\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>SEAL_C_EXPORTS;NOMINMAX;_ENABLE_EXTENDED_ALIGNED_STORAGE;_SCL_SECURE_NO_WARNING;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ProjectDir)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
<PrecompiledHeaderFile>seal\c/stdafx.h</PrecompiledHeaderFile>
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ControlFlowGuard>Guard</ControlFlowGuard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>seal.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(ProjectDir)..\..\lib\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>SEAL_C_EXPORTS;NOMINMAX;_ENABLE_EXTENDED_ALIGNED_STORAGE;_SCL_SECURE_NO_WARNING;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ProjectDir)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
<PrecompiledHeaderFile>seal\c\stdafx.h</PrecompiledHeaderFile>
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ControlFlowGuard>Guard</ControlFlowGuard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>seal.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(ProjectDir)..\..\lib\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>SEAL_C_EXPORTS;NOMINMAX;_ENABLE_EXTENDED_ALIGNED_STORAGE;_SCL_SECURE_NO_WARNING;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ProjectDir)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
<PrecompiledHeaderFile>seal\c\stdafx.h</PrecompiledHeaderFile>
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ControlFlowGuard>Guard</ControlFlowGuard>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>seal.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(ProjectDir)..\..\lib\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>SEAL_C_EXPORTS;NOMINMAX;_ENABLE_EXTENDED_ALIGNED_STORAGE;_SCL_SECURE_NO_WARNING;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ProjectDir)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
<PrecompiledHeaderFile>seal\c\stdafx.h</PrecompiledHeaderFile>
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ControlFlowGuard>Guard</ControlFlowGuard>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>seal.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(ProjectDir)..\..\lib\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="seal\c\modulus.h" />
<ClInclude Include="seal\c\contextdata.h" />
<ClInclude Include="seal\c\batchencoder.h" />
<ClInclude Include="seal\c\biguint.h" />
<ClInclude Include="seal\c\ciphertext.h" />
<ClInclude Include="seal\c\ckksencoder.h" />
<ClInclude Include="seal\c\decryptor.h" />
<ClInclude Include="seal\c\defines.h" />
<ClInclude Include="seal\c\intencoder.h" />
<ClInclude Include="seal\c\encryptionparameterqualifiers.h" />
<ClInclude Include="seal\c\encryptionparameters.h" />
<ClInclude Include="seal\c\encryptor.h" />
<ClInclude Include="seal\c\evaluator.h" />
<ClInclude Include="seal\c\galoiskeys.h" />
<ClInclude Include="seal\c\keygenerator.h" />
<ClInclude Include="seal\c\kswitchkeys.h" />
<ClInclude Include="seal\c\memorymanager.h" />
<ClInclude Include="seal\c\memorypoolhandle.h" />
<ClInclude Include="seal\c\plaintext.h" />
<ClInclude Include="seal\c\publickey.h" />
<ClInclude Include="seal\c\relinkeys.h" />
<ClInclude Include="seal\c\sealcontext.h" />
<ClInclude Include="seal\c\secretkey.h" />
<ClInclude Include="seal\c\serialization.h" />
<ClInclude Include="seal\c\stdafx.h" />
<ClInclude Include="seal\c\targetver.h" />
<ClInclude Include="seal\c\utilities.h" />
<ClInclude Include="seal\c\valcheck.h" />
<ClInclude Include="seal\c\version.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="seal\c\modulus.cpp" />
<ClCompile Include="seal\c\contextdata.cpp" />
<ClCompile Include="seal\c\batchencoder.cpp" />
<ClCompile Include="seal\c\ciphertext.cpp" />
<ClCompile Include="seal\c\ckksencoder.cpp" />
<ClCompile Include="seal\c\decryptor.cpp" />
<ClCompile Include="seal\c\dllmain.cpp" />
<ClCompile Include="seal\c\biguint.cpp" />
<ClCompile Include="seal\c\intencoder.cpp" />
<ClCompile Include="seal\c\encryptionparameterqualifiers.cpp" />
<ClCompile Include="seal\c\encryptor.cpp" />
<ClCompile Include="seal\c\evaluator.cpp" />
<ClCompile Include="seal\c\galoiskeys.cpp" />
<ClCompile Include="seal\c\keygenerator.cpp" />
<ClCompile Include="seal\c\kswitchkeys.cpp" />
<ClCompile Include="seal\c\memorymanager.cpp" />
<ClCompile Include="seal\c\memorypoolhandle.cpp" />
<ClCompile Include="seal\c\plaintext.cpp" />
<ClCompile Include="seal\c\publickey.cpp" />
<ClCompile Include="seal\c\relinkeys.cpp" />
<ClCompile Include="seal\c\sealcontext.cpp" />
<ClCompile Include="seal\c\secretkey.cpp" />
<ClCompile Include="seal\c\serialization.cpp" />
<ClCompile Include="seal\c\encryptionparameters.cpp" />
<ClCompile Include="seal\c\utilities.cpp" />
<ClCompile Include="seal\c\stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="seal\c\valcheck.cpp" />
<ClCompile Include="seal\c\version.cpp" />
</ItemGroup>
<ItemGroup>
<Text Include="seal\c\CMakeLists.txt" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Other">
<UniqueIdentifier>{1027e253-e357-4456-b08e-f29b7cceb334}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="seal\c\defines.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\stdafx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\targetver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\utilities.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\batchencoder.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\biguint.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\ciphertext.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\ckksencoder.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\contextdata.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\decryptor.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\encryptionparameterqualifiers.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\encryptionparameters.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\encryptor.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\evaluator.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\galoiskeys.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\intencoder.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\keygenerator.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\kswitchkeys.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\memorymanager.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\memorypoolhandle.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\modulus.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\plaintext.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\publickey.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\relinkeys.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\sealcontext.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\secretkey.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\serialization.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\valcheck.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seal\c\version.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="seal\c\dllmain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\utilities.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\batchencoder.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\biguint.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\ciphertext.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\ckksencoder.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\contextdata.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\decryptor.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\encryptionparameterqualifiers.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\encryptionparameters.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\encryptor.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\evaluator.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\galoiskeys.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\intencoder.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\keygenerator.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\kswitchkeys.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\memorymanager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\memorypoolhandle.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\modulus.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\plaintext.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\publickey.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\relinkeys.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\sealcontext.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\secretkey.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\serialization.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\valcheck.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seal\c\version.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Text Include="seal\c\CMakeLists.txt">
<Filter>Other</Filter>
</Text>
</ItemGroup>
</Project>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment