PolarSSL v1.3.2
Data Fields
pk_info_t Struct Reference

Public key information and operations. More...

#include <pk.h>

Data Fields

pk_type_t type
 Public key type. More...
 
const char * name
 Type name. More...
 
size_t(* get_size )(const void *)
 Get key size in bits. More...
 
int(* can_do )(pk_type_t type)
 Tell if the context implements this type (e.g. More...
 
int(* verify_func )(void *ctx, md_type_t md_alg, const unsigned char *hash, size_t hash_len, const unsigned char *sig, size_t sig_len)
 Verify signature. More...
 
int(* sign_func )(void *ctx, md_type_t md_alg, const unsigned char *hash, size_t hash_len, unsigned char *sig, size_t *sig_len, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)
 Make signature. More...
 
int(* decrypt_func )(void *ctx, const unsigned char *input, size_t ilen, unsigned char *output, size_t *olen, size_t osize, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)
 Decrypt message. More...
 
int(* encrypt_func )(void *ctx, const unsigned char *input, size_t ilen, unsigned char *output, size_t *olen, size_t osize, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)
 Encrypt message. More...
 
void *(* ctx_alloc_func )(void)
 Allocate a new context. More...
 
void(* ctx_free_func )(void *ctx)
 Free the given context. More...
 
void(* debug_func )(const void *ctx, pk_debug_item *items)
 Interface with the debug module. More...
 

Detailed Description

Public key information and operations.

Definition at line 125 of file pk.h.

Field Documentation

int(* pk_info_t::can_do)(pk_type_t type)

Tell if the context implements this type (e.g.

ECKEY can do ECDSA)

Definition at line 137 of file pk.h.

void*(* pk_info_t::ctx_alloc_func)(void)

Allocate a new context.

Definition at line 164 of file pk.h.

void(* pk_info_t::ctx_free_func)(void *ctx)

Free the given context.

Definition at line 167 of file pk.h.

void(* pk_info_t::debug_func)(const void *ctx, pk_debug_item *items)

Interface with the debug module.

Definition at line 170 of file pk.h.

int(* pk_info_t::decrypt_func)(void *ctx, const unsigned char *input, size_t ilen, unsigned char *output, size_t *olen, size_t osize, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)

Decrypt message.

Definition at line 152 of file pk.h.

int(* pk_info_t::encrypt_func)(void *ctx, const unsigned char *input, size_t ilen, unsigned char *output, size_t *olen, size_t osize, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)

Encrypt message.

Definition at line 158 of file pk.h.

size_t(* pk_info_t::get_size)(const void *)

Get key size in bits.

Definition at line 134 of file pk.h.

const char* pk_info_t::name

Type name.

Definition at line 131 of file pk.h.

int(* pk_info_t::sign_func)(void *ctx, md_type_t md_alg, const unsigned char *hash, size_t hash_len, unsigned char *sig, size_t *sig_len, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)

Make signature.

Definition at line 145 of file pk.h.

pk_type_t pk_info_t::type

Public key type.

Definition at line 128 of file pk.h.

int(* pk_info_t::verify_func)(void *ctx, md_type_t md_alg, const unsigned char *hash, size_t hash_len, const unsigned char *sig, size_t sig_len)

Verify signature.

Definition at line 140 of file pk.h.


The documentation for this struct was generated from the following file: