![]() |
BN_powerMod | Function (ROM Call 0x123) |
rsa.h |
void BN_powerMod (BN *dest, const BN *x, const BN *e, const BN *n); |
Raises a big integer to the e-th power modulo n.
BN_powerMod calculates Y = (X ^ E) mod N where Y, X, E and N are big integers (up to 2040 bits) stored in BN structures pointed to by dest, x, e and n respectively. This routine is used in TIOS for RSA encryption, but may be used for any other purposes too (see BN for more info about how RSA works).