PalisadeTfheContext#
Currently, this API is unsupported in Python
-
class PalisadeTfheContext : public helayers::HeContext#
A context class for Palisade’s TFHE scheme.
Public Functions
-
PalisadeTfheContext()#
-
inline ~PalisadeTfheContext()#
-
void init(const PalisadeTfheConfig &config)#
Initialize context with config object.
- Parameters:
config –
-
virtual std::shared_ptr<AbstractCiphertext> createAbstractCipher() const override#
Do not use. Should be made private.
-
virtual std::shared_ptr<AbstractPlaintext> createAbstractPlain() const override#
Do not use. Should be made private.
-
virtual std::shared_ptr<AbstractEncoder> getEncoder() const override#
Do not use. Should be made private.
-
virtual void printSignature(std::ostream &out) const override#
Prints a summary of library details and configuration params.
- Parameters:
out – [in] output stream to write to
-
virtual std::shared_ptr<AbstractBitwiseEvaluator> getBitwiseEvaluator() const override#
Do not use. Should be made private.
-
virtual int getTopChainIndex() const override#
Returns the highest available chain index (for schemes where it is applicable).
-
inline virtual int slotCount() const override#
The number of slots in each CTile (ciphertext) or PTile (plaintext) created over this context.
-
virtual int getSecurityLevel() const override#
Returns the security level supplied by this context.
-
virtual bool hasSecretKey() const override#
Returns whether this context contains a secret key.
If not, decryption and other operations relying on decryption will not be available (will throw an exception).
-
virtual std::string getLibraryName() const override#
Returns the name of the underlying library.
-
virtual std::string getSchemeName() const override#
Returns the name of the underlying scheme.
-
lbcrypto::BinFHEContext getContext() const#
Returns the Palisade’s context.
- Returns:
lbcrypto::BinFHEContext
-
lbcrypto::LWEPrivateKey getKey() const#
Returns Palisade’s TFHE secret ket.
- Returns:
lbcrypto::LWEPrivateKey
-
inline virtual void saveSecretKey(std::ostream &out, bool seedOnly) override#
Save secret key to the given ostream.
- Parameters:
out – The binary stream to save to.
seedOnly – If true, only the seed used to control the secret key’s randomness will be saved, rather than the whole secret key.
- Throws:
runtime_error – If this HeContext doesn’t have a secret key. i.e. hasSecretKey() is false.
runtime_error – If seedOnly is true but the underlying HeContext does not support secret key I/O using seeds.
-
inline virtual void loadSecretKey(std::istream &in, bool seedOnly) override#
Load secret key from the given istream.
- Parameters:
in – The binary stream to load from.
seedOnly – If true, the seed of the secret key will be loaded from the given binary stream and the secret key will be generated using this seed.
- Throws:
runtime_error – If this HeContext already has a secret key. i.e. hasSecretKey() is true.
runtime_error – If seedOnly is true but the underlying HeContext does not support secret key I/O using seeds.
-
inline virtual std::shared_ptr<HeContext> clone() const override#
Returns an uninitialized context of the same type.
Used for dynamic type loading among others.
-
inline virtual void init(const HeConfigRequirement &req) override#
Internal use.
-
inline virtual bool isConfigRequirementFeasible(const HeConfigRequirement &req) const override#
Internal use.
-
virtual bool publicFunctionsSupported(const PublicFunctions &publicFunctions) const override#
Returns whether the given PublicFunctions object is supported by this HeContext.
The given PublicFunctions object is assumed to be valid (see also PublicFunctions::validate()).
- Parameters:
publicFunctions – The PublicFunctions object.
-
PalisadeTfheContext()#