25 #ifndef MBEDTLS_PK_WRAP_H 26 #define MBEDTLS_PK_WRAP_H 28 #if !defined(MBEDTLS_CONFIG_FILE) 31 #include MBEDTLS_CONFIG_FILE 52 const unsigned char *hash,
size_t hash_len,
53 const unsigned char *sig,
size_t sig_len );
57 const unsigned char *hash,
size_t hash_len,
58 unsigned char *sig,
size_t *sig_len,
59 int (*f_rng)(
void *,
unsigned char *, size_t),
62 #if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE) 65 const unsigned char *hash,
size_t hash_len,
66 const unsigned char *sig,
size_t sig_len,
71 const unsigned char *hash,
size_t hash_len,
72 unsigned char *sig,
size_t *sig_len,
73 int (*f_rng)(
void *,
unsigned char *, size_t),
74 void *p_rng,
void *rs_ctx );
78 int (*
decrypt_func)(
void *ctx,
const unsigned char *input,
size_t ilen,
79 unsigned char *output,
size_t *olen,
size_t osize,
80 int (*f_rng)(
void *,
unsigned char *, size_t),
84 int (*
encrypt_func)(
void *ctx,
const unsigned char *input,
size_t ilen,
85 unsigned char *output,
size_t *olen,
size_t osize,
86 int (*f_rng)(
void *,
unsigned char *, size_t),
93 void * (*ctx_alloc_func)( void );
98 #if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE) 100 void * (*rs_alloc_func)( void );
103 void (*rs_free_func)(
void *rs_ctx );
110 #if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) 115 mbedtls_pk_rsa_alt_decrypt_func decrypt_func;
116 mbedtls_pk_rsa_alt_sign_func sign_func;
117 mbedtls_pk_rsa_alt_key_len_func key_len_func;
118 } mbedtls_rsa_alt_context;
121 #if defined(MBEDTLS_RSA_C) 125 #if defined(MBEDTLS_ECP_C) 130 #if defined(MBEDTLS_ECDSA_C) 134 #if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) 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)
Definition: pk_internal.h:84
mbedtls_pk_type_t
Public key types.
Definition: pk.h:78
Configuration options (set of defines)
mbedtls_pk_type_t type
Definition: pk_internal.h:39
Public Key abstraction layer.
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)
Definition: pk_internal.h:78
const char * name
Definition: pk_internal.h:42
Definition: pk_internal.h:36
int(* check_pair_func)(const void *pub, const void *prv)
Definition: pk_internal.h:90
size_t(* get_bitlen)(const void *)
Definition: pk_internal.h:45
void(* debug_func)(const void *ctx, mbedtls_pk_debug_item *items)
Definition: pk_internal.h:107
int(* can_do)(mbedtls_pk_type_t type)
Definition: pk_internal.h:48
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)
Definition: pk_internal.h:51
mbedtls_md_type_t
Supported message digests.
Definition: md.h:58
Item to send to the debug module.
Definition: pk.h:112
void(* ctx_free_func)(void *ctx)
Definition: pk_internal.h:96
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)
Definition: pk_internal.h:56