Template Class TrapdoorParams

Inheritance Relationships

Derived Type

Template Parameter Order

  1. class Element

Class Documentation

template<class Element>
class lbcrypto::TrapdoorParams

Inheritence diagram for lbcrypto::TrapdoorParams:

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

Base class for the parameters shared by the trapdoor-based schemes (GPV signature, IBE, ABE): the ring element parameters, the discrete Gaussian generator, and its distribution parameter.

Template Parameters

Element – ring element

Subclassed by lbcrypto::RLWETrapdoorParams< Element >

Public Functions

virtual ~TrapdoorParams() = default

Default destructor.

inline TrapdoorParams()

Default constructor; sets the distribution parameter to 0 and leaves the ring element parameters unset.

inline TrapdoorParams(std::shared_ptr<ParmType> elemparams, DggType &dgg, double stddev)

Constructor for trapdoor parameters.

Parameters
  • elemparams – parameters of the ring element

  • dgg – discrete Gaussian generator used for sampling; copied into the object

  • stddev – distribution parameter (standard deviation) of the Gaussian generator

inline const std::shared_ptr<ParmType> &GetElemParams() const

Accessor function for the ring element parameters.

Returns

the ring element parameters

inline void SetElemParams(std::shared_ptr<ParmType> &elemparams)

Mutator function for the ring element parameters.

Parameters

elemparams – ring element parameters

inline DggType &GetDGG()

Accessor function for the discrete Gaussian generator.

Returns

the discrete Gaussian generator

inline void SetDGG(DggType &dgg)

Mutator function for the discrete Gaussian generator.

Parameters

dgg – discrete Gaussian generator to be set

inline double GetStdDev()

Accessor function for the distribution parameter.

Returns

the distribution parameter (standard deviation) of the Gaussian generator

inline void SetStdDev(double stddev)

Sets the distribution parameter and applies it to the stored discrete Gaussian generator as well.

Parameters

stddev – distribution parameter (standard deviation) to be set

Protected Attributes

double m_stddev

distribution parameter (standard deviation) of the discrete Gaussian generator

std::shared_ptr<ParmType> m_elemparams

parameters of the ring element

DggType m_dgg

discrete Gaussian generator used for sampling