Crypto++ 8.7
Free C++ class library of cryptographic schemes
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:

Public Member Functions

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...
 
virtual Integer CalculateRandomizedInverse (RandomNumberGenerator &rng, const Integer &x) const =0
 Applies the inverse of the trapdoor function, using random data if required. More...
 
virtual bool IsRandomized () const
 Determines if the decryption algorithm is randomized. More...
 

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 178 of file pubkey.h.

Constructor & Destructor Documentation

◆ ~TrapdoorFunctionInverse()

virtual TrapdoorFunctionInverse::~TrapdoorFunctionInverse ( )
inlinevirtual

Definition at line 181 of file pubkey.h.

Member Function Documentation

◆ CalculateRandomizedInverse()

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 190 of file pubkey.h.

◆ IsRandomized()

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 196 of file pubkey.h.

◆ CalculateInverse()

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 InvertibleLUCFunction, InvertibleRabinFunction, InvertibleRSAFunction, InvertibleRSAFunction_ISO, and InvertibleRWFunction.


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