Applies the trapdoor function. More...
Public Member Functions | |
| Integer | ApplyRandomizedFunction (RandomNumberGenerator &rng, const Integer &x) const |
| Applies the trapdoor function. | |
| bool | IsRandomized () const |
| Determines if the encryption algorithm is randomized. | |
| virtual Integer | ApplyFunction (const Integer &x) const =0 |
| Applies the trapdoor. | |
| virtual Integer | PreimageBound () const =0 |
| Returns the maximum size of a message before the trapdoor function is applied. | |
| virtual Integer | ImageBound () const =0 |
| Returns the maximum size of a message after the trapdoor function is applied. | |
| virtual Integer | MaxPreimage () const |
| Returns the maximum size of a message before the trapdoor function is applied bound to a public key. | |
| virtual Integer | MaxImage () const |
| Returns the maximum size of a message after the trapdoor function is applied bound to a public key. | |
Applies the trapdoor function.
ApplyFunction() is the foundation for encrypting a message under a public key. Derived classes will override it at some point.
Definition at line 127 of file pubkey.h.
| Integer TrapdoorFunction::ApplyRandomizedFunction | ( | RandomNumberGenerator & | rng, | |
| const Integer & | x | |||
| ) | const [inline, virtual] |
Applies the trapdoor function.
| rng | a RandomNumberGenerator derived class | |
| x | the message on which the encryption function is applied |
ApplyRandomizedFunction is a generalization of encryption under a public key cryptosystem. The RandomNumberGenerator may (or may not) be required.
Internally, ApplyRandomizedFunction() calls ApplyFunction() without the RandomNumberGenerator.
Implements RandomizedTrapdoorFunction.
| bool TrapdoorFunction::IsRandomized | ( | ) | const [inline, virtual] |
Determines if the encryption algorithm is randomized.
true if the encryption algorithm is randomized, false otherwiseIf IsRandomized() returns false, then NullRNG() can be used.
Reimplemented from RandomizedTrapdoorFunction.
Applies the trapdoor.
| x | the message on which the encryption function is applied |
x encrypted under the public keyApplyFunction is a generalization of encryption under a public key cryptosystem. Derived classes must implement it.
Implemented in ESIGNFunction, LUCFunction, RabinFunction, RSAFunction, RSAFunction_ISO, and RWFunction.
| virtual Integer TrapdoorFunctionBounds::PreimageBound | ( | ) | const [pure virtual, inherited] |
Returns the maximum size of a message before the trapdoor function is applied.
Derived classes must implement PreimageBound().
Implemented in ESIGNFunction, LUCFunction, RabinFunction, RSAFunction, RSAFunction_ISO, InvertibleRSAFunction_ISO, and RWFunction.
| virtual Integer TrapdoorFunctionBounds::ImageBound | ( | ) | const [pure virtual, inherited] |
Returns the maximum size of a message after the trapdoor function is applied.
Derived classes must implement ImageBound().
Implemented in ESIGNFunction, LUCFunction, RabinFunction, RSAFunction, and RWFunction.
| virtual Integer TrapdoorFunctionBounds::MaxPreimage | ( | ) | const [inline, virtual, inherited] |
Returns the maximum size of a message before the trapdoor function is applied bound to a public key.
The default implementation returns PreimageBound() - 1.
| virtual Integer TrapdoorFunctionBounds::MaxImage | ( | ) | const [inline, virtual, inherited] |
Returns the maximum size of a message after the trapdoor function is applied bound to a public key.
The default implementation returns ImageBound() - 1.
Definition at line 89 of file pubkey.h.
Referenced by ESIGNFunction::ApplyFunction().
1.6.1