Crypto++ 8.2 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...

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...

## 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.

## Member Function Documentation

## ◆ CalculateRandomizedInverse()

Integer TrapdoorFunctionInverse::CalculateRandomizedInverse | ( | RandomNumberGenerator & | rng,
|  | const Integer & | x
| ) |  | const
| inline virtual

Applies the inverse of the trapdoor function.

Parameters

  rng | a RandomNumberGenerator derived class
  x | the 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
| inline virtual

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

  rng | a RandomNumberGenerator derived class
  x | the element

Returns
  the inverse of the element in the group

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

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

- pubkey.h