Fabcoin Core  0.16.2
P2P Digital Currency
Classes | Macros | Typedefs | Functions
integer.cpp File Reference
#include "pch.h"
#include "config.h"
#include "integer.h"
#include "secblock.h"
#include "modarith.h"
#include "nbtheory.h"
#include "smartptr.h"
#include "algparam.h"
#include "filters.h"
#include "asn.h"
#include "oids.h"
#include "words.h"
#include "pubkey.h"
#include "sha.h"
#include "cpu.h"
#include "misc.h"
#include <iostream>
Include dependency graph for integer.cpp:

Go to the source code of this file.

Classes

class  DWord
 
struct  DWord::half_words
 
class  Word
 
struct  NewInteger< i >
 
class  KDF2_RNG
 

Macros

#define MAYBE_CONST   const
 
#define MAYBE_UNCONST_CAST
 
#define CRYPTOPP_INTEGER_SSE2   (CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE && (CRYPTOPP_BOOL_X86))
 
#define Declare2Words(x)   dword x;
 
#define MultiplyWords(p, a, b)   p = (dword)a*b;
 
#define AssignWord(a, b)   a = b;
 
#define Add2WordsBy1(a, b, c)   a = b + c;
 
#define Acc2WordsBy2(a, b)   a += b;
 
#define LowWord(a)   word(a)
 
#define HighWord(a)   word(a>>WORD_BITS)
 
#define Double3Words(c, d)   d = 2*d + (c>>(WORD_BITS-1)); c *= 2;
 
#define AddWithCarry(u, a, b)   u = dword(a) + b + GetCarry(u);
 
#define SubtractWithBorrow(u, a, b)   u = dword(a) - b - GetBorrow(u);
 
#define GetCarry(u)   HighWord(u)
 
#define GetBorrow(u)   word(u>>(WORD_BITS*2-1))
 
#define MulAcc(c, d, a, b)   MultiplyWords(p, a, b); Acc2WordsBy1(p, c); c = LowWord(p); Acc2WordsBy1(d, HighWord(p));
 
#define Acc2WordsBy1(a, b)   Add2WordsBy1(a, a, b)
 
#define Acc3WordsBy2(c, d, e)   Acc2WordsBy1(e, c); c = LowWord(e); Add2WordsBy1(e, d, HighWord(e));
 
#define AddPrologue
 
#define AddEpilogue
 
#define SaveEBX
 
#define RestoreEBX
 
#define SquPrologue
 
#define MulPrologue
 
#define TopPrologue
 
#define SquEpilogue   RestoreEBX
 
#define MulEpilogue   RestoreEBX
 
#define TopEpilogue   RestoreEBX
 
#define Mul_2
 
#define Mul_4
 
#define Mul_8
 
#define Mul_16
 
#define Squ_2
 
#define Squ_4
 
#define Squ_8
 
#define Squ_16
 
#define Bot_2
 
#define Bot_4
 
#define Bot_8
 
#define Bot_16
 
#define Mul_Begin(n)
 
#define Mul_Acc(i, j)   MulAcc(c, d, A[i], B[j])
 
#define Mul_SaveAcc(k, i, j)
 
#define Mul_End(k, i)
 
#define Bot_SaveAcc(k, i, j)
 
#define Bot_Acc(i, j)   c += A[i] * B[j];
 
#define Bot_End(n)   R[n-1] = c;
 
#define Squ_Begin(n)
 
#define Squ_NonDiag   Double3Words(c, d)
 
#define Squ_SaveAcc(k, i, j)
 
#define Squ_Acc(i, j)   MulAcc(c, d, A[i], A[j])
 
#define Squ_Diag(i)
 
#define Squ_End(n)
 
#define Top_Begin(n)
 
#define Top_Acc(i, j)
 
#define Top_SaveAcc0(i, j)
 
#define Top_SaveAcc1(i, j)
 
#define A0   A
 
#define A1   (A+N2)
 
#define B0   B
 
#define B1   (B+N2)
 
#define T0   T
 
#define T1   (T+N2)
 
#define T2   (T+N)
 
#define T3   (T+N+N2)
 
#define R0   R
 
#define R1   (R+N2)
 
#define R2   (R+N)
 
#define R3   (R+N+N2)
 
#define M0   M
 
#define M1   (M+N2)
 
#define V0   V
 
#define V1   (V+N2)
 
#define X0   X
 
#define X1   (X+N2)
 
#define X2   (X+N)
 
#define X3   (X+N+N2)
 

Typedefs

typedef int(CRYPTOPP_FASTCALLPAdd) (size_t N, word *C, const word *A, const word *B)
 
typedef void(* PMul) (word *C, const word *A, const word *B)
 
typedef void(* PSqu) (word *C, const word *A)
 
typedef void(* PMulTop) (word *C, const word *A, const word *B, word L)
 

Functions

bool AssignIntToInteger (const std::type_info &valueType, void *pInteger, const void *pInt)
 
template<class S , class D >
S DivideThreeWordsByTwo (S *A, S B0, S B1, D *dummy=NULL)
 
template<class S , class D >
DivideFourWordsByTwo (S *T, const D &Al, const D &Ah, const D &B)
 
int CRYPTOPP_FASTCALL Baseline_Add (size_t N, word *C, const word *A, const word *B)
 
int CRYPTOPP_FASTCALL Baseline_Sub (size_t N, word *C, const word *A, const word *B)
 
void Baseline_Multiply2 (word *R, const word *AA, const word *BB)
 
void Baseline_Multiply4 (word *R, const word *AA, const word *BB)
 
void Baseline_Multiply8 (word *R, const word *AA, const word *BB)
 
void Baseline_Square2 (word *R, const word *AA)
 
void Baseline_Square4 (word *R, const word *AA)
 
void Baseline_Square8 (word *R, const word *AA)
 
void Baseline_MultiplyBottom2 (word *R, const word *AA, const word *BB)
 
void Baseline_MultiplyBottom4 (word *R, const word *AA, const word *BB)
 
void Baseline_MultiplyBottom8 (word *R, const word *AA, const word *BB)
 
void Baseline_MultiplyTop2 (word *R, const word *A, const word *B, word L)
 
void Baseline_MultiplyTop4 (word *R, const word *AA, const word *BB, word L)
 
void Baseline_MultiplyTop8 (word *R, const word *AA, const word *BB, word L)
 
void Baseline_Multiply16 (word *R, const word *AA, const word *BB)
 
void Baseline_Square16 (word *R, const word *AA)
 
