bignum.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int bignum_add (const struct bignum *a, const struct bignum *b, struct bignum *c)
int bignum_cmp (const struct bignum *a, const struct bignum *b)
int bignum_cmp_d (const struct bignum *a, unsigned long b)
void bignum_deinit (struct bignum *n)
int bignum_exptmod (const struct bignum *a, const struct bignum *b, const struct bignum *c, struct bignum *d)
int bignum_get_unsigned_bin (const struct bignum *n, u8 *buf, size_t *len)
size_t bignum_get_unsigned_bin_len (struct bignum *n)
struct bignum * bignum_init (void)
int bignum_mul (const struct bignum *a, const struct bignum *b, struct bignum *c)
int bignum_mulmod (const struct bignum *a, const struct bignum *b, const struct bignum *c, struct bignum *d)
int bignum_set_unsigned_bin (struct bignum *n, const u8 *buf, size_t len)
int bignum_sub (const struct bignum *a, const struct bignum *b, struct bignum *c)

Function Documentation

int bignum_add ( const struct bignum *  a,
const struct bignum *  b,
struct bignum *  c 
)

bignum_add - c = a + b : Bignum from bignum_init() : Bignum from bignum_init() : Bignum from bignum_init(); used to store the result of a + b Returns: 0 on success, -1 on failure

Definition at line 146 of file bignum.c.

int bignum_cmp ( const struct bignum *  a,
const struct bignum *  b 
)

bignum_cmp - Signed comparison : Bignum from bignum_init() : Bignum from bignum_init() Returns: 0 on success, -1 on failure

Definition at line 121 of file bignum.c.

int bignum_cmp_d ( const struct bignum *  a,
unsigned long  b 
)

bignum_cmd_d - Compare bignum to standard integer : Bignum from bignum_init() : Small integer Returns: 0 on success, -1 on failure

Definition at line 133 of file bignum.c.

void bignum_deinit ( struct bignum *  n  ) 

bignum_deinit - Free bignum
: Bignum from bignum_init()

Definition at line 53 of file bignum.c.

int bignum_exptmod ( const struct bignum *  a,
const struct bignum *  b,
const struct bignum *  c,
struct bignum *  d 
)

bignum_exptmod - Modular exponentiation: d = a^b (mod c) : Bignum from bignum_init(); base : Bignum from bignum_init(); exponent : Bignum from bignum_init(); modulus : Bignum from bignum_init(); used to store the result of a^b (mod c) Returns: 0 on success, -1 on failure

Definition at line 221 of file bignum.c.

int bignum_get_unsigned_bin ( const struct bignum *  n,
u8 buf,
size_t *  len 
)

bignum_get_unsigned_bin - Set binary buffer to unsigned bignum
: Bignum from bignum_init() : Buffer for the binary number : Length of the buffer, can be NULL if buffer is known to be long enough. Set to used buffer length on success if not NULL. Returns: 0 on success, -1 on failure

Definition at line 81 of file bignum.c.

size_t bignum_get_unsigned_bin_len ( struct bignum *  n  ) 

bignum_get_unsigned_bin - Get length of bignum as an unsigned binary buffer
: Bignum from bignum_init() Returns: Length of n if written to a binary buffer

Definition at line 67 of file bignum.c.

struct bignum* bignum_init ( void   )  [read]

bignum_init - Allocate memory for bignum Returns: Pointer to allocated bignum or NULL on failure

Definition at line 36 of file bignum.c.

int bignum_mul ( const struct bignum *  a,
const struct bignum *  b,
struct bignum *  c 
)

bignum_mul - c = a * b : Bignum from bignum_init() : Bignum from bignum_init() : Bignum from bignum_init(); used to store the result of a * b Returns: 0 on success, -1 on failure

Definition at line 182 of file bignum.c.

int bignum_mulmod ( const struct bignum *  a,
const struct bignum *  b,
const struct bignum *  c,
struct bignum *  d 
)

bignum_mulmod - d = a * b (mod c) : Bignum from bignum_init() : Bignum from bignum_init() : Bignum from bignum_init(); modulus : Bignum from bignum_init(); used to store the result of a * b (mod c) Returns: 0 on success, -1 on failure

Definition at line 201 of file bignum.c.

int bignum_set_unsigned_bin ( struct bignum *  n,
const u8 buf,
size_t  len 
)

bignum_set_unsigned_bin - Set bignum based on unsigned binary buffer
: Bignum from bignum_init(); to be set to the given value : Buffer with unsigned binary value : Length of buf in octets Returns: 0 on success, -1 on failure

Definition at line 105 of file bignum.c.

int bignum_sub ( const struct bignum *  a,
const struct bignum *  b,
struct bignum *  c 
)

bignum_sub - c = a - b : Bignum from bignum_init() : Bignum from bignum_init() : Bignum from bignum_init(); used to store the result of a - b Returns: 0 on success, -1 on failure

Definition at line 164 of file bignum.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines


wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Fri Jan 11 10:04:11 2013