$search
#include "includes.h"
#include "common.h"
#include "tls/bignum.h"
#include "crypto.h"
Go to the source code of this file.
Functions | |
int | crypto_mod_exp (const u8 *base, size_t base_len, const u8 *power, size_t power_len, const u8 *modulus, size_t modulus_len, u8 *result, size_t *result_len) |
int crypto_mod_exp | ( | const u8 * | base, | |
size_t | base_len, | |||
const u8 * | power, | |||
size_t | power_len, | |||
const u8 * | modulus, | |||
size_t | modulus_len, | |||
u8 * | result, | |||
size_t * | result_len | |||
) |
crypto_mod_exp - Modular exponentiation of large integers : Base integer (big endian byte array) : Length of base integer in bytes : Power integer (big endian byte array) : Length of power integer in bytes : Modulus integer (big endian byte array) : Length of modulus integer in bytes
This function calculates result = base ^ power mod modulus. modules_len is used as the maximum size of modulus buffer. It is set to the used size on success.
This function is only used with internal TLSv1 implementation (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need to implement this.
Definition at line 22 of file crypto_internal-modexp.c.