Shadowrun: Awakened 29 September 2011 - Build 871
Public Member Functions | Protected Attributes | Private Attributes | Static Private Attributes
cat::BigMontgomery Class Reference

#include <BigMontgomery.hpp>

Inheritance diagram for cat::BigMontgomery:

List of all members.

Public Member Functions

 BigMontgomery (int regs, int bits)
void CopyModulus (Leg *out)
const Leg * GetModulus ()
bool IsRabinMillerPrime (IRandom *prng, const Leg *n, int trials=20)
void MonAdd (const Leg *in_a, const Leg *in_b, Leg *out)
void MonDouble (const Leg *in, Leg *out)
void MonExpMod (const Leg *in_base, const Leg *in_exp, Leg *out)
void MonInput (const Leg *in, Leg *out)
void MonMultiply (const Leg *in_a, const Leg *in_b, Leg *out)
void MonNegate (const Leg *in, Leg *out)
void MonOutput (const Leg *in, Leg *out)
void MonReduceProduct (Leg *inout_product, Leg *out)
void MonSquare (const Leg *in, Leg *out)
void MonSubtract (const Leg *in_a, const Leg *in_b, Leg *out)
void SetModulus (const Leg *mod)

Protected Attributes

Leg * CachedModulus
Leg mod_inv
Leg * TempProduct
Leg * TempProductHi

Private Attributes

int mon_regs

Static Private Attributes

static const int MON_OVERHEAD = 3 + 4

Detailed Description

Definition at line 44 of file BigMontgomery.hpp.


Constructor & Destructor Documentation

cat::BigMontgomery::BigMontgomery ( int  regs,
int  bits 
)

Member Function Documentation

void cat::BigMontgomery::CopyModulus ( Leg *  out)
const Leg* cat::BigMontgomery::GetModulus ( ) [inline]

Definition at line 62 of file BigMontgomery.hpp.

References CachedModulus.

{ return CachedModulus; }
bool cat::BigMontgomery::IsRabinMillerPrime ( IRandom prng,
const Leg *  n,
int  trials = 20 
)
void cat::BigMontgomery::MonAdd ( const Leg *  in_a,
const Leg *  in_b,
Leg *  out 
)
void cat::BigMontgomery::MonDouble ( const Leg *  in,
Leg *  out 
)
void cat::BigMontgomery::MonExpMod ( const Leg *  in_base,
const Leg *  in_exp,
Leg *  out 
)
void cat::BigMontgomery::MonInput ( const Leg *  in,
Leg *  out 
)
void cat::BigMontgomery::MonMultiply ( const Leg *  in_a,
const Leg *  in_b,
Leg *  out 
)
void cat::BigMontgomery::MonNegate ( const Leg *  in,
Leg *  out 
)
void cat::BigMontgomery::MonOutput ( const Leg *  in,
Leg *  out 
)
void cat::BigMontgomery::MonReduceProduct ( Leg *  inout_product,
Leg *  out 
)
void cat::BigMontgomery::MonSquare ( const Leg *  in,
Leg *  out 
)
void cat::BigMontgomery::MonSubtract ( const Leg *  in_a,
const Leg *  in_b,
Leg *  out 
)
void cat::BigMontgomery::SetModulus ( const Leg *  mod)

Member Data Documentation

Definition at line 52 of file BigMontgomery.hpp.

Referenced by GetModulus().

Leg cat::BigMontgomery::mod_inv [protected]

Definition at line 53 of file BigMontgomery.hpp.

const int cat::BigMontgomery::MON_OVERHEAD = 3 + 4 [static, private]

Definition at line 46 of file BigMontgomery.hpp.

Definition at line 47 of file BigMontgomery.hpp.

Definition at line 50 of file BigMontgomery.hpp.

Definition at line 51 of file BigMontgomery.hpp.


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

Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.

GNU Lesser General Public License 3 Sourceforge.net