Code base obscuration (for images) 1.0
It implements different obscuration methods on portable images (.pgm and .ppm)
|
This class represents a singleton model for the Paillier cryptosystem. More...
#include <Paillier_model.hpp>
Public Member Functions | |
PaillierModel (const PaillierModel &obj)=delete | |
Deleted copy constructor to prevent copying of the singleton instance. | |
uint64_t | getLambda () const |
Getter function for the lambda variable. | |
uint64_t | getN () const |
Getter function for the n variable. | |
uint64_t | getMu () const |
Getter function for the mu variable. | |
uint64_t | getG () const |
Getter function for the g variable. | |
uint64_t | getP () const |
Getter function for the p variable. | |
uint64_t | getQ () const |
Getter function for the q variable. | |
Paillier< uint64_t, uint64_t > | getPaillierGenerationKey () const |
Getter function for the Paillier instance used for key generation. | |
PaillierPrivateKey | getPrivateKey () const |
Getter function for the private key. | |
PaillierPublicKey | getPublicKey () const |
Getter function for the public key. | |
void | setLambda (uint64_t value) |
Setter function for the lambda variable. | |
void | setN (uint64_t value) |
Setter function for the n variable. | |
void | setMu (uint64_t value) |
Setter function for the mu variable. | |
void | setG (uint64_t value) |
Setter function for the g variable. | |
void | setP (uint64_t value) |
Setter function for the p variable. | |
void | setQ (uint64_t value) |
Setter function for the q variable. | |
void | setPaillierGenerationKey (Paillier< uint64_t, uint64_t > value) |
Setter function for the Paillier instance used for key generation. | |
void | setPrivateKey (PaillierPrivateKey value) |
Setter function for the private key. | |
void | setPublicKey (PaillierPublicKey value) |
Setter function for the public key. | |
~PaillierModel () | |
Destructor for the PaillierModel class. | |
Static Public Member Functions | |
static PaillierModel * | getInstance () |
Static function to get the singleton instance of the PaillierModel class. | |
This class represents a singleton model for the Paillier cryptosystem.
It contains the private and public keys, as well as the Paillier generation key. It also contains the parameters of the Paillier cryptosystem: lambda, n, mu, g, p, and q. The Paillier cryptosystem is an asymmetric encryption algorithm that allows for homomorphic addition and multiplication of encrypted data. This class provides a singleton instance of the Paillier cryptosystem, allowing for easy access and management of the public and private keys, as well as the encryption and decryption functions.
|
delete |
Deleted copy constructor to prevent copying of the singleton instance.
obj | Instance of PaillierModel. |
PaillierModel::~PaillierModel | ( | ) |
Destructor for the PaillierModel class.
uint64_t PaillierModel::getG | ( | ) | const |
Getter function for the g variable.
|
inlinestatic |
Static function to get the singleton instance of the PaillierModel class.
This function checks if the singleton instance has already been created, and if not, creates a new instance. The instance is then returned.
uint64_t PaillierModel::getLambda | ( | ) | const |
Getter function for the lambda variable.
uint64_t PaillierModel::getMu | ( | ) | const |
Getter function for the mu variable.
uint64_t PaillierModel::getN | ( | ) | const |
Getter function for the n variable.
uint64_t PaillierModel::getP | ( | ) | const |
Getter function for the p variable.
Paillier< uint64_t, uint64_t > PaillierModel::getPaillierGenerationKey | ( | ) | const |
Getter function for the Paillier instance used for key generation.
PaillierPrivateKey PaillierModel::getPrivateKey | ( | ) | const |
Getter function for the private key.
PaillierPublicKey PaillierModel::getPublicKey | ( | ) | const |
Getter function for the public key.
uint64_t PaillierModel::getQ | ( | ) | const |
Getter function for the q variable.
void PaillierModel::setG | ( | uint64_t | value | ) |
Setter function for the g variable.
[in] | value | The new value for g. |
void PaillierModel::setLambda | ( | uint64_t | value | ) |
Setter function for the lambda variable.
[in] | value | The new value for lambda. |
void PaillierModel::setMu | ( | uint64_t | value | ) |
Setter function for the mu variable.
[in] | value | The new value for mu. |
void PaillierModel::setN | ( | uint64_t | value | ) |
Setter function for the n variable.
[in] | value | The new value for n. |
void PaillierModel::setP | ( | uint64_t | value | ) |
Setter function for the p variable.
[in] | value | The new value for p. |
void PaillierModel::setPaillierGenerationKey | ( | Paillier< uint64_t, uint64_t > | value | ) |
void PaillierModel::setPrivateKey | ( | PaillierPrivateKey | value | ) |
Setter function for the private key.
[in] | value | The new private key. |
void PaillierModel::setPublicKey | ( | PaillierPublicKey | value | ) |
Setter function for the public key.
[in] | value | The new public key. |
void PaillierModel::setQ | ( | uint64_t | value | ) |
Setter function for the q variable.
[in] | value | The new value for q. |