ABY Framework  1.0
Arithmetic Bool Yao Framework
 All Classes Files Functions Variables Enumerations Enumerator Macros
Macros | Functions | Variables
powmod.cpp File Reference

PowMod Implementation. More...

#include "powmod.h"
Include dependency graph for powmod.cpp:

Macros

#define POWMOD_DEBUG   0
 

Functions

void fbpowmod_init_g (const mpz_t base, const mpz_t mod, const int bitsize)
 
void fbpowmod_init_h (const mpz_t base, const mpz_t mod, const int bitsize)
 
void fbpowmod_g (mpz_t result, const mpz_t exp)
 
void fbpowmod_h (mpz_t result, const mpz_t exp)
 
void dbpowmod (mpz_t ret, const mpz_t b1, const mpz_t e1, const mpz_t b2, const mpz_t e2, const mpz_t mod)
 
void fbdbpowmod_init (const mpz_t b1, const mpz_t b2, const mpz_t mod, const int bitsize)
 
void fbdbpowmod (mpz_t ret, const mpz_t e1, const mpz_t e2)
 

Variables

mpz_t * m_table_g
 
mpz_t * m_table_h
 
mpz_t * m_prod
 
mpz_t m_mod
 
int m_numberOfElements_g
 
int m_numberOfElements_h
 

Detailed Description

PowMod Implementation.

Author
danie.nosp@m.l.de.nosp@m.mmler.nosp@m.@ec-.nosp@m.sprid.nosp@m.e.de

Function Documentation

void dbpowmod ( mpz_t  ret,
const mpz_t  b1,
const mpz_t  e1,
const mpz_t  b2,
const mpz_t  e2,
const mpz_t  mod 
)

double-base exponentiation ret = b1^e1*b2^e2

void fbdbpowmod ( mpz_t  ret,
const mpz_t  e1,
const mpz_t  e2 
)

fixed-base double base encryption requires pre-computed product with fbdbpowmod_init

void fbpowmod_g ( mpz_t  result,
const mpz_t  exp 
)

fixed-base multiplication requires pre-computed table, created with fbpowmod_init_*

void fbpowmod_init_g ( const mpz_t  base,
const mpz_t  mod,
const int  bitsize 
)

initialize fixed base multiplication for a given base and a desired exponent bit size identical functionality for either g or h