Class PKERNS
Defined in File rns-pke.h
Page Contents
Inheritance Relationships
Base Type
public lbcrypto::PKEBase< DCRTPoly >(Template Class PKEBase)
Derived Types
public lbcrypto::PKEBFVRNS(Class PKEBFVRNS)public lbcrypto::PKEBGVRNS(Class PKEBGVRNS)public lbcrypto::PKECKKSRNS(Class PKECKKSRNS)
Class Documentation
-
class lbcrypto::PKERNS : public lbcrypto::PKEBase<DCRTPoly>
Inheritence diagram for lbcrypto::PKERNS:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"2" [label="lbcrypto::PKEBase< DCRTPoly >" tooltip="lbcrypto::PKEBase< DCRTPoly >"]
"5" [label="lbcrypto::PKECKKSRNS" tooltip="lbcrypto::PKECKKSRNS"]
"1" [label="lbcrypto::PKERNS" tooltip="lbcrypto::PKERNS" fillcolor="#BFBFBF"]
"3" [label="lbcrypto::PKEBFVRNS" tooltip="lbcrypto::PKEBFVRNS"]
"4" [label="lbcrypto::PKEBGVRNS" tooltip="lbcrypto::PKEBGVRNS"]
"5" -> "1" [dir=forward tooltip="public-inheritance"]
"1" -> "2" [dir=forward tooltip="public-inheritance"]
"3" -> "1" [dir=forward tooltip="public-inheritance"]
"4" -> "1" [dir=forward tooltip="public-inheritance"]
}](../_images/graphviz-5ec954935159649fe9acfac9416d7ffcd7b863bb.png)
Collaboration diagram for lbcrypto::PKERNS:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"2" [label="lbcrypto::PKEBase< DCRTPoly >" tooltip="lbcrypto::PKEBase< DCRTPoly >"]
"1" [label="lbcrypto::PKERNS" tooltip="lbcrypto::PKERNS" fillcolor="#BFBFBF"]
"1" -> "2" [dir=forward tooltip="public-inheritance"]
}](../_images/graphviz-52e4733f7d728c4a0d29cd376c323b59b0db12ff.png)
Abstract interface for encryption algorithm.
- Template Parameters
Element – a ring element.
Subclassed by lbcrypto::PKEBFVRNS, lbcrypto::PKEBGVRNS, lbcrypto::PKECKKSRNS
Public Functions
-
virtual ~PKERNS() = default
-
Ciphertext<DCRTPoly> Encrypt(DCRTPoly plaintext, const PublicKey<DCRTPoly> publicKey) const override
Method for encrypting plaintext using LBC
- Parameters
&publicKey – public key used for encryption.
plaintext – copy of the plaintext element. NOTE a copy is passed! That is NOT an error!
doEncryption – encrypts if true, embeds (encodes) the plaintext into cryptocontext if false
*ciphertext – ciphertext which results from encryption.
-
Ciphertext<DCRTPoly> Encrypt(DCRTPoly plaintext, const PrivateKey<DCRTPoly> privateKey) const override
Method for encrypting plaintex using LBC
- Parameters
privateKey – private key used for encryption.
plaintext – copy of the plaintext input. NOTE a copy is passed! That is NOT an error!
doEncryption – encrypts if true, embeds (encodes) the plaintext into cryptocontext if false
*ciphertext – ciphertext which results from encryption.
-
virtual DecryptResult Decrypt(ConstCiphertext<DCRTPoly> ciphertext, const PrivateKey<DCRTPoly> privateKey, NativePoly *plaintext) const override
Method for decrypting plaintext using LBC
- Parameters
&privateKey – private key used for decryption.
&ciphertext – ciphertext id decrypted.
*plaintext – the plaintext output.
- Returns
the decoding result.
-
virtual DecryptResult Decrypt(ConstCiphertext<DCRTPoly> ciphertext, const PrivateKey<DCRTPoly> privateKey, Poly *plaintext) const override
Method for decrypting plaintext using LBC
- Parameters
&privateKey – private key used for decryption.
&ciphertext – ciphertext id decrypted.
*plaintext – the plaintext output.
- Returns
the decoding result.
-
DCRTPoly DecryptCore(const std::vector<DCRTPoly> &cv, const PrivateKey<DCRTPoly> privateKey) const override
-
inline std::string SerializedObjectName() const