#include <luc.h>
Inheritance diagram for LUCFunction:
This class is here for historical and pedagogical interest. It has no practical advantages over other trapdoor functions and probably shouldn't be used in production software. The discrete log based LUC schemes defined later in this .h file may be of more practical interest.
Definition at line 22 of file luc.h.
Public Member Functions | |
void | Initialize (const Integer &n, const Integer &e) |
void | BERDecode (BufferedTransformation &bt) |
void | DEREncode (BufferedTransformation &bt) const |
Integer | ApplyFunction (const Integer &x) const |
Integer | PreimageBound () const |
Integer | ImageBound () const |
bool | Validate (RandomNumberGenerator &rng, unsigned int level) const |
check this object for errors | |
bool | GetVoidValue (const char *name, const std::type_info &valueType, void *pValue) const |
to be implemented by derived classes, users should use one of the above functions instead | |
void | AssignFrom (const NameValuePairs &source) |
assign values from source to this object | |
const Integer & | GetModulus () const |
const Integer & | GetPublicExponent () const |
void | SetModulus (const Integer &n) |
void | SetPublicExponent (const Integer &e) |
Integer | ApplyRandomizedFunction (RandomNumberGenerator &rng, const Integer &x) const |
bool | IsRandomized () const |
virtual Integer | MaxPreimage () const |
virtual Integer | MaxImage () const |
Protected Attributes | |
Integer | m_n |
Integer | m_e |
bool LUCFunction::Validate | ( | RandomNumberGenerator & | rng, | |
unsigned int | level | |||
) | const [virtual] |
check this object for errors
level | denotes the level of thoroughness: 0 - using this object won't cause a crash or exception (rng is ignored) 1 - this object will probably function (encrypt, sign, etc.) correctly (but may not check for weak keys and such) 2 - make sure this object will function correctly, and do reasonable security checks 3 - do checks that may take a long time |
Implements CryptoMaterial.
Reimplemented in InvertibleLUCFunction.
Definition at line 69 of file luc.cpp.
References Integer::IsOdd(), m_e, m_n, and Integer::One().
Referenced by InvertibleLUCFunction::Validate().
void LUCFunction::AssignFrom | ( | const NameValuePairs & | source | ) | [virtual] |
assign values from source to this object
Implements CryptoMaterial.
Reimplemented in InvertibleLUCFunction.