void Baseline_MultiplyBottom16 (word *R, const word *AA, const word *BB)
 
void Baseline_MultiplyTop16 (word *R, const word *AA, const word *BB, word L)
 
int Add (word *C, const word *A, const word *B, size_t N)
 
int Subtract (word *C, const word *A, const word *B, size_t N)
 
void RecursiveMultiply (word *R, word *T, const word *A, const word *B, size_t N)
 
void RecursiveSquare (word *R, word *T, const word *A, size_t N)
 
void RecursiveMultiplyBottom (word *R, word *T, const word *A, const word *B, size_t N)
 
void MultiplyTop (word *R, word *T, const word *L, const word *A, const word *B, size_t N)
 
void Multiply (word *R, word *T, const word *A, const word *B, size_t N)
 
void Square (word *R, word *T, const word *A, size_t N)
 
void MultiplyBottom (word *R, word *T, const word *A, const word *B, size_t N)
 
void AsymmetricMultiply (word *R, word *T, const word *A, size_t NA, const word *B, size_t NB)
 
void RecursiveInverseModPower2 (word *R, word *T, const word *A, size_t N)
 
void MontgomeryReduce (word *R, word *T, word *X, const word *M, const word *U, size_t N)
 
void HalfMontgomeryReduce (word *R, word *T, const word *X, const word *M, const word *U, const word *V, size_t N)
 
void Divide (word *R, word *Q, word *T, const word *A, size_t NA, const word *B, size_t NB)
 
unsigned int AlmostInverse (word *R, word *T, const word *A, size_t NA, const word *M, size_t N)
 
void DivideByPower2Mod (word *R, const word *A, size_t k, const word *M, size_t N)
 
void MultiplyByPower2Mod (word *R, const word *A, size_t k, const word *M, size_t N)
 
std::istream & operator>> (std::istream &in, Integer &a)
 
std::ostream & operator<< (std::ostream &out, const Integer &a)
 
void PositiveAdd (Integer &sum, const Integer &a, const Integer &b)
 
void PositiveSubtract (Integer &diff, const Integer &a, const Integer &b)
 
template<class T >
const TSTDMAX2 (const T &a, const T &b)
 
void PositiveMultiply (Integer &product, const Integer &a, const Integer &b)
 
void Multiply (Integer &product, const Integer &a, const Integer &b)
 
void PositiveDivide (Integer &remainder, Integer &quotient, const Integer &a, const Integer &b)
 
Integer a_times_b_mod_c (const Integer &x, const Integer &y, const Integer &m)
 
Integer a_exp_b_mod_c (const Integer &x, const Integer &e, const Integer &m)
 
template<>
CRYPTOPP_DLL std::string IntToString< Integer > (Integer value, unsigned int base)
 Converts an Integer to a string. More...
 
template<>
CRYPTOPP_DLL std::string IntToString< word64 > (word64 value, unsigned int base)
 Converts an unsigned value to a string. More...
 

Macro Definition Documentation

#define A0   A

Definition at line 2164 of file integer.cpp.

#define A1   (A+N2)

Definition at line 2165 of file integer.cpp.

#define Acc2WordsBy1 (   a,
  b 
)    Add2WordsBy1(a, a, b)

Definition at line 200 of file integer.cpp.

#define Acc2WordsBy2 (   a,
  b 
)    a += b;

Definition at line 187 of file integer.cpp.

#define Acc3WordsBy2 (   c,
  d,
  e 
)    Acc2WordsBy1(e, c); c = LowWord(e); Add2WordsBy1(e, d, HighWord(e));

Definition at line 203 of file integer.cpp.

#define Add2WordsBy1 (   a,
  b,
  c 
)    a = b + c;

Definition at line 186 of file integer.cpp.

#define AddEpilogue
Value:
__asm pop esi \
__asm pop edi \
__asm ret 8

Definition at line 562 of file integer.cpp.

#define AddPrologue
Value:
__asm push edi \
__asm push esi \
__asm mov eax, [esp+12] \
__asm mov edi, [esp+16]

Definition at line 557 of file integer.cpp.

#define AddWithCarry (   u,
  a,
  b 
)    u = dword(a) + b + GetCarry(u);

Definition at line 191 of file integer.cpp.

#define AssignWord (   a,
  b 
)    a = b;

Definition at line 185 of file integer.cpp.

#define B0   B

Definition at line 2166 of file integer.cpp.

#define B1   (B+N2)

Definition at line 2167 of file integer.cpp.

