Classes | Functions
rsa.c File Reference
#include "includes.h"
#include "common.h"
#include "asn1.h"
#include "bignum.h"
#include "rsa.h"
Include dependency graph for rsa.c:

Go to the source code of this file.

Classes

struct  crypto_rsa_key

Functions

int crypto_rsa_exptmod (const u8 *in, size_t inlen, u8 *out, size_t *outlen, struct crypto_rsa_key *key, int use_private)
void crypto_rsa_free (struct crypto_rsa_key *key)
size_t crypto_rsa_get_modulus_len (struct crypto_rsa_key *key)
struct crypto_rsa_keycrypto_rsa_import_private_key (const u8 *buf, size_t len)
struct crypto_rsa_keycrypto_rsa_import_public_key (const u8 *buf, size_t len)
static const u8 * crypto_rsa_parse_integer (const u8 *pos, const u8 *end, struct bignum *num)

Function Documentation

int crypto_rsa_exptmod ( const u8 *  in,
size_t  inlen,
u8 *  out,
size_t *  outlen,
struct crypto_rsa_key key,
int  use_private 
)

crypto_rsa_exptmod - RSA modular exponentiation : Input data : Input data length : Buffer for output data : Maximum size of the output buffer and used size on success : RSA key : 1 = Use RSA private key, 0 = Use RSA public key Returns: 0 on success, -1 on failure

Definition at line 248 of file rsa.c.

void crypto_rsa_free ( struct crypto_rsa_key key)

crypto_rsa_free - Free RSA key : RSA key to be freed

This function frees an RSA key imported with either crypto_rsa_import_public_key() or crypto_rsa_import_private_key().

Definition at line 345 of file rsa.c.

size_t crypto_rsa_get_modulus_len ( struct crypto_rsa_key key)

crypto_rsa_get_modulus_len - Get the modulus length of the RSA key : RSA key Returns: Modulus length of the key

Definition at line 232 of file rsa.c.

struct crypto_rsa_key* crypto_rsa_import_private_key ( const u8 *  buf,
size_t  len 
) [read]

crypto_rsa_import_private_key - Import an RSA private key : Key buffer (DER encoded RSA private key) : Key buffer length in bytes Returns: Pointer to the private key or NULL on failure

Definition at line 132 of file rsa.c.

struct crypto_rsa_key* crypto_rsa_import_public_key ( const u8 *  buf,
size_t  len 
) [read]

crypto_rsa_import_public_key - Import an RSA public key : Key buffer (DER encoded RSA public key) : Key buffer length in bytes Returns: Pointer to the public key or NULL on failure

Definition at line 68 of file rsa.c.

static const u8* crypto_rsa_parse_integer ( const u8 *  pos,
const u8 *  end,
struct bignum *  num 
) [static]

Definition at line 37 of file rsa.c.



wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Jan 2 2014 11:26:42