Functions
crypto_internal-modexp.c File Reference
#include "includes.h"
#include "common.h"
#include "tls/bignum.h"
#include "crypto.h"
Include dependency graph for crypto_internal-modexp.c:

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)

Function Documentation

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

Returns:
: Buffer for the result : Result length (max buffer size on input, real len on output) Returns: 0 on success, -1 on failure

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.



wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Apr 24 2014 15:34:37