#define Bot_16
Value:
Mul_SaveAcc(0, 0, 1) Mul_Acc(1, 0) \
Mul_SaveAcc(1, 0, 2) Mul_Acc(1, 1) Mul_Acc(2, 0) \
Mul_SaveAcc(2, 0, 3) Mul_Acc(1, 2) Mul_Acc(2, 1) Mul_Acc(3, 0) \
Mul_SaveAcc(3, 0, 4) Mul_Acc(1, 3) Mul_Acc(2, 2) Mul_Acc(3, 1) Mul_Acc(4, 0) \
Mul_SaveAcc(4, 0, 5) Mul_Acc(1, 4) Mul_Acc(2, 3) Mul_Acc(3, 2) Mul_Acc(4, 1) Mul_Acc(5, 0) \
Mul_SaveAcc(5, 0, 6) Mul_Acc(1, 5) Mul_Acc(2, 4) Mul_Acc(3, 3) Mul_Acc(4, 2) Mul_Acc(5, 1) Mul_Acc(6, 0) \
Mul_SaveAcc(6, 0, 7) Mul_Acc(1, 6) Mul_Acc(2, 5) Mul_Acc(3, 4) Mul_Acc(4, 3) Mul_Acc(5, 2) Mul_Acc(6, 1) Mul_Acc(7, 0) \
Mul_SaveAcc(7, 0, 8) Mul_Acc(1, 7) Mul_Acc(2, 6) Mul_Acc(3, 5) Mul_Acc(4, 4) Mul_Acc(5, 3) Mul_Acc(6, 2) Mul_Acc(7, 1) Mul_Acc(8, 0) \
Mul_SaveAcc(8, 0, 9) Mul_Acc(1, 8) Mul_Acc(2, 7) Mul_Acc(3, 6) Mul_Acc(4, 5) Mul_Acc(5, 4) Mul_Acc(6, 3) Mul_Acc(7, 2) Mul_Acc(8, 1) Mul_Acc(9, 0) \
Mul_SaveAcc(9, 0, 10) Mul_Acc(1, 9) Mul_Acc(2, 8) Mul_Acc(3, 7) Mul_Acc(4, 6) Mul_Acc(5, 5) Mul_Acc(6, 4) Mul_Acc(7, 3) Mul_Acc(8, 2) Mul_Acc(9, 1) Mul_Acc(10, 0) \
Mul_SaveAcc(10, 0, 11) Mul_Acc(1, 10) Mul_Acc(2, 9) Mul_Acc(3, 8) Mul_Acc(4, 7) Mul_Acc(5, 6) Mul_Acc(6, 5) Mul_Acc(7, 4) Mul_Acc(8, 3) Mul_Acc(9, 2) Mul_Acc(10, 1) Mul_Acc(11, 0) \
Mul_SaveAcc(11, 0, 12) Mul_Acc(1, 11) Mul_Acc(2, 10) Mul_Acc(3, 9) Mul_Acc(4, 8) Mul_Acc(5, 7) Mul_Acc(6, 6) Mul_Acc(7, 5) Mul_Acc(8, 4) Mul_Acc(9, 3) Mul_Acc(10, 2) Mul_Acc(11, 1) Mul_Acc(12, 0) \
Mul_SaveAcc(12, 0, 13) Mul_Acc(1, 12) Mul_Acc(2, 11) Mul_Acc(3, 10) Mul_Acc(4, 9) Mul_Acc(5, 8) Mul_Acc(6, 7) Mul_Acc(7, 6) Mul_Acc(8, 5) Mul_Acc(9, 4) Mul_Acc(10, 3) Mul_Acc(11, 2) Mul_Acc(12, 1) Mul_Acc(13, 0) \
Mul_SaveAcc(13, 0, 14) Mul_Acc(1, 13) Mul_Acc(2, 12) Mul_Acc(3, 11) Mul_Acc(4, 10) Mul_Acc(5, 9) Mul_Acc(6, 8) Mul_Acc(7, 7) Mul_Acc(8, 6) Mul_Acc(9, 5) Mul_Acc(10, 4) Mul_Acc(11, 3) Mul_Acc(12, 2) Mul_Acc(13, 1) Mul_Acc(14, 0) \
Bot_SaveAcc(14, 0, 15) Bot_Acc(1, 14) Bot_Acc(2, 13) Bot_Acc(3, 12) Bot_Acc(4, 11) Bot_Acc(5, 10) Bot_Acc(6, 9) Bot_Acc(7, 8) Bot_Acc(8, 7) Bot_Acc(9, 6) Bot_Acc(10, 5) Bot_Acc(11, 4) Bot_Acc(12, 3) Bot_Acc(13, 2) Bot_Acc(14, 1) Bot_Acc(15, 0) \
Bot_End(16)
#define Mul_Acc(i, j)
Definition: integer.cpp:1126
#define Mul_SaveAcc(k, i, j)
Definition: integer.cpp:1129
#define Bot_Acc(i, j)
Definition: integer.cpp:1147
#define Bot_End(n)
Definition: integer.cpp:1150
#define Mul_Begin(n)
Definition: integer.cpp:1118
#define Bot_SaveAcc(k, i, j)
Definition: integer.cpp:1142

Definition at line 1057 of file integer.cpp.

#define Bot_2
Value:
Bot_SaveAcc(0, 0, 1) Bot_Acc(1, 0) \
#define Bot_Acc(i, j)
Definition: integer.cpp:1147
#define Bot_End(n)
Definition: integer.cpp:1150
#define Mul_Begin(n)
Definition: integer.cpp:1118
#define Bot_SaveAcc(k, i, j)
Definition: integer.cpp:1142

Definition at line 1034 of file integer.cpp.

#define Bot_4
Value:
Mul_SaveAcc(0, 0, 1) Mul_Acc(1, 0) \
Mul_SaveAcc(1, 2, 0) Mul_Acc(1, 1) Mul_Acc(0, 2) \
Bot_SaveAcc(2, 0, 3) Bot_Acc(1, 2) Bot_Acc(2, 1) Bot_Acc(3, 0) \
#define Mul_Acc(i, j)
Definition: integer.cpp:1126
#define Mul_SaveAcc(k, i, j)
Definition: integer.cpp:1129
#define Bot_Acc(i, j)
Definition: integer.cpp:1147
#define Bot_End(n)
Definition: integer.cpp:1150
#define Mul_Begin(n)
Definition: integer.cpp:1118
#define Bot_SaveAcc(k, i, j)
Definition: integer.cpp:1142

Definition at line 1039 of file integer.cpp.

#define Bot_8
Value:
Mul_SaveAcc(0, 0, 1) Mul_Acc(1, 0) \
Mul_SaveAcc(1, 0, 2) Mul_Acc(1, 1) Mul_Acc(2, 0) \
Mul_SaveAcc(2, 0, 3) Mul_Acc(1, 2) Mul_Acc(2, 1) Mul_Acc(3, 0) \
Mul_SaveAcc(3, 0, 4) Mul_Acc(1, 3) Mul_Acc(2, 2) Mul_Acc(3, 1) Mul_Acc(4, 0) \
Mul_SaveAcc(4, 0, 5) Mul_Acc(1, 4) Mul_Acc(2, 3) Mul_Acc(3, 2) Mul_Acc(4, 1) Mul_Acc(5, 0) \
Mul_SaveAcc(5, 0, 6) Mul_Acc(1, 5) Mul_Acc(2, 4) Mul_Acc(3, 3) Mul_Acc(4, 2) Mul_Acc(5, 1) Mul_Acc(6, 0) \
Bot_SaveAcc(6, 0, 7) Bot_Acc(1, 6) Bot_Acc(2, 5) Bot_Acc(3, 4) Bot_Acc(4, 3) Bot_Acc(5, 2) Bot_Acc(6, 1) Bot_Acc(7, 0) \
#define Mul_Acc(i, j)
Definition: integer.cpp:1126
#define Mul_SaveAcc(k, i, j)
Definition: integer.cpp:1129
#define Bot_Acc(i, j)
Definition: integer.cpp:1147
#define Bot_End(n)
Definition: integer.cpp:1150
#define Mul_Begin(n)
Definition: integer.cpp:1118
#define Bot_SaveAcc(k, i, j)
Definition: integer.cpp:1142

Definition at line 1046 of file integer.cpp.

#define Bot_Acc (   i,
 
)    c += A[i] * B[j];

Definition at line 1147 of file integer.cpp.

#define Bot_End (   n)    R[n-1] = c;

