[Main]
Name=BN_powerMod
Type=Function
Subtype=ROM Call
Header Files=rsa.h
Definition=void BN_powerMod (BN *dest, const BN *x, const BN *e, const BN *n);

[ROM Call]
Index=$123

[Description]
Raises a big integer to the e-th power modulo n.

[Explanation]
BN_powerMod calculates Y&nbsp;=&nbsp;(X&nbsp;^&nbsp;E)&nbsp;<B>mod</B>&nbsp;N
where Y, X, E and N are big integers (up to 2040 bits) stored in
<A HREF="$$LINK(BN)">BN</A> structures pointed to by <I>dest</I>, <I>x</I>, <I>e</I> and <I>n</I> respectively.
This routine is used in TIOS for RSA encryption, but may be used for any other purposes too
(see <A HREF="$$LINK(BN)">BN</A> for more info about how RSA works).

[References]
Out=BN_prodMod
