Class MultipartyCKKSRNS

Inheritance Relationships

Base Type

Class Documentation

class lbcrypto::MultipartyCKKSRNS : public lbcrypto::MultipartyRNS

Inheritence diagram for lbcrypto::MultipartyCKKSRNS:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "3" [label="lbcrypto::MultipartyBase< DCRTPoly >" tooltip="lbcrypto::MultipartyBase< DCRTPoly >"]
    "2" [label="lbcrypto::MultipartyRNS" tooltip="lbcrypto::MultipartyRNS"]
    "1" [label="lbcrypto::MultipartyCKKSRNS" tooltip="lbcrypto::MultipartyCKKSRNS" fillcolor="#BFBFBF"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for lbcrypto::MultipartyCKKSRNS:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "3" [label="lbcrypto::MultipartyBase< DCRTPoly >" tooltip="lbcrypto::MultipartyBase< DCRTPoly >"]
    "2" [label="lbcrypto::MultipartyRNS" tooltip="lbcrypto::MultipartyRNS"]
    "1" [label="lbcrypto::MultipartyCKKSRNS" tooltip="lbcrypto::MultipartyCKKSRNS" fillcolor="#BFBFBF"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Public Functions

virtual ~MultipartyCKKSRNS() = default
virtual DecryptResult MultipartyDecryptFusion(const std::vector<Ciphertext<DCRTPoly>> &ciphertextVec, Poly *plaintext) const override

Threshold FHE: Method for combining the partially decrypted ciphertexts and getting the final decryption in the clear as a Poly.

Parameters
  • &ciphertextVec – vector of “partial” decryptions.

  • *plaintext – the plaintext output as a Poly.

Returns

the decoding result.

DecryptResult MultipartyDecryptFusion(const std::vector<Ciphertext<DCRTPoly>> &ciphertextVec, NativePoly *plaintext) const override
virtual Ciphertext<DCRTPoly> IntBootAdjustScale(ConstCiphertext<DCRTPoly> ciphertext) const override

Prepare a ciphertext for interactive bootstraping.

For the FIXEDMANUAL and FIXEDAUTO modes of CKKS, drops the the number of towers 2 and makes sure the scale is Delta (not a power of Delta). The input should have at least 2 towers.

For the FLEXIBLEAUTO mode of CKKS, the input ciphertext should have at least 3 towers. One tower will be used to adjust the scale to level 0.

Parameters

ciphertext – Input Ciphertext

Returns

: Resulting Ciphertext

virtual Ciphertext<DCRTPoly> IntMPBootAdjustScale(ConstCiphertext<DCRTPoly> ciphertext) const override

Threshold FHE: Prepare a ciphertext for Multi-Party Interactive Bootstrapping

Parameters

ciphertext – Input Ciphertext

Returns

: Resulting Ciphertext

virtual Ciphertext<DCRTPoly> IntMPBootRandomElementGen(std::shared_ptr<CryptoParametersCKKSRNS> params, const PublicKey<DCRTPoly> publicKey) const override

Threshold FHE: Generate a common random polynomial for Multi-Party Interactive Bootstrapping

Parameters

publicKey – the scheme public key (you can also provide the lead party’s public-key)

Returns

: Resulting ring element

virtual Ciphertext<DCRTPoly> IntMPBootRandomElementGen(std::shared_ptr<CryptoParametersCKKSRNS> params, ConstCiphertext<DCRTPoly> &ciphertext) const override
virtual std::vector<Ciphertext<DCRTPoly>> IntMPBootDecrypt(const PrivateKey<DCRTPoly> privateKey, ConstCiphertext<DCRTPoly> ciphertext, ConstCiphertext<DCRTPoly> a) const override

Threshold FHE: Does masked decryption as part of Multi-Party Interactive Bootstrapping. Each party calls this function as part of the protocol

Parameters
  • privateKey – secret key share for party i

  • ciphertext – input ciphertext

  • a – input common random polynomial

Returns

: Resulting masked decryption

virtual std::vector<Ciphertext<DCRTPoly>> IntMPBootAdd(std::vector<std::vector<Ciphertext<DCRTPoly>>> &sharesPairVec) const override

Threshold FHE: Aggregates a vector of masked decryptions and re-encryotion shares, which is the second step of the interactive multiparty bootstrapping procedure.

Parameters

sharesPairVec – vector of pair of ciphertexts, each element of this vector contains (h_0i, h_1i) - the masked-decryption and encryption shares ofparty i

Returns

: aggregated pair of shares ((h_0, h_1)

virtual Ciphertext<DCRTPoly> IntMPBootEncrypt(const PublicKey<DCRTPoly> publicKey, const std::vector<Ciphertext<DCRTPoly>> &sharesPair, ConstCiphertext<DCRTPoly> a, ConstCiphertext<DCRTPoly> ciphertext) const override

Threshold FHE: Does public key encryption of lead party’s masked decryption as part of interactive multi-party bootstrapping, which increases the ciphertext modulus and enables future computations. This operation is done by the lead party as the final step of interactive multi-party bootstrapping.

Parameters
  • publicKey – the lead party’s public key

  • sharesPair – aggregated decryption and re-encryption shares

  • a – common random ring element

  • ciphertext – input ciphertext

Returns

: Resulting encryption

template<class Archive>
inline void save(Archive &ar, std::uint32_t const version) const
template<class Archive>
inline void load(Archive &ar, std::uint32_t const version)
inline std::string SerializedObjectName() const