Definition at line 1150 of file integer.cpp.

#define Bot_SaveAcc (   k,
  i,
 
)
Value:
R[k] = c; \
c += A[i] * B[j];
#define R(a, b)
#define c(i)
#define LowWord(a)
Definition: integer.cpp:188
#define d(i)
Definition: sha.cpp:732

Definition at line 1142 of file integer.cpp.

#define CRYPTOPP_INTEGER_SSE2   (CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE && (CRYPTOPP_BOOL_X86))

Definition at line 69 of file integer.cpp.

#define Declare2Words (   x)    dword x;

Definition at line 179 of file integer.cpp.

#define Double3Words (   c,
  d 
)    d = 2*d + (c>>(WORD_BITS-1)); c *= 2;

Definition at line 190 of file integer.cpp.

#define GetBorrow (   u)    word(u>>(WORD_BITS*2-1))

Definition at line 194 of file integer.cpp.

#define GetCarry (   u)    HighWord(u)

Definition at line 193 of file integer.cpp.

#define HighWord (   a)    word(a>>WORD_BITS)

Definition at line 189 of file integer.cpp.

#define LowWord (   a)    word(a)

Definition at line 188 of file integer.cpp.

#define M0   M
#define M1   (M+N2)
#define MAYBE_CONST   const

Definition at line 54 of file integer.cpp.

#define MAYBE_UNCONST_CAST

Definition at line 55 of file integer.cpp.

#define Mul_16

Definition at line 941 of file integer.cpp.

#define Mul_2
Value:
Mul_SaveAcc(0, 0, 1) Mul_Acc(1, 0) \
Mul_End(1, 1)
#define Mul_End(k, i)
Definition: integer.cpp:1135
#define Mul_Acc(i, j)
Definition: integer.cpp:1126
#define Mul_SaveAcc(k, i, j)
Definition: integer.cpp:1129
#define Mul_Begin(n)
Definition: integer.cpp:1118

Definition at line 910 of file integer.cpp.

#define Mul_4
Value:
Mul_SaveAcc(0, 0, 1) Mul_Acc(1, 0) \
Mul_SaveAcc(1, 0, 2) Mul_Acc(1, 1) Mul_Acc(2, 0) \
Mul_SaveAcc(2, 0, 3) Mul_Acc(1, 2) Mul_Acc(2, 1) Mul_Acc(3, 0) \
Mul_SaveAcc(3, 1, 3) Mul_Acc(2, 2) Mul_Acc(3, 1) \
Mul_SaveAcc(4, 2, 3) Mul_Acc(3, 2) \
Mul_End(5, 3)
#define Mul_End(k, i)
Definition: integer.cpp:1135
#define Mul_Acc(i, j)
Definition: integer.cpp:1126
#define Mul_SaveAcc(k, i, j)
Definition: integer.cpp:1129
#define Mul_Begin(n)
Definition: integer.cpp:1118

Definition at line 915 of file integer.cpp.

#define Mul_8
Value:
Mul_SaveAcc(0, 0, 1) Mul_Acc(1, 0) \
Mul_SaveAcc(1, 0, 2) Mul_Acc(1, 1) Mul_Acc(2, 0) \
Mul_SaveAcc(2, 0, 3) Mul_Acc(1, 2) Mul_Acc(2, 1) Mul_Acc(3, 0) \
Mul_SaveAcc(3, 0, 4) Mul_Acc(1, 3) Mul_Acc(2, 2) Mul_Acc(3, 1) Mul_Acc(4, 0) \
Mul_SaveAcc(4, 0, 5) Mul_Acc(1, 4) Mul_Acc(2, 3) Mul_Acc(3, 2) Mul_Acc(4, 1) Mul_Acc(5, 0) \
Mul_SaveAcc(5, 0, 6) Mul_Acc(1, 5) Mul_Acc(2, 4) Mul_Acc(3, 3) Mul_Acc(4, 2) Mul_Acc(5, 1) Mul_Acc(6, 0) \
Mul_SaveAcc(6, 0, 7) Mul_Acc(1, 6) Mul_Acc(2, 5) Mul_Acc(3, 4) Mul_Acc(4, 3) Mul_Acc(5, 2) Mul_Acc(6, 1) Mul_Acc(7, 0) \
Mul_SaveAcc(7, 1, 7) Mul_Acc(2, 6) Mul_Acc(3, 5) Mul_Acc(4, 4) Mul_Acc(5, 3) Mul_Acc(6, 2) Mul_Acc(7, 1) \
Mul_SaveAcc(8, 2, 7) Mul_Acc(3, 6) Mul_Acc(4, 5) Mul_Acc(5, 4) Mul_Acc(6, 3) Mul_Acc(7, 2) \
Mul_SaveAcc(9, 3, 7) Mul_Acc(4, 6) Mul_Acc(5, 5) Mul_Acc(6, 4) Mul_Acc(7, 3) \
Mul_SaveAcc(10, 4, 7) Mul_Acc(5, 6) Mul_Acc(6, 5) Mul_Acc(7, 4) \
Mul_SaveAcc(11, 5, 7) Mul_Acc(6, 6) Mul_Acc(7, 5) \
Mul_SaveAcc(12, 6, 7) Mul_Acc(7, 6) \
Mul_End(13, 7)
#define Mul_End(k, i)
Definition: integer.cpp:1135
#define Mul_Acc(i, j)
Definition: integer.cpp:1126
#define Mul_SaveAcc(k, i, j)
Definition: integer.cpp:1129
#define Mul_Begin(n)
Definition: integer.cpp:1118

Definition at line 924 of file integer.cpp.

#define Mul_Acc (   i,
 
)    MulAcc(c, d, A[i], B[j])

Definition at line 1126 of file integer.cpp.

#define Mul_Begin (   n)
Value:
MultiplyWords(p, A[0], B[0]) \
c = LowWord(p); \
#define Declare2Words(x)
Definition: integer.cpp:179
#define c(i)
#define HighWord(a)
Definition: integer.cpp:189
#define AssignWord(a, b)
Definition: integer.cpp:185
#define LowWord(a)
Definition: integer.cpp:188
#define MultiplyWords(p, a, b)
Definition: integer.cpp:183
#define d(i)
Definition: sha.cpp:732
word32 word
Definition: config.h:308

Definition at line 1118 of file integer.cpp.

