# RSACrypt.h File Reference

`#include "BigTypes.h"`
`#include "Rand.h"`

## Namespaces

namespace | big

## Defines

#define | RSASUPPORTGENPRIME
#define | RSA_BIT_SIZE big::u256

## Functions

BIGONETYPE void | simpleModExp (T &x0, T &y0, T &n0, T &r0)
BIGONETYPE void | rModn (T &n, T &Rn)
BIGONETYPE void | GCD (T &a0, T &b0, T &c)
BIGONETYPE void | SubMulMod (T &a, T &b, T &c, T &n, T &x)
BIGONETYPE void | computeRinverse (T &n0, T &rp)
BIGONETYPE void | computeModularInverse (T &a0, T &b0, T &ap)
BIGONETYPE void | computeNRinverse (T &n0, T &np)
BIGONETYPE void | MonPro (T &ap, T &bp, T &n, T &np, T &u_out)
BIGONETYPE void | MonModExp (T &x, T &M, T &e, T &n, T &np, T &xp0)
BIGTWOTYPES void | CRTModExp (Bigger &x, Bigger &C, Bigger &d, T &p, T &q, T &pInverse, T &pnp, T &pxp, T &qnp, T &qxp)
BIGONETYPE void | computePublicExponent (T &phi, T &e)
BIGONETYPE void | computePrivateExponent (T &e, T &phi, T &d)
BIGONETYPE bool | RabinMillerPrimalityTest (T &n, u32 insurance)
BIGONETYPE void | generateStrongPseudoPrime (T &n)

## Variables

static const u16 | PRIME_TABLE [256]

## Define Documentation

#define RSA_BIT_SIZE big::u256

#define RSASUPPORTGENPRIME

## Function Documentation

BIGONETYPE void big::computeModularInverse | ( | T & | a0,
|  | T & | b0,
|  | T & | ap
| ) |

BIGONETYPE void big::computeNRinverse | ( | T & | n0,
|  | T & | np
| ) |

BIGONETYPE void big::computePrivateExponent | ( | T & | e,
|  | T & | phi,
|  | T & | d
| ) |

BIGONETYPE void big::computePublicExponent | ( | T & | phi,
|  | T & | e
| ) |

BIGONETYPE void big::computeRinverse | ( | T & | n0,
|  | T & | rp
| ) |

BIGTWOTYPES void big::CRTModExp | ( | Bigger & | x,
|  | Bigger & | C,
|  | Bigger & | d,
|  | T & | p,
|  | T & | q,
|  | T & | pInverse,
|  | T & | pnp,
|  | T & | pxp,
|  | T & | qnp,
|  | T & | qxp
| ) |

BIGONETYPE void big::GCD | ( | T & | a0,
|  | T & | b0,
|  | T & | c
| ) |

BIGONETYPE void big::generateStrongPseudoPrime | ( | T & | n | ) |

BIGONETYPE void big::MonModExp | ( | T & | x,
|  | T & | M,
|  | T & | e,
|  | T & | n,
|  | T & | np,
|  | T & | xp0
| ) |

BIGONETYPE void big::MonPro | ( | T & | ap,
|  | T & | bp,
|  | T & | n,
|  | T & | np,
|  | T & | u_out
| ) |

BIGONETYPE bool big::RabinMillerPrimalityTest | ( | T & | n,
|  | u32 | insurance
| ) |

BIGONETYPE void big::rModn | ( | T & | n,
|  | T & | Rn
| ) |

BIGONETYPE void big::simpleModExp | ( | T & | x0,
|  | T & | y0,
|  | T & | n0,
|  | T & | r0
| ) |

BIGONETYPE void big::SubMulMod | ( | T & | a,
|  | T & | b,
|  | T & | c,
|  | T & | n,
|  | T & | x
| ) |

## Variable Documentation

const u16 big::PRIME_TABLE[256]`[static]`