helayers::HelibBgvPlaintext Class Reference

Concrete implementation of AbstractPlaintext API for HElib's BGV scheme. More...

#include <HelibBgvPlaintext.h>

Inheritance diagram for helayers::HelibBgvPlaintext:
helayers::AbstractPlaintext

Public Member Functions

 HelibBgvPlaintext (HelibBgvContext &h)
 A constructor.
 
std::shared_ptr< HelibBgvPlaintextclone () const
 Copies this HelibBgvPlaintext and returns a pointer to the new copied object as shared_ptr<HelibBgvPlaintext>.
 
std::streamoff save (std::ostream &stream) const override
 Saves this HelibBgvPlaintext to the receieved binary stream. More...
 
std::streamoff load (std::istream &stream) override
 Loads this HelibBgvPlaintext from the receieved binary stream. More...
 
void reduceChainIndex () override
 This function has no effect in this implementation of plaintext.
 
void setChainIndex (const AbstractPlaintext &other) override
 This function has no effect in this implementation of plaintext.
 
void setChainIndex (int chainIndex) override
 This function has no effect in this implementation of plaintext.
 
int getChainIndex () const override
 Returns an arbitrary value.
 
int slotCount () const override
 Returns the number of slots of this plaintext.
 
const helib::Ptxt< helib::BGV > & getPlaintext () const
 Returns the internal plaintext object of the underlying Helib BGV scheme.
 
- Public Member Functions inherited from helayers::AbstractPlaintext
 AbstractPlaintext (HeContext &he)
 
AbstractPlaintextoperator= (const AbstractPlaintext &src)=delete
 
std::shared_ptr< AbstractPlaintextclone () const
 
HeContextgetContext ()
 
const HeContextgetContext () const
 
virtual void debugPrint (const std::string &title="", int maxElements=-1, int verbose=0, std::ostream &out=std::cout) const
 

Static Public Member Functions

static void writePtxtToBinary (std::ostream &out, const helib::Ptxt< helib::BGV > &pt)
 Writes the given helib::Ptxt into the given binary stream. More...
 
static void readPtxtFromBinary (std::istream &in, helib::Ptxt< helib::BGV > &pt, const helib::Context &context)
 Reads the given helib::Ptxt object from the given binary stream. More...
 

Friends

class HelibBgvEncoder
 

Additional Inherited Members

- Protected Member Functions inherited from helayers::AbstractPlaintext
 AbstractPlaintext (const AbstractPlaintext &src)=default
 

Detailed Description

Concrete implementation of AbstractPlaintext API for HElib's BGV scheme.

Member Function Documentation

◆ load()

streamoff helayers::HelibBgvPlaintext::load ( std::istream &  stream)
overridevirtual

Loads this HelibBgvPlaintext from the receieved binary stream.

Parameters
streamThe binary stream to load from.

Implements helayers::AbstractPlaintext.

◆ readPtxtFromBinary()

void helayers::HelibBgvPlaintext::readPtxtFromBinary ( std::istream &  in,
helib::Ptxt< helib::BGV > &  pt,
const helib::Context &  context 
)
static

Reads the given helib::Ptxt object from the given binary stream.

Parameters
inThe binary stream to load from.
ptThe helib::Ptxt object to read.
contextThe inner helib::Context object HElib.

◆ save()

streamoff helayers::HelibBgvPlaintext::save ( std::ostream &  stream) const
overridevirtual

Saves this HelibBgvPlaintext to the receieved binary stream.

Parameters
streamThe binary stream to save to.

Implements helayers::AbstractPlaintext.

◆ writePtxtToBinary()

void helayers::HelibBgvPlaintext::writePtxtToBinary ( std::ostream &  out,
const helib::Ptxt< helib::BGV > &  pt 
)
static

Writes the given helib::Ptxt into the given binary stream.

Parameters
outThe binary stream to save to.
ptThe helib::Ptxt object to save.

The documentation for this class was generated from the following files:
  • /opt/IBM/FHE-distro/ML-HElib/src/helayers/hebase/helib/HelibBgvPlaintext.h
  • /opt/IBM/FHE-distro/ML-HElib/src/helayers/hebase/helib/HelibBgvPlaintext.cpp