- Main Page
- Namespaces
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# InvertibleLUCFunction Class Reference

`#include <luc.h>`

Inheritance diagram for InvertibleLUCFunction:

List of all members.

## Detailed Description

_

Definition at line 53 of file luc.h.

## Public Member Functions
void | Initialize (RandomNumberGenerator &rng, unsigned int modulusBits, const Integer &eStart=17)
void | Initialize (const Integer &n, const Integer &e, const Integer &p, const Integer &q, const Integer &u)
void | BERDecode (BufferedTransformation &bt)
void | DEREncode (BufferedTransformation &bt) const
Integer | CalculateInverse (RandomNumberGenerator &rng, const Integer &x) 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
void | GenerateRandom (RandomNumberGenerator &rng, const NameValuePairs &alg)
const Integer & | GetPrime1 () const
const Integer & | GetPrime2 () const
const Integer & | GetMultiplicativeInverseOfPrime2ModPrime1 () const
void | SetPrime1 (const Integer &p)
void | SetPrime2 (const Integer &q)
void | SetMultiplicativeInverseOfPrime2ModPrime1 (const Integer &u)
void | Initialize (const Integer &n, const Integer &e)
Integer | ApplyFunction (const Integer &x) const
Integer | PreimageBound () const
Integer | ImageBound () const
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
Integer | CalculateRandomizedInverse (RandomNumberGenerator &rng, const Integer &x) const
bool | IsRandomized () const
## Protected Attributes
Integer | m_p
Integer | m_q
Integer | m_u
Integer | m_n
Integer | m_e

## Member Function Documentation

bool InvertibleLUCFunction::Validate | ( | RandomNumberGenerator & | rng,
|  | unsigned int | level |
| ) |  |  | const`[virtual]`

check this object for errors

Parameters:

  | 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

Returns:
  true if the tests pass

Reimplemented from LUCFunction.

Definition at line 172 of file luc.cpp.

References Integer::IsOdd(), Integer::IsPositive(), LUCFunction::m_e, LUCFunction::m_n, m_p, m_q, m_u, Integer::One(), and LUCFunction::Validate().

void InvertibleLUCFunction::AssignFrom | ( | const NameValuePairs & | source | ) | `[virtual]`

assign values from source to this object

Note:
  This function can be used to create a public key from a private key.

Reimplemented from LUCFunction.

Definition at line 201 of file luc.cpp.

void InvertibleLUCFunction::GenerateRandom | ( | RandomNumberGenerator & | rng,
|  | const NameValuePairs & | alg |
| ) |  |  | `[virtual]`

parameters: (ModulusSize, PublicExponent (default 17))

Reimplemented from GeneratableCryptoMaterial.

Definition at line 107 of file luc.cpp.

References Integer::GenerateRandom(), NameValuePairs::GetIntValue(), PrimeSelector::GetSelectorPointer(), NameValuePairs::GetValueWithDefault(), Integer::InverseMod(), Integer::IsEven(), LUCFunction::m_e, LUCFunction::m_n, m_p, m_q, and m_u.

Referenced by Initialize().

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

- luc.h
- luc.cpp