23 class SparseSecretEncapsulationKey;
43 explicit KeyPack(
const Context &context,
const std::string &key_dir_path);
55 const std::string &key_dir_path);
65 void loadEncKey(
void);
66 void loadEncKey(std::istream &stream);
72 void loadMultKey(
void);
73 void loadMultKey(std::istream &stream);
79 void loadConjKey(
void);
80 void loadConjKey(std::istream &stream);
87 void loadLeftRotKey(
const u64 rot);
88 void loadLeftRotKey(
const u64 rot, std::istream &stream);
95 void loadRightRotKey(
const u64 rot);
96 void loadRightRotKey(
const u64 rot, std::istream &stream);
102 void loadSparseSecretEncapsulationKey(
void);
103 void loadSparseSecretEncapsulationKey(std::istream &stream);
110 bool isEncKeyLoaded(
void)
const;
113 bool isMultKeyLoaded(
void)
const;
117 bool isLeftRotKeyLoaded(
const u64 rot)
const;
121 bool isRightRotKeyLoaded(
const u64 rot)
const;
124 bool isConjKeyLoaded(
void)
const;
127 bool isLeftRotKeyFileAvailable(
const u64 rot)
const;
131 bool isSparseSecretEncapsulationKeyLoaded()
const;
142 std::shared_ptr<EncryptionKey> getEncKey(
void)
const;
149 std::shared_ptr<EvaluationKey> getMultKey(
void)
const;
157 std::shared_ptr<EvaluationKey> getLeftRotKey(
const u64 rot)
const;
165 std::shared_ptr<EvaluationKey> getRightRotKey(
const u64 rot)
const;
172 std::shared_ptr<EvaluationKey> getConjKey(
void)
const;
179 std::shared_ptr<SparseSecretEncapsulationKey>
180 getSparseSecretEncapsulationKey(
void)
const;
187 void setKeyDirPath(
const std::string &key_dir_path);
192 void to(
const Device &device);
196 void save(std::ostream &stream)
const;
202 void load(std::istream &stream);
206 void save(
const std::string &dir_path)
const;
217 HEAAN_API void save(
const EvaluationKey &key, std::ostream &stream);
218 HEAAN_API void save(
const EncryptionKey &key, std::ostream &stream);
220 std::ostream &stream);
223 HEAAN_API void load(EvaluationKey &key, std::istream &stream);
224 HEAAN_API void load(EncryptionKey &key, std::istream &stream);
225 HEAAN_API void load(SparseSecretEncapsulationKey &key, std::istream &stream);