Template Class LeveledSHEBase
Defined in File base-leveledshe.h
Page Contents
Template Parameter Order
class Element
Class Documentation
-
template<class Element>
class lbcrypto::LeveledSHEBase Abstract interface class for LBC SHE algorithms.
- Template Parameters
Element – a ring element.
Public Functions
-
inline virtual ~LeveledSHEBase()
-
virtual Ciphertext<Element> EvalNegate(ConstCiphertext<Element> ciphertext) const
Virtual function to define the homomorphic negation of ciphertext.
- Parameters
&ciphertext – the input ciphertext.
- Returns
new ciphertext.
-
virtual void EvalNegateInPlace(Ciphertext<Element> &ciphertext) const
Virtual function to define the interface for homomorphic negation of ciphertext.
- Parameters
&ciphertext – the input ciphertext.
- Returns
new ciphertext.
-
virtual Ciphertext<Element> EvalAdd(ConstCiphertext<Element> ciphertext1, ConstCiphertext<Element> ciphertext2) const
Virtual function to define the interface for homomorphic addition of ciphertexts.
- Parameters
ciphertext1 – the input ciphertext.
ciphertext2 – the input ciphertext.
- Returns
the new ciphertext.
-
virtual void EvalAddInPlace(Ciphertext<Element> &ciphertext1, ConstCiphertext<Element> ciphertext2) const
Virtual function to define the interface for in-place homomorphic addition of ciphertexts.
- Parameters
ciphertext1 – the input/output ciphertext.
ciphertext2 – the input ciphertext.
-
inline virtual Ciphertext<Element> EvalAddMutable(Ciphertext<Element> &ciphertext1, Ciphertext<Element> &ciphertext2) const
Virtual function to define the interface for homomorphic addition of ciphertexts. This is the mutable version - input ciphertexts may change (automatically rescaled, or towers dropped).
- Parameters
ciphertext1 – the input ciphertext.
ciphertext2 – the input ciphertext.
- Returns
the new ciphertext.
-
inline virtual void EvalAddMutableInPlace(Ciphertext<Element> &ciphertext1, Ciphertext<Element> &ciphertext2) const
-
virtual Ciphertext<Element> EvalAdd(ConstCiphertext<Element> ciphertext, ConstPlaintext plaintext) const
Virtual function to define the interface for homomorphic addition of ciphertexts.
- Parameters
ciphertext – the input ciphertext.
plaintext – the input plaintext.
- Returns
the new ciphertext.
-
virtual void EvalAddInPlace(Ciphertext<Element> &ciphertext, ConstPlaintext plaintext) const
Virtual function to define the interface for homomorphic addition of ciphertexts.
- Parameters
ciphertext – the input ciphertext.
plaintext – the input plaintext.
-
inline virtual Ciphertext<Element> EvalAddMutable(Ciphertext<Element> &ciphertext, Plaintext plaintext) const
Virtual function to define the interface for homomorphic addition of ciphertexts. This is the mutable version - input ciphertext may change (automatically rescaled, or towers dropped).
- Parameters
ciphertext – the input ciphertext.
plaintext – the input plaintext.
- Returns
the new ciphertext.
-
inline virtual void EvalAddMutableInPlace(Ciphertext<Element> &ciphertext, Plaintext plaintext) const
Virtual function to define the interface for homomorphic addition of ciphertexts. This is the mutable version - input ciphertext may change (automatically rescaled, or towers dropped).
- Parameters
ciphertext – the input ciphertext.
plaintext – the input plaintext.
- Returns
the new ciphertext.
-
inline virtual Ciphertext<Element> EvalAdd(ConstCiphertext<Element> ciphertext, const NativeInteger &constant) const
-
inline virtual void EvalAddInPlace(Ciphertext<Element> &ciphertext, const NativeInteger &constant) const
-
inline virtual Ciphertext<Element> EvalAdd(ConstCiphertext<Element> ciphertext, double constant) const
-
inline virtual void EvalAddInPlace(Ciphertext<Element> &ciphertext, double constant) const
-
virtual Ciphertext<Element> EvalSub(ConstCiphertext<Element> ciphertext1, ConstCiphertext<Element> ciphertext2) const
Virtual function to define the interface for homomorphic subtraction of ciphertexts.
- Parameters
ciphertext1 – the input ciphertext.
ciphertext2 – the input ciphertext.
- Returns
the new ciphertext.
-
virtual void EvalSubInPlace(Ciphertext<Element> &ciphertext1, ConstCiphertext<Element> ciphertext2) const
Virtual function to define the interface for homomorphic subtraction of ciphertexts.
- Parameters
ciphertext1 – the input ciphertext.
ciphertext2 – the input ciphertext.
-
inline virtual Ciphertext<Element> EvalSubMutable(Ciphertext<Element> &ciphertext1, Ciphertext<Element> &ciphertext2) const
Virtual function to define the interface for homomorphic subtraction of ciphertexts. This is the mutable version - input ciphertext may change (automatically rescaled, or towers dropped).
- Parameters
ciphertext1 – the input ciphertext.
ciphertext2 – the input ciphertext.
- Returns
the new ciphertext.
-
inline virtual void EvalSubMutableInPlace(Ciphertext<Element> &ciphertext1, Ciphertext<Element> &ciphertext2) const
Virtual function to define the interface for homomorphic subtraction of ciphertexts. This is the mutable version - input ciphertext may change (automatically rescaled, or towers dropped).
- Parameters
ciphertext1 – the input ciphertext.
ciphertext2 – the input ciphertext.
- Returns
the new ciphertext.
-
virtual Ciphertext<Element> EvalSub(ConstCiphertext<Element> ciphertext, ConstPlaintext plaintext) const
Virtual function to define the interface for homomorphic subtraction of ciphertexts.
- Parameters
ciphertext – the input ciphertext.
plaintext – the input plaintext.
- Returns
the new ciphertext.
-
virtual void EvalSubInPlace(Ciphertext<Element> &ciphertext, ConstPlaintext plaintext) const
-
inline virtual Ciphertext<Element> EvalSubMutable(Ciphertext<Element> &ciphertext, Plaintext plaintext) const
Virtual function to define the interface for homomorphic subtraction of ciphertexts. This is the mutable version - input ciphertext may change (automatically rescaled, or towers dropped).
- Parameters
ciphertext – the input ciphertext.
plaintext – the input plaintext.
- Returns
the new ciphertext.
-
inline virtual void EvalSubMutableInPlace(Ciphertext<Element> &ciphertext, Plaintext plaintext) const
-
inline virtual Ciphertext<Element> EvalSub(ConstCiphertext<Element> ciphertext, const NativeInteger &constant) const
-
inline virtual void EvalSubInPlace(Ciphertext<Element> &ciphertext, const NativeInteger &constant) const
-
inline virtual Ciphertext<Element> EvalSub(ConstCiphertext<Element> ciphertext, double constant) const
-
inline virtual void EvalSubInPlace(Ciphertext<Element> &ciphertext, double constant) const
-
virtual EvalKey<Element> EvalMultKeyGen(const PrivateKey<Element> privateKey) const
Virtual function to define the interface for generating a evaluation key which is used after each multiplication.
- Parameters
&ciphertext1 – first input ciphertext.
&ciphertext2 – second input ciphertext.
&ek – is the evaluation key to make the newCiphertext decryptable by the same secret key as that of ciphertext1 and ciphertext2.
*newCiphertext – the new resulting ciphertext.
-
virtual std::vector<EvalKey<Element>> EvalMultKeysGen(const PrivateKey<Element> privateKey) const
Virtual function to define the interface for generating a evaluation key which is used after each multiplication for depth more than 2.
- Parameters
&originalPrivateKey – Original private key used for encryption.
*evalMultKeys – the resulting evalution key vector list.
-
inline virtual Ciphertext<Element> EvalMult(ConstCiphertext<Element> ciphertext1, ConstCiphertext<Element> ciphertext2) const
Virtual function to define the interface for multiplicative homomorphic evaluation of ciphertext.
- Parameters
ciphertext1 – the input ciphertext.
ciphertext2 – the input ciphertext.
- Returns
the new ciphertext.
-
inline virtual Ciphertext<Element> EvalMultMutable(Ciphertext<Element> &ciphertext1, Ciphertext<Element> &ciphertext2) const
Virtual function to define the interface for multiplicative homomorphic evaluation of ciphertext. This is the mutable version - input ciphertexts may change (automatically rescaled, or towers dropped).
- Parameters
ciphertext1 – the input ciphertext.
ciphertext2 – the input ciphertext.
- Returns
the new ciphertext.
-
inline virtual Ciphertext<Element> EvalSquare(ConstCiphertext<Element> ciphertext1) const
Virtual function to define the interface for multiplicative homomorphic evaluation of ciphertext.
- Parameters
ciphertext1 – the input ciphertext.
ciphertext2 – the input ciphertext.
- Returns
the new ciphertext.
-
inline virtual Ciphertext<Element> EvalSquareMutable(Ciphertext<Element> &ciphertext1) const
Virtual function to define the interface for multiplicative homomorphic evaluation of ciphertext. This is the mutable version - input ciphertexts may change (automatically rescaled, or towers dropped).
- Parameters
ciphertext1 – the input ciphertext.
ciphertext2 – the input ciphertext.
- Returns
the new ciphertext.
-
virtual Ciphertext<Element> EvalMult(ConstCiphertext<Element> ciphertext, ConstPlaintext plaintext) const
Virtual function to define the interface for multiplication of ciphertext by plaintext.
- Parameters
ciphertext – the input ciphertext.
plaintext – the input plaintext.
- Returns
the new ciphertext.
-
virtual void EvalMultInPlace(Ciphertext<Element> &ciphertext, ConstPlaintext plaintext) const
-
inline virtual Ciphertext<Element> EvalMultMutable(Ciphertext<Element> &ciphertext, Plaintext plaintext) const
Virtual function to define the interface for multiplication of ciphertext by plaintext. This is the mutable version - input ciphertext may change (automatically rescaled, or towers dropped).
- Parameters
ciphertext – the input ciphertext.
plaintext – the input plaintext.
- Returns
the new ciphertext.
-
inline virtual void EvalMultMutableInPlace(Ciphertext<Element> &ciphertext, Plaintext plaintext) const
Virtual function to define the interface for multiplication of ciphertext by plaintext. This is the mutable version - input ciphertext may change (automatically rescaled, or towers dropped).
- Parameters
ciphertext – the input ciphertext.
plaintext – the input plaintext.
- Returns
the new ciphertext.
-
inline virtual Ciphertext<Element> MultByMonomial(ConstCiphertext<Element> ciphertext, usint power) const
-
inline virtual void MultByMonomialInPlace(Ciphertext<Element> &ciphertext, usint power) const
-
inline virtual Ciphertext<Element> EvalMult(ConstCiphertext<Element> ciphertext, const NativeInteger &constant) const
-
inline virtual void EvalMultInPlace(Ciphertext<Element> &ciphertext, const NativeInteger &constant) const
-
inline virtual Ciphertext<Element> EvalMult(ConstCiphertext<Element> ciphertext, double constant) const
-
inline virtual void EvalMultInPlace(Ciphertext<Element> &ciphertext, double constant) const
-
inline virtual Ciphertext<DCRTPoly> MultByInteger(ConstCiphertext<DCRTPoly> ciphertext, uint64_t integer) const
-
inline virtual void MultByIntegerInPlace(Ciphertext<DCRTPoly> &ciphertext, uint64_t integer) const
-
virtual Ciphertext<Element> EvalMult(ConstCiphertext<Element> ciphertext1, ConstCiphertext<Element> ciphertext2, const EvalKey<Element> evalKey) const
Virtual function to define the interface for multiplicative homomorphic evaluation of ciphertext using the evaluation key.
- Parameters
&ciphertext1 – first input ciphertext.
&ciphertext2 – second input ciphertext.
&ek – is the evaluation key to make the newCiphertext decryptable by the same secret key as that of ciphertext1 and ciphertext2.
- Returns
the new ciphertext.
-
virtual void EvalMultInPlace(Ciphertext<Element> &ciphertext1, ConstCiphertext<Element> ciphertext2, const EvalKey<Element> evalKey) const
-
virtual Ciphertext<Element> EvalMultMutable(Ciphertext<Element> &ciphertext1, Ciphertext<Element> &ciphertext2, const EvalKey<Element> evalKey) const
Virtual function to define the interface for multiplicative homomorphic evaluation of ciphertext using the evaluation key. This is the mutable version - input ciphertext may change (automatically rescaled, or towers dropped).
- Parameters
&ciphertext1 – first input ciphertext.
&ciphertext2 – second input ciphertext.
&ek – is the evaluation key to make the newCiphertext decryptable by the same secret key as that of ciphertext1 and ciphertext2.
- Returns
the new ciphertext.
-
virtual void EvalMultMutableInPlace(Ciphertext<Element> &ciphertext1, Ciphertext<Element> &ciphertext2, const EvalKey<Element> evalKey) const
Virtual function to define the interface for multiplicative homomorphic evaluation of ciphertext using the evaluation key. This is the mutable version - input ciphertext may change (automatically rescaled, or towers dropped).
- Parameters
&ciphertext1 – first input ciphertext.
&ciphertext2 – second input ciphertext.
&ek – is the evaluation key to make the newCiphertext decryptable by the same secret key as that of ciphertext1 and ciphertext2.
- Returns
the new ciphertext.
-
virtual Ciphertext<Element> EvalSquare(ConstCiphertext<Element> ciphertext, const EvalKey<Element> evalKey) const
-
virtual void EvalSquareInPlace(Ciphertext<Element> &ciphertext1, const EvalKey<Element> evalKey) const
-
virtual Ciphertext<Element> EvalSquareMutable(Ciphertext<Element> &ciphertext, const EvalKey<Element> evalKey) const
-
virtual Ciphertext<Element> EvalMultAndRelinearize(ConstCiphertext<Element> ciphertext1, ConstCiphertext<Element> ciphertext2, const std::vector<EvalKey<Element>> &evalKeyVec) const
Virtual function to define the interface for multiplicative homomorphic evaluation of ciphertext using the evaluation key.
- Parameters
ct1 – first input ciphertext.
ct2 – second input ciphertext.
ek – is the evaluation key to make the newCiphertext decryptable by the same secret key as that of ciphertext1 and ciphertext2.
*newCiphertext – the new resulting ciphertext.
-
virtual Ciphertext<Element> Relinearize(ConstCiphertext<Element> ciphertext, const std::vector<EvalKey<Element>> &evalKeyVec) const
Virtual function to do relinearization
- Parameters
ciphertext – input ciphertext.
ek – are the evaluation keys to make the newCiphertext decryptable by the same secret key as that of ciphertext1 and ciphertext2.
- Returns
the new resulting ciphertext.
-
virtual void RelinearizeInPlace(Ciphertext<Element> &ciphertext, const std::vector<EvalKey<Element>> &evalKeyVec) const
Virtual function to do relinearization
- Parameters
ciphertext – input ciphertext.
ek – are the evaluation keys to make the newCiphertext decryptable by the same secret key as that of ciphertext1 and ciphertext2.
- Returns
the new resulting ciphertext.
-
virtual std::shared_ptr<std::map<usint, EvalKey<Element>>> EvalAutomorphismKeyGen(const PrivateKey<Element> privateKey, const std::vector<usint> &indexList) const
Virtual function to generate automophism keys for a given private key; Uses the private key for encryption
- Parameters
privateKey – private key.
indexList – list of automorphism indices to be computed
- Returns
returns the evaluation keys
-
inline virtual std::shared_ptr<std::map<usint, EvalKey<Element>>> EvalAutomorphismKeyGen(const PublicKey<Element> publicKey, const PrivateKey<Element> privateKey, const std::vector<usint> &indexList) const
Virtual function to generate all isomorphism keys for a given private key
- Parameters
publicKey – encryption key for the new ciphertext.
origPrivateKey – original private key used for decryption.
indexList – list of automorphism indices to be computed
- Returns
returns the evaluation keys
-
virtual Ciphertext<Element> EvalAutomorphism(ConstCiphertext<Element> ciphertext, usint i, const std::map<usint, EvalKey<Element>> &evalKeyMap, CALLER_INFO_ARGS_HDR) const
Virtual function for evaluating automorphism of ciphertext at index i
- Parameters
ciphertext – the input ciphertext.
i – automorphism index
&evalKeys – - reference to the vector of evaluation keys generated by EvalAutomorphismKeyGen.
- Returns
resulting ciphertext
Virtual function for the automorphism and key switching step of hoisted automorphisms.
- Parameters
ct – the input ciphertext to perform the automorphism on
index – the index of the rotation. Positive indices correspond to left rotations and negative indices correspond to right rotations.
m – is the cyclotomic order
digits – the digit decomposition created by EvalFastRotationPrecompute at the precomputation step.
-
virtual std::shared_ptr<std::vector<Element>> EvalFastRotationPrecompute(ConstCiphertext<Element> ciphertext) const
Virtual function for the precomputation step of hoisted automorphisms.
- Parameters
ct – the input ciphertext on which to do the precomputation (digit decomposition)
-
virtual std::shared_ptr<std::map<usint, EvalKey<Element>>> EvalAtIndexKeyGen(const PublicKey<Element> publicKey, const PrivateKey<Element> privateKey, const std::vector<int32_t> &indexList) const
Generates evaluation keys for a list of indices Currently works only for power-of-two and cyclic-group cyclotomics
- Parameters
publicKey – encryption key for the new ciphertext.
origPrivateKey – original private key used for decryption.
indexList – list of indices to be computed
- Returns
returns the evaluation keys
-
virtual Ciphertext<Element> EvalAtIndex(ConstCiphertext<Element> ciphertext, int32_t index, const std::map<usint, EvalKey<Element>> &evalKeyMap) const
Moves i-th slot to slot 0
- Parameters
ciphertext. –
i – the index.
&evalAtIndexKeys – - reference to the map of evaluation keys generated by EvalAtIndexKeyGen.
- Returns
resulting ciphertext
-
inline virtual Ciphertext<Element> ModReduce(ConstCiphertext<Element> ciphertext, size_t levels) const
Method for Modulus Reduction.
- Parameters
&cipherText – Ciphertext to perform mod reduce on.
levels – the number of towers to drop.
-
inline virtual void ModReduceInPlace(Ciphertext<Element> &ciphertext, size_t levels) const
Method for In-place Modulus Reduction.
- Parameters
&cipherText – Ciphertext to perform mod reduce on.
levels – the number of towers to drop.
-
virtual Ciphertext<Element> ComposedEvalMult(ConstCiphertext<Element> ciphertext1, ConstCiphertext<Element> ciphertext2, const EvalKey<Element> evalKey) const
Method for Composed EvalMult
- Parameters
&cipherText1 – ciphertext1, first input ciphertext to perform multiplication on.
&cipherText2 – cipherText2, second input ciphertext to perform multiplication on.
&quadKeySwitchHint – is for resultant quadratic secret key after multiplication to the secret key of the particular level.
&cipherTextResult – is the resulting ciphertext that can be decrypted with the secret key of the particular level.
-
virtual Ciphertext<Element> LevelReduce(ConstCiphertext<Element> ciphertext1, const EvalKey<Element> evalKey, size_t levels) const
Method for Level Reduction from sk -> sk1. This method peforms a keyswitch on the ciphertext and then performs a modulus reduction.
- Parameters
&cipherText1 – is the original ciphertext to be key switched and mod reduced.
&linearKeySwitchHint – is the linear key switch hint to perform the key switch operation.
&cipherTextResult – is the resulting ciphertext.
-
inline virtual void LevelReduceInPlace(Ciphertext<Element> &ciphertext1, const EvalKey<Element> evalKey, size_t levels) const
Method for Level Reduction from sk -> sk1. This method peforms a keyswitch on the ciphertext and then performs a modulus reduction.
- Parameters
&cipherText1 – is the original ciphertext to be key switched and mod reduced.
&linearKeySwitchHint – is the linear key switch hint to perform the key switch operation.
&cipherTextResult – is the resulting ciphertext.
-
inline virtual Ciphertext<Element> Compress(ConstCiphertext<Element> ciphertext, size_t towersLeft) const
-
inline virtual Ciphertext<Element> ModReduceInternal(ConstCiphertext<Element> ciphertext, size_t levels) const
Method for rescaling.
- Parameters
cipherText – is the ciphertext to perform modreduce on.
levels – the number of towers to drop.
- Returns
ciphertext after the modulus reduction performed.
-
inline virtual void ModReduceInternalInPlace(Ciphertext<Element> &ciphertext, size_t levels) const
Method for rescaling in-place.
cipherText
will have modulus reduction performed in-place.- Parameters
cipherText – is the ciphertext to perform modreduce on.
levels – the number of towers to drop.
-
inline virtual Ciphertext<Element> LevelReduceInternal(ConstCiphertext<Element> ciphertext, size_t levels) const
Method for Level Reduction in the CKKS scheme. It just drops “levels” number of the towers of the ciphertext without changing the underlying plaintext.
- Parameters
cipherText1 – is the original ciphertext to be level reduced.
levels – the number of towers to drop.
- Returns
resulting ciphertext.
-
inline virtual void LevelReduceInternalInPlace(Ciphertext<Element> &ciphertext, size_t levels) const
Method for in-place Level Reduction in the CKKS scheme. It just drops “levels” number of the towers of the ciphertext without changing the underlying plaintext.
- Parameters
cipherText1 – is the ciphertext to be level reduced in-place
levels – the number of towers to drop.
-
inline virtual void AdjustLevelsInPlace(Ciphertext<Element> &ciphertext1, Ciphertext<Element> &ciphertext2) const
-
inline virtual void AdjustLevelsAndDepthInPlace(Ciphertext<Element> &ciphertext1, Ciphertext<Element> &ciphertext2) const
-
inline virtual void AdjustLevelsAndDepthToOneInPlace(Ciphertext<Element> &ciphertext1, Ciphertext<Element> &ciphertext2) const
-
inline virtual void AdjustForAddOrSubInPlace(Ciphertext<Element> &ciphertext1, Ciphertext<Element> &ciphertext2) const
-
inline virtual void AdjustForMultInPlace(Ciphertext<Element> &ciphertext1, Ciphertext<Element> &ciphertext2) const
-
virtual Ciphertext<Element> MorphPlaintext(ConstPlaintext plaintext, ConstCiphertext<Element> ciphertext) const
Protected Functions
-
virtual Ciphertext<Element> EvalAddCore(ConstCiphertext<Element> ciphertext1, ConstCiphertext<Element> ciphertext2) const
Internal function for in-place homomorphic addition of ciphertexts. This method does not check whether input ciphertexts are at the same level.
- Parameters
ciphertext1 – first input/output ciphertext.
ciphertext2 – second input ciphertext.
- Returns
ciphertext1
contains the result of the homomorphic addition of input ciphertexts.
-
void EvalAddCoreInPlace(Ciphertext<Element> &ciphertext1, ConstCiphertext<Element> ciphertext2) const
Internal function for in-place homomorphic addition of ciphertexts. This method does not check whether input ciphertexts are at the same level.
- Parameters
ciphertext1 – first input/output ciphertext.
ciphertext2 – second input ciphertext.
- Returns
ciphertext1
contains the result of the homomorphic addition of input ciphertexts.
-
virtual Ciphertext<Element> EvalSubCore(ConstCiphertext<Element> ciphertext1, ConstCiphertext<Element> ciphertext2) const
-
void EvalSubCoreInPlace(Ciphertext<Element> &ciphertext1, ConstCiphertext<Element> ciphertext2) const
Internal function for in-place homomorphic addition of ciphertexts. This method does not check whether input ciphertexts are at the same level.
- Parameters
ciphertext1 – first input/output ciphertext.
ciphertext2 – second input ciphertext.
- Returns
ciphertext1
contains the result of the homomorphic addition of input ciphertexts.
-
Ciphertext<Element> EvalMultCore(ConstCiphertext<Element> ciphertext1, ConstCiphertext<Element> ciphertext2) const
Internal function for homomorphic multiplication of ciphertexts. This method does not check whether input ciphertexts are at the same level.
- Parameters
ciphertext1 – first input ciphertext.
ciphertext2 – second input ciphertext.
- Returns
result of homomorphic multiplication of input ciphertexts.
-
Ciphertext<Element> EvalSquareCore(ConstCiphertext<Element> ciphertext) const
-
virtual Ciphertext<Element> EvalAddCore(ConstCiphertext<Element> ciphertext, const Element plaintext) const
-
void EvalAddCoreInPlace(Ciphertext<Element> &ciphertext, const Element plaintext) const
-
virtual Ciphertext<Element> EvalSubCore(ConstCiphertext<Element> ciphertext1, const Element plaintext) const
-
void EvalSubCoreInPlace(Ciphertext<Element> &ciphertext1, const Element plaintext) const
-
Ciphertext<Element> EvalMultCore(ConstCiphertext<Element> ciphertext, const Element plaintext) const
-
void EvalMultCoreInPlace(Ciphertext<Element> &ciphertext, const Element plaintext) const