#include <algebra.hpp>
Inheritance diagram for TaoCrypt::AbstractRing:


Public Types | |
| typedef Integer | Element |
Public Member Functions | |
| AbstractRing () | |
| AbstractRing (const AbstractRing &source) | |
| AbstractRing & | operator= (const AbstractRing &source) |
| virtual bool | IsUnit (const Element &a) const =0 |
| virtual const Element & | MultiplicativeIdentity () const =0 |
| virtual const Element & | Multiply (const Element &, const Element &) const =0 |
| virtual const Element & | MultiplicativeInverse (const Element &a) const =0 |
| virtual const Element & | Square (const Element &a) const |
| virtual const Element & | Divide (const Element &a, const Element &b) const |
| virtual Element | Exponentiate (const Element &a, const Integer &e) const |
| virtual Element | CascadeExponentiate (const Element &x, const Integer &e1, const Element &y, const Integer &e2) const |
| virtual void | SimultaneousExponentiate (Element *results, const Element &, const Integer *exponents, unsigned int exponentsCount) const |
| virtual const AbstractGroup & | MultiplicativeGroup () const |
Private Attributes | |
| MultiplicativeGroupT | m_mg |
Classes | |
| class | MultiplicativeGroupT |
Definition at line 72 of file algebra.hpp.
Reimplemented from TaoCrypt::AbstractGroup.
Reimplemented in TaoCrypt::AbstractEuclideanDomain, TaoCrypt::EuclideanDomainOf, and TaoCrypt::ModularArithmetic.
Definition at line 75 of file algebra.hpp.
| TaoCrypt::AbstractRing::AbstractRing | ( | ) | [inline] |
| TaoCrypt::AbstractRing::AbstractRing | ( | const AbstractRing & | source | ) | [inline] |
| Integer TaoCrypt::AbstractRing::CascadeExponentiate | ( | const Element & | x, | |
| const Integer & | e1, | |||
| const Element & | y, | |||
| const Integer & | e2 | |||
| ) | const [virtual] |
Reimplemented in TaoCrypt::ModularArithmetic, and TaoCrypt::MontgomeryRepresentation.
Definition at line 311 of file algebra.cpp.
References MultiplicativeGroup(), and x.
Referenced by TaoCrypt::ModularArithmetic::CascadeExponentiate(), and TaoCrypt::MontgomeryRepresentation::CascadeExponentiate().
00313 { 00314 return MultiplicativeGroup().AbstractGroup::CascadeScalarMultiply( 00315 x, e1, y, e2); 00316 }
Here is the call graph for this function:

Here is the caller graph for this function:

| const Integer & TaoCrypt::AbstractRing::Divide | ( | const Element & | a, | |
| const Element & | b | |||
| ) | const [virtual] |
Reimplemented in TaoCrypt::EuclideanDomainOf, and TaoCrypt::ModularArithmetic.
Definition at line 66 of file algebra.cpp.
References MultiplicativeInverse(), and Multiply().
00067 { 00068 // make copy of a in case MultiplicativeInverse() overwrites it 00069 Element a1(a); 00070 return Multiply(a1, MultiplicativeInverse(b)); 00071 }
Here is the call graph for this function:

| Integer TaoCrypt::AbstractRing::Exponentiate | ( | const Element & | a, | |
| const Integer & | e | |||
| ) | const [virtual] |
Definition at line 302 of file algebra.cpp.
References SimultaneousExponentiate().
Referenced by TaoCrypt::a_exp_b_mod_c(), and TaoCrypt::RSA_PrivateKey::CalculateInverse().
00304 { 00305 Element result; 00306 SimultaneousExponentiate(&result, base, &exponent, 1); 00307 return result; 00308 }
Here is the call graph for this function:

Here is the caller graph for this function:

Implemented in TaoCrypt::EuclideanDomainOf, and TaoCrypt::ModularArithmetic.
| virtual const AbstractGroup& TaoCrypt::AbstractRing::MultiplicativeGroup | ( | ) | const [inline, virtual] |
Definition at line 96 of file algebra.hpp.
Referenced by CascadeExponentiate(), and SimultaneousExponentiate().
00097 {return m_mg;}
Here is the caller graph for this function:

| virtual const Element& TaoCrypt::AbstractRing::MultiplicativeIdentity | ( | ) | const [pure virtual] |
Implemented in TaoCrypt::EuclideanDomainOf, TaoCrypt::ModularArithmetic, and TaoCrypt::MontgomeryRepresentation.
| virtual const Element& TaoCrypt::AbstractRing::MultiplicativeInverse | ( | const Element & | a | ) | const [pure virtual] |
Implemented in TaoCrypt::EuclideanDomainOf, TaoCrypt::ModularArithmetic, and TaoCrypt::MontgomeryRepresentation.
Referenced by Divide().
Here is the caller graph for this function:

| virtual const Element& TaoCrypt::AbstractRing::Multiply | ( | const Element & | , | |
| const Element & | ||||
| ) | const [pure virtual] |
Implemented in TaoCrypt::EuclideanDomainOf, TaoCrypt::ModularArithmetic, and TaoCrypt::MontgomeryRepresentation.
Referenced by Divide(), and Square().
Here is the caller graph for this function:

| AbstractRing& TaoCrypt::AbstractRing::operator= | ( | const AbstractRing & | source | ) | [inline] |
| void TaoCrypt::AbstractRing::SimultaneousExponentiate | ( | Element * | results, | |
| const Element & | , | |||
| const Integer * | exponents, | |||
| unsigned int | exponentsCount | |||
| ) | const [virtual] |
Reimplemented in TaoCrypt::ModularArithmetic.
Definition at line 319 of file algebra.cpp.
References MultiplicativeGroup().
Referenced by Exponentiate(), TaoCrypt::ModularArithmetic::SimultaneousExponentiate(), and TaoCrypt::MontgomeryRepresentation::SimultaneousExponentiate().
00322 { 00323 MultiplicativeGroup().AbstractGroup::SimultaneousMultiply(results, base, 00324 exponents, expCount); 00325 }
Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented in TaoCrypt::EuclideanDomainOf, TaoCrypt::ModularArithmetic, and TaoCrypt::MontgomeryRepresentation.
Definition at line 60 of file algebra.cpp.
References Multiply().
00061 { 00062 return Multiply(a, a); 00063 }
Here is the call graph for this function:

Definition at line 145 of file algebra.hpp.
1.4.7

