Mbed OS Reference
Loading...
Searching...
No Matches
mbedtls_pk_info_t Struct Reference

Data Fields

mbedtls_pk_type_t type
 Public key type. More...
 
const char * name
 Type name. More...
 
size_t(* get_bitlen )(const void *)
 Get key size in bits. More...
 
int(* can_do )(mbedtls_pk_type_t type)
 Tell if the context implements this type (e.g. More...
 
int(* verify_func )(void *ctx, mbedtls_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, mbedtls_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...
 
int(* check_pair_func )(const void *pub, const void *prv)
 Check public-private key pair. 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, mbedtls_pk_debug_item *items)
 Interface with the debug module. More...
 

Detailed Description

Definition at line 34 of file pk_internal.h.

Field Documentation

◆ type

Public key type.

Definition at line 37 of file pk_internal.h.

◆ name

const char* name

Type name.

Definition at line 40 of file pk_internal.h.

◆ get_bitlen

size_t(* get_bitlen) (const void *)

Get key size in bits.

Definition at line 43 of file pk_internal.h.

◆ can_do

int(* can_do) (mbedtls_pk_type_t type)

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

ECKEY can do ECDSA)

Definition at line 46 of file pk_internal.h.

◆ verify_func

int(* verify_func) (void *ctx, mbedtls_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 49 of file pk_internal.h.

◆ sign_func

int(* sign_func) (void *ctx, mbedtls_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 54 of file pk_internal.h.

◆ decrypt_func

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.

Definition at line 76 of file pk_internal.h.

◆ encrypt_func

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.

Definition at line 82 of file pk_internal.h.

◆ check_pair_func

int(* check_pair_func) (const void *pub, const void *prv)

Check public-private key pair.

Definition at line 88 of file pk_internal.h.

◆ ctx_alloc_func

void *(* ctx_alloc_func) (void)

Allocate a new context.

Definition at line 91 of file pk_internal.h.

◆ ctx_free_func

void(* ctx_free_func) (void *ctx)

Free the given context.

Definition at line 94 of file pk_internal.h.

◆ debug_func

void(* debug_func) (const void *ctx, mbedtls_pk_debug_item *items)

Interface with the debug module.

Definition at line 105 of file pk_internal.h.