#define Mul_End (   k,
 
)
Value:
R[k] = c; \
MultiplyWords(p, A[i], B[i]) \
R[k+1] = LowWord(p); \
R[k+2] = HighWord(p);
#define R(a, b)
#define c(i)
#define HighWord(a)
Definition: integer.cpp:189
#define LowWord(a)
Definition: integer.cpp:188
#define MultiplyWords(p, a, b)
Definition: integer.cpp:183
#define d(i)
Definition: sha.cpp:732
#define Acc2WordsBy2(a, b)
Definition: integer.cpp:187

Definition at line 1135 of file integer.cpp.

#define Mul_SaveAcc (   k,
  i,
 
)
Value:
R[k] = c; \
MulAcc(c, d, A[i], B[j])
#define MulAcc(c, d, a, b)
Definition: integer.cpp:197
#define R(a, b)
#define c(i)
#define HighWord(a)
Definition: integer.cpp:189
#define AssignWord(a, b)
Definition: integer.cpp:185
#define LowWord(a)
Definition: integer.cpp:188
#define d(i)
Definition: sha.cpp:732

Definition at line 1129 of file integer.cpp.

#define MulAcc (   c,
  d,
  a,
  b 
)    MultiplyWords(p, a, b); Acc2WordsBy1(p, c); c = LowWord(p); Acc2WordsBy1(d, HighWord(p));

Definition at line 197 of file integer.cpp.

#define MulEpilogue   RestoreEBX

Definition at line 587 of file integer.cpp.

#define MulPrologue
Value:
AS2( mov eax, A) \
AS2( mov edi, B) \
AS2( mov ecx, C) \
SaveEBX \
AS2( lea ebx, s_maskLow16)

Definition at line 573 of file integer.cpp.

#define MultiplyWords (   p,
  a,
  b 
)    p = (dword)a*b;

Definition at line 183 of file integer.cpp.

#define R0   R

Definition at line 2174 of file integer.cpp.

#define R1   (R+N2)

Definition at line 2175 of file integer.cpp.

#define R2   (R+N)

Definition at line 2176 of file integer.cpp.

#define R3   (R+N+N2)

Definition at line 2177 of file integer.cpp.

#define RestoreEBX

Definition at line 567 of file integer.cpp.

#define SaveEBX

Definition at line 566 of file integer.cpp.

#define Squ_16
Value:
Squ_SaveAcc(1, 0, 2) Squ_Diag(1) \
Squ_SaveAcc(2, 0, 3) Squ_Acc(1, 2) Squ_NonDiag \
Squ_SaveAcc(3, 0, 4) Squ_Acc(1, 3) Squ_Diag(2) \
Squ_SaveAcc(4, 0, 5) Squ_Acc(1, 4) Squ_Acc(2, 3) Squ_NonDiag \
Squ_SaveAcc(5, 0, 6) Squ_Acc(1, 5) Squ_Acc(2, 4) Squ_Diag(3) \
Squ_SaveAcc(6, 0, 7) Squ_Acc(1, 6) Squ_Acc(2, 5) Squ_Acc(3, 4) Squ_NonDiag \
Squ_SaveAcc(7, 0, 8) Squ_Acc(1, 7) Squ_Acc(2, 6) Squ_Acc(3, 5) Squ_Diag(4) \
Squ_SaveAcc(8, 0, 9) Squ_Acc(1, 8) Squ_Acc(2, 7) Squ_Acc(3, 6) Squ_Acc(4, 5) Squ_NonDiag \
Squ_SaveAcc(9, 0, 10) Squ_Acc(1, 9) Squ_Acc(2, 8) Squ_Acc(3, 7) Squ_Acc(4, 6) Squ_Diag(5) \
Squ_SaveAcc(10, 0, 11) Squ_Acc(1, 10) Squ_Acc(2, 9) Squ_Acc(3, 8) Squ_Acc(4, 7) Squ_Acc(5, 6) Squ_NonDiag \
Squ_SaveAcc(11, 0, 12) Squ_Acc(1, 11) Squ_Acc(2, 10) Squ_Acc(3, 9) Squ_Acc(4, 8) Squ_Acc(5, 7) Squ_Diag(6) \
Squ_SaveAcc(12, 0, 13) Squ_Acc(1, 12) Squ_Acc(2, 11) Squ_Acc(3, 10) Squ_Acc(4, 9) Squ_Acc(5, 8) Squ_Acc(6, 7) Squ_NonDiag \
Squ_SaveAcc(13, 0, 14) Squ_Acc(1, 13) Squ_Acc(2, 12) Squ_Acc(3, 11) Squ_Acc(4, 10) Squ_Acc(5, 9) Squ_Acc(6, 8) Squ_Diag(7) \
Squ_SaveAcc(14, 0, 15) Squ_Acc(1, 14) Squ_Acc(2, 13) Squ_Acc(3, 12) Squ_Acc(4, 11) Squ_Acc(5, 10) Squ_Acc(6, 9) Squ_Acc(7, 8) Squ_NonDiag \
Squ_SaveAcc(15, 1, 15) Squ_Acc(2, 14) Squ_Acc(3, 13) Squ_Acc(4, 12) Squ_Acc(5, 11) Squ_Acc(6, 10) Squ_Acc(7, 9) Squ_Diag(8) \
Squ_SaveAcc(16, 2, 15) Squ_Acc(3, 14) Squ_Acc(4, 13) Squ_Acc(5, 12) Squ_Acc(6, 11) Squ_Acc(7, 10) Squ_Acc(8, 9) Squ_NonDiag \
Squ_SaveAcc(17, 3, 15) Squ_Acc(4, 14) Squ_Acc(5, 13) Squ_Acc(6, 12) Squ_Acc(7, 11) Squ_Acc(8, 10) Squ_Diag(9) \
Squ_SaveAcc(18, 4, 15) Squ_Acc(5, 14) Squ_Acc(6, 13) Squ_Acc(7, 12) Squ_Acc(8, 11) Squ_Acc(9, 10) Squ_NonDiag \
Squ_SaveAcc(19, 5, 15) Squ_Acc(6, 14) Squ_Acc(7, 13) Squ_Acc(8, 12) Squ_Acc(9, 11) Squ_Diag(10) \
Squ_SaveAcc(20, 6, 15) Squ_Acc(7, 14) Squ_Acc(8, 13) Squ_Acc(9, 12) Squ_Acc(10, 11) Squ_NonDiag \
Squ_SaveAcc(21, 7, 15) Squ_Acc(8, 14) Squ_Acc(9, 13) Squ_Acc(10, 12) Squ_Diag(11) \
Squ_SaveAcc(22, 8, 15) Squ_Acc(9, 14) Squ_Acc(10, 13) Squ_Acc(11, 12) Squ_NonDiag \
Squ_SaveAcc(23, 9, 15) Squ_Acc(10, 14) Squ_Acc(11, 13) Squ_Diag(12) \
Squ_SaveAcc(24, 10, 15) Squ_Acc(11, 14) Squ_Acc(12, 13) Squ_NonDiag \
Squ_SaveAcc(25, 11, 15) Squ_Acc(12, 14) Squ_Diag(13) \
Squ_SaveAcc(26, 12, 15) Squ_Acc(13, 14) Squ_NonDiag \
Squ_SaveAcc(27, 13, 15) Squ_Diag(14) \
Squ_SaveAcc(28, 14, 15) Squ_NonDiag \
Squ_End(16)
#define Squ_Diag(i)
Definition: integer.cpp:1180
#define Squ_End(n)
Definition: integer.cpp:1184
#define Squ_NonDiag
Definition: integer.cpp:1167
#define Squ_Begin(n)
Definition: integer.cpp:1154
#define Squ_SaveAcc(k, i, j)
Definition: integer.cpp:1170
#define Squ_Acc(i, j)
Definition: integer.cpp:1177

