Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | List of all members
TrapdoorFunctionInverse Class Referenceabstract

Applies the inverse of the trapdoor function. More...

#include <pubkey.h>

Inheritance diagram for TrapdoorFunctionInverse:
[legend]
Collaboration diagram for TrapdoorFunctionInverse:
[legend]

Public Member Functions

virtual ~TrapdoorFunctionInverse ()
 
Integer CalculateRandomizedInverse (RandomNumberGenerator &rng, const Integer &x) const
 Applies the inverse of the trapdoor function. More...
 
bool IsRandomized () const
 Determines if the decryption algorithm is randomized. More...
 
virtual Integer CalculateInverse (RandomNumberGenerator &rng, const Integer &x) const =0
 Calculates the inverse of an element. More...
 
- Public Member Functions inherited from RandomizedTrapdoorFunctionInverse
virtual ~RandomizedTrapdoorFunctionInverse ()
 

Detailed Description

Applies the inverse of the trapdoor function.

CalculateInverse() is the foundation for decrypting a message under a private key in a public key cryptosystem. Derived classes will override it at some point.

See also
TrapdoorFunctionBounds(), RandomizedTrapdoorFunction(), TrapdoorFunction(), RandomizedTrapdoorFunctionInverse() and TrapdoorFunctionInverse()

Definition at line 183 of file pubkey.h.

Constructor & Destructor Documentation

virtual TrapdoorFunctionInverse::~TrapdoorFunctionInverse ( )
inlinevirtual

Definition at line 186 of file pubkey.h.

Member Function Documentation

virtual Integer TrapdoorFunctionInverse::CalculateInverse ( RandomNumberGenerator rng,
const Integer x 
) const
pure virtual

Calculates the inverse of an element.

Parameters
rnga RandomNumberGenerator derived class
xthe element
Returns
the inverse of the element in the group

Implemented in InvertibleRSAFunction_ISO, InvertibleRSAFunction, InvertibleLUCFunction, InvertibleRWFunction, and InvertibleRabinFunction.

Here is the caller graph for this function:

Integer TrapdoorFunctionInverse::CalculateRandomizedInverse ( RandomNumberGenerator rng,
const Integer x 
) const
inlinevirtual

Applies the inverse of the trapdoor function.

Parameters
rnga RandomNumberGenerator derived class
xthe message on which the decryption function is applied
Returns
the message x decrypted under the private key

CalculateRandomizedInverse is a generalization of decryption using the private key

Internally, CalculateRandomizedInverse() calls CalculateInverse() without the RandomNumberGenerator.

Implements RandomizedTrapdoorFunctionInverse.

Definition at line 195 of file pubkey.h.

bool TrapdoorFunctionInverse::IsRandomized ( ) const
inlinevirtual

Determines if the decryption algorithm is randomized.

Returns
true if the decryption algorithm is randomized, false otherwise

If IsRandomized() returns false, then NullRNG() can be used.

Reimplemented from RandomizedTrapdoorFunctionInverse.

Definition at line 201 of file pubkey.h.


The documentation for this class was generated from the following file: