Files
wolfssl/doc/dox_comments/header_files/bn.h
T

29 lines
811 B
C
Raw Normal View History

/*!
\ingroup openSSL
2018-06-27 16:22:12 -06:00
\brief This function performs the following math “r = (a^p) % m”.
2018-06-27 16:22:12 -06:00
\return SSL_SUCCESS On successfully performing math operation.
\return SSL_FAILURE If an error case was encountered.
2018-06-27 16:22:12 -06:00
\param r structure to hold result.
\param a value to be raised by a power.
\param p power to raise a by.
\param m modulus to use.
\param ctx currently not used with wolfSSL can be NULL.
2018-06-27 16:22:12 -06:00
_Example_
\code
WOLFSSL_BIGNUM r,a,p,m;
int ret;
// set big number values
ret = wolfSSL_BN_mod_exp(r, a, p, m, NULL);
// check ret value
\endcode
2018-06-27 16:22:12 -06:00
\sa wolfSSL_BN_new
\sa wolfSSL_BN_free
*/
2022-04-06 16:17:36 +01:00
int wolfSSL_BN_mod_exp(WOLFSSL_BIGNUM *r, const WOLFSSL_BIGNUM *a,
const WOLFSSL_BIGNUM *p, const WOLFSSL_BIGNUM *m, WOLFSSL_BN_CTX *ctx);