Definition at line 1002 of file integer.cpp.

#define Squ_2
Value:
#define Squ_End(n)
Definition: integer.cpp:1184
#define Squ_Begin(n)
Definition: integer.cpp:1154

Definition at line 974 of file integer.cpp.

#define Squ_4
Value:
Squ_SaveAcc(1, 0, 2) Squ_Diag(1) \
Squ_SaveAcc(2, 0, 3) Squ_Acc(1, 2) Squ_NonDiag \
Squ_SaveAcc(3, 1, 3) Squ_Diag(2) \
Squ_SaveAcc(4, 2, 3) Squ_NonDiag \
#define Squ_Diag(i)
Definition: integer.cpp:1180
#define Squ_End(n)
Definition: integer.cpp:1184
#define Squ_NonDiag
Definition: integer.cpp:1167
#define Squ_Begin(n)
Definition: integer.cpp:1154
#define Squ_SaveAcc(k, i, j)
Definition: integer.cpp:1170
#define Squ_Acc(i, j)
Definition: integer.cpp:1177

Definition at line 978 of file integer.cpp.

#define Squ_8
Value:
Squ_SaveAcc(1, 0, 2) Squ_Diag(1) \
Squ_SaveAcc(2, 0, 3) Squ_Acc(1, 2) Squ_NonDiag \
Squ_SaveAcc(3, 0, 4) Squ_Acc(1, 3) Squ_Diag(2) \
Squ_SaveAcc(4, 0, 5) Squ_Acc(1, 4) Squ_Acc(2, 3) Squ_NonDiag \
Squ_SaveAcc(5, 0, 6) Squ_Acc(1, 5) Squ_Acc(2, 4) Squ_Diag(3) \
Squ_SaveAcc(6, 0, 7) Squ_Acc(1, 6) Squ_Acc(2, 5) Squ_Acc(3, 4) Squ_NonDiag \
Squ_SaveAcc(7, 1, 7) Squ_Acc(2, 6) Squ_Acc(3, 5) Squ_Diag(4) \
Squ_SaveAcc(8, 2, 7) Squ_Acc(3, 6) Squ_Acc(4, 5) Squ_NonDiag \
Squ_SaveAcc(9, 3, 7) Squ_Acc(4, 6) Squ_Diag(5) \
Squ_SaveAcc(10, 4, 7) Squ_Acc(5, 6) Squ_NonDiag \
Squ_SaveAcc(11, 5, 7) Squ_Diag(6) \
Squ_SaveAcc(12, 6, 7) Squ_NonDiag \
#define Squ_Diag(i)
Definition: integer.cpp:1180
#define Squ_End(n)
Definition: integer.cpp:1184
#define Squ_NonDiag
Definition: integer.cpp:1167
#define Squ_Begin(n)
Definition: integer.cpp:1154
#define Squ_SaveAcc(k, i, j)
Definition: integer.cpp:1170
#define Squ_Acc(i, j)
Definition: integer.cpp:1177

Definition at line 986 of file integer.cpp.

#define Squ_Acc (   i,
 
)    MulAcc(c, d, A[i], A[j])

Definition at line 1177 of file integer.cpp.

#define Squ_Begin (   n)
Value:
MultiplyWords(p, A[0], A[0]) \
R[0] = LowWord(p); \
MultiplyWords(p, A[0], A[1]) \
c = LowWord(p); \
#define Declare2Words(x)
Definition: integer.cpp:179
#define R(a, b)
#define c(i)
#define Squ_NonDiag
Definition: integer.cpp:1167
#define HighWord(a)
Definition: integer.cpp:189
#define AssignWord(a, b)
Definition: integer.cpp:185
#define LowWord(a)
Definition: integer.cpp:188
#define e(i)
Definition: sha.cpp:733
#define MultiplyWords(p, a, b)
Definition: integer.cpp:183
#define d(i)
Definition: sha.cpp:732
word32 word
Definition: config.h:308

Definition at line 1154 of file integer.cpp.

#define Squ_Diag (   i)
Value:
MulAcc(c, d, A[i], A[i])
#define MulAcc(c, d, a, b)
Definition: integer.cpp:197
#define c(i)
#define d(i)
Definition: sha.cpp:732

Definition at line 1180 of file integer.cpp.

#define Squ_End (   n)
Value:
R[2*n-3] = c; \
MultiplyWords(p, A[n-1], A[n-1])\
R[2*n-2] = LowWord(p); \
R[2*n-1] = HighWord(p);
#define R(a, b)
#define c(i)
#define HighWord(a)
Definition: integer.cpp:189
#define LowWord(a)
Definition: integer.cpp:188
#define Acc3WordsBy2(c, d, e)
Definition: integer.cpp:203
#define e(i)
Definition: sha.cpp:733
#define MultiplyWords(p, a, b)
Definition: integer.cpp:183
#define d(i)
Definition: sha.cpp:732
#define Acc2WordsBy2(a, b)
Definition: integer.cpp:187

Definition at line 1184 of file integer.cpp.

#define Squ_NonDiag   Double3Words(c, d)

Definition at line 1167 of file integer.cpp.

