Public key information and operations. More...
#include <pk.h>
Data Fields | |
pk_type_t | type |
Public key type. | |
const char * | name |
Type name. | |
size_t(* | get_size )(const void *) |
Get key size in bits. | |
int(* | can_do )(pk_type_t type) |
Tell if the context implements this type (e.g. | |
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. | |
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. | |
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. | |
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. | |
void *(* | ctx_alloc_func )(void) |
Allocate a new context. | |
void(* | ctx_free_func )(void *ctx) |
Free the given context. | |
void(* | debug_func )(const void *ctx, pk_debug_item *items) |
Interface with the debug module. |
Public key information and operations.
Definition at line 125 of file pk.h.
int(* pk_info_t::can_do)(pk_type_t type) |
void*(* pk_info_t::ctx_alloc_func)(void) |
Allocate a new context.
Referenced by pk_init_ctx(), and pk_init_ctx_rsa_alt().
void(* pk_info_t::ctx_free_func)(void *ctx) |
Free the given context.
Referenced by pk_free().
void(* pk_info_t::debug_func)(const void *ctx, pk_debug_item *items) |
Interface with the debug module.
Referenced by pk_debug().
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.
Referenced by pk_decrypt().
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.
Referenced by pk_encrypt().
size_t(* pk_info_t::get_size)(const void *) |
Get key size in bits.
Referenced by pk_get_size().
const char* pk_info_t::name |
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.
Referenced by pk_sign().
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.
Referenced by pk_verify().