#define Squ_SaveAcc (   k,
  i,
 
)
Value:
R[k] = c; \
MultiplyWords(p, A[i], A[j]) \
c = LowWord(p); \
#define R(a, b)
#define c(i)
#define HighWord(a)
Definition: integer.cpp:189
#define AssignWord(a, b)
Definition: integer.cpp:185
#define LowWord(a)
Definition: integer.cpp:188
#define Acc3WordsBy2(c, d, e)
Definition: integer.cpp:203
#define e(i)
Definition: sha.cpp:733
#define MultiplyWords(p, a, b)
Definition: integer.cpp:183
#define d(i)
Definition: sha.cpp:732

Definition at line 1170 of file integer.cpp.

#define SquEpilogue   RestoreEBX

Definition at line 586 of file integer.cpp.

#define SquPrologue
Value:
AS2( mov eax, A) \
AS2( mov ecx, C) \
SaveEBX \
AS2( lea ebx, s_maskLow16)

Definition at line 568 of file integer.cpp.

#define SubtractWithBorrow (   u,
  a,
  b 
)    u = dword(a) - b - GetBorrow(u);

Definition at line 192 of file integer.cpp.

#define T0   T

Definition at line 2169 of file integer.cpp.

#define T1   (T+N2)

Definition at line 2170 of file integer.cpp.

#define T2   (T+N)

Definition at line 2171 of file integer.cpp.

#define T3   (T+N+N2)

Definition at line 2172 of file integer.cpp.

#define Top_Acc (   i,
 
)
Value:
MultiplyWords(p, A[i], B[j]);\
#define Acc2WordsBy1(a, b)
Definition: integer.cpp:200
#define HighWord(a)
Definition: integer.cpp:189
#define MultiplyWords(p, a, b)
Definition: integer.cpp:183
#define d(i)
Definition: sha.cpp:732

Definition at line 1278 of file integer.cpp.

#define Top_Begin (   n)
Value:
MultiplyWords(p, A[0], B[n-2]);\
#define Declare2Words(x)
Definition: integer.cpp:179
#define c(i)
#define HighWord(a)
Definition: integer.cpp:189
#define AssignWord(a, b)
Definition: integer.cpp:185
#define MultiplyWords(p, a, b)
Definition: integer.cpp:183
#define d(i)
Definition: sha.cpp:732
word32 word
Definition: config.h:308

Definition at line 1271 of file integer.cpp.

#define Top_SaveAcc0 (   i,
 
)
Value:
c = LowWord(d); \
MulAcc(c, d, A[i], B[j])
#define MulAcc(c, d, a, b)
Definition: integer.cpp:197
#define c(i)
#define HighWord(a)
Definition: integer.cpp:189
#define AssignWord(a, b)
Definition: integer.cpp:185
#define LowWord(a)
Definition: integer.cpp:188
#define d(i)
Definition: sha.cpp:732

Definition at line 1282 of file integer.cpp.

#define Top_SaveAcc1 (   i,
 
)
Value:
c = L<c; \
MulAcc(c, d, A[i], B[j])
#define MulAcc(c, d, a, b)
Definition: integer.cpp:197
#define c(i)
#define Acc2WordsBy1(a, b)
Definition: integer.cpp:200
#define HighWord(a)
Definition: integer.cpp:189
#define AssignWord(a, b)
Definition: integer.cpp:185
#define LowWord(a)
Definition: integer.cpp:188
#define d(i)
Definition: sha.cpp:732

Definition at line 1287 of file integer.cpp.

#define TopEpilogue   RestoreEBX

Definition at line 588 of file integer.cpp.

#define TopPrologue
Value:
AS2( mov eax, A) \
AS2( mov edi, B) \
AS2( mov ecx, C) \
AS2( mov esi, L) \
SaveEBX \
AS2( lea ebx, s_maskLow16)

Definition at line 579 of file integer.cpp.

#define V0   V
#define V1   (V+N2)
#define X0   X
#define X1   (X+N2)
#define X2   (X+N)
#define X3   (X+N+N2)

Typedef Documentation

typedef int(CRYPTOPP_FASTCALL * PAdd) (size_t N, word *C, const word *A, const word *B)

Definition at line 2066 of file integer.cpp.

typedef void(* PMul) (word *C, const word *A, const word *B)

Definition at line 2067 of file integer.cpp.

typedef void(* PMulTop) (word *C, const word *A, const word *B, word L)

Definition at line 2069 of file integer.cpp.

typedef void(* PSqu) (word *C, const word *A)

Definition at line 2068 of file integer.cpp.

Function Documentation

Integer a_exp_b_mod_c ( const Integer x,
const Integer e,
const Integer m 
)

Definition at line 4359 of file integer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Integer a_times_b_mod_c ( const Integer x,
const Integer y,
const Integer m 
)

Definition at line 4354 of file integer.cpp.

Here is the caller graph for this function:

int Add ( word C,
const word A,
const word B,
size_t  N 
)
inline

Definition at line 2143 of file integer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int AlmostInverse ( word R,
word T,
const word A,
size_t  NA,
const word M,
size_t  N 
)

Definition at line 2760 of file integer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool AssignIntToInteger ( const std::type_info &  valueType,
void *  pInteger,
const void *  pInt 
)

Definition at line 74 of file integer.cpp.

Here is the caller graph for this function:

void AsymmetricMultiply ( word R,
word T,
const word A,
size_t  NA,
const word B,
size_t  NB 
)

Definition at line 2344 of file integer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int CRYPTOPP_FASTCALL Baseline_Add ( size_t  N,
word C,
const word A,
const word B 
)

Definition at line 858 of file integer.cpp.

Here is the caller graph for this function:

void Baseline_Multiply16 ( word R,
const word AA,
const word BB 
)

Definition at line 1336 of file integer.cpp.

void Baseline_Multiply2 ( word R,
const word AA,
const word BB 
)

Definition at line 1193 of file integer.cpp.

Here is the caller graph for this function:

void Baseline_Multiply4 ( word R,
const word AA,
const word BB 
)

Definition at line 1202 of file integer.cpp.

void Baseline_Multiply8 ( word R,
const word AA,
const word BB 
)

Definition at line 1211 of file integer.cpp.

void Baseline_MultiplyBottom16 ( word R,
const word AA,
const word BB 
)

Definition at line 1353 of file integer.cpp.

void Baseline_MultiplyBottom2 ( word R,
const word AA,
const word BB 
)

Definition at line 1244 of file integer.cpp.

void Baseline_MultiplyBottom4 ( word R,
const word AA,
const word BB 
)

Definition at line 1253 of file integer.cpp.

void Baseline_MultiplyBottom8 ( word R,
const word AA,
const word BB 
)

Definition at line 1262 of file integer.cpp.

void Baseline_MultiplyTop16 ( word R,
const word AA,
const word BB,
word  L 
)

Definition at line 1362 of file integer.cpp.

void Baseline_MultiplyTop2 ( word R,
const word A,
const word B,
word  L 
)

Definition at line 1294 of file integer.cpp.

Here is the call graph for this function:

void Baseline_MultiplyTop4 ( word R,
const word AA,
const word BB,
word  L 
)

Definition at line 1303 of file integer.cpp.

void Baseline_MultiplyTop8 ( word R,
const word AA,
const word BB,
word  L 
)

Definition at line 1317 of file integer.cpp.

void Baseline_Square16 ( word R,
const word AA 
)

Definition at line 1345 of file integer.cpp.

void Baseline_Square2 ( word R,
const word AA 
)

Definition at line 1220 of file integer.cpp.

void Baseline_Square4 ( word R,
const word AA 
)

Definition at line 1228 of file integer.cpp.

void Baseline_Square8 ( word R,
const word AA 
)

Definition at line 1236 of file integer.cpp.

int CRYPTOPP_FASTCALL Baseline_Sub ( size_t  N,
word C,
const word A,
const word B 
)

Definition at line 874 of file integer.cpp.

Here is the caller graph for this function:

void Divide ( word R,
word Q,
word T,
const word A,
size_t  NA,
const word B,
size_t  NB 
)

Definition at line 2692 of file integer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void DivideByPower2Mod ( word R,
const word A,
size_t  k,
const word M,
size_t  N 
)

Definition at line 2835 of file integer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class S , class D >
D DivideFourWordsByTwo ( S T,
const D &  Al,
const D &  Ah,
const D &  B 
)
inline

Definition at line 457 of file integer.cpp.

template<class S , class D >
S DivideThreeWordsByTwo ( S A,
S  B0,
S  B1,
D *  dummy = NULL 
)

Definition at line 413 of file integer.cpp.

Here is the call graph for this function:

void HalfMontgomeryReduce ( word R,
word T,
const word X,
const word M,
const word U,
const word V,
size_t  N 
)

Definition at line 2520 of file integer.cpp.

Here is the call graph for this function:

template<>
CRYPTOPP_DLL std::string IntToString< Integer > ( Integer  value,
unsigned int  base 
)

Converts an Integer to a string.

Parameters
valuethe Integer to convert
basethe base to use during the conversion
Returns
the string representation of value in base.

This is a template specialization of IntToString(). Use it like IntToString():

  // Print integer in base 10
  Integer n...
  std::string s = IntToString(n, 10);

The string is presented with lowercase letters by default. A hack is available to switch to uppercase letters without modifying the function signature.

  // Print integer in base 16, uppercase letters
  Integer n...
  const unsigned int UPPER = (1 << 31);
  std::string s = IntToString(n, (UPPER | 16));

Definition at line 4648 of file integer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<>
CRYPTOPP_DLL std::string IntToString< word64 > ( word64  value,
unsigned int  base 
)

Converts an unsigned value to a string.

Parameters
valuethe value to convert
basethe base to use during the conversion
Returns
the string representation of value in base.

this template function specialization was added to suppress Coverity findings on IntToString() with unsigned types.

Definition at line 4714 of file integer.cpp.

Here is the caller graph for this function:

void MontgomeryReduce ( word R,
word T,
word X,
const word M,
const word U,
size_t  N 
)

Definition at line 2446 of file integer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Multiply ( word R,
word T,
const word A,
const word B,
size_t  N 
)
inline

Definition at line 2324 of file integer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Multiply ( Integer product,
const Integer a,
const Integer b 
)

Definition at line 4078 of file integer.cpp.

Here is the call graph for this function:

void MultiplyBottom ( word R,
word T,
const word A,
const word B,
size_t  N 
)
inline

Definition at line 2334 of file integer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void MultiplyByPower2Mod ( word R,
const word A,
size_t  k,
const word M,
size_t  N 
)

Definition at line 2856 of file integer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void MultiplyTop ( word R,
word T,
const word L,
const word A,
const word B,
size_t  N 
)

Definition at line 2275 of file integer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::ostream& operator<< ( std::ostream &  out,
const Integer a 
)
Parameters
outa reference to a std::ostream
aa constant reference to an Integer
Returns
a reference to a std::ostream reference

The output integer responds to std::hex, std::oct, std::hex, std::upper and std::lower. The output includes the suffix h (for hex), . (dot, for dec) and o (for octal). There is currently no way to suppress the suffix.

If you want to print an Integer without the suffix or using an arbitrary base, then use IntToString<Integer>().

See also
IntToString<Integer>

Definition at line 3629 of file integer.cpp.

Here is the call graph for this function:

std::istream& operator>> ( std::istream &  in,
Integer a 
)
Parameters
ina reference to a std::istream
aa reference to an Integer
Returns
a reference to a std::istream reference

Definition at line 3604 of file integer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void PositiveAdd ( Integer sum,
const Integer a,
const Integer b 
)

Definition at line 3814 of file integer.cpp.

Here is the call graph for this function:

void PositiveDivide ( Integer remainder,
Integer quotient,
const Integer a,
const Integer b 
)

Definition at line 4115 of file integer.cpp.

Here is the call graph for this function:

void PositiveMultiply ( Integer product,
const Integer a,
const Integer b 
)

Definition at line 4066 of file integer.cpp.

Here is the call graph for this function:

void PositiveSubtract ( Integer diff,
const Integer a,
const Integer b 
)

Definition at line 3844 of file integer.cpp.

Here is the call graph for this function:

void RecursiveInverseModPower2 ( word R,
word T,
const word A,
size_t  N 
)

Definition at line 2413 of file integer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void RecursiveMultiply ( word R,
word T,
const word A,
const word B,
size_t  N 
)

Definition at line 2184 of file integer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void RecursiveMultiplyBottom ( word R,
word T,
const word A,
const word B,
size_t  N 
)

Definition at line 2251 of file integer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void RecursiveSquare ( word R,
word T,
const word A,
size_t  N 
)

Definition at line 2226 of file integer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Square ( word R,
word T,
const word A,
size_t  N 
)
inline

Definition at line 2329 of file integer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
const T& STDMAX2 ( const T a,
const T b 
)
inline

Definition at line 3885 of file integer.cpp.

Here is the caller graph for this function:

int Subtract ( word C,
const word A,
const word B,
size_t  N 
)
inline

Definition at line 2152 of file integer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function: