RetroArch
pk_internal.h
Go to the documentation of this file.
1 
24 #ifndef MBEDTLS_PK_WRAP_H
25 #define MBEDTLS_PK_WRAP_H
26 
27 #if !defined(MBEDTLS_CONFIG_FILE)
28 #include "config.h"
29 #else
30 #include MBEDTLS_CONFIG_FILE
31 #endif
32 
33 #include "pk.h"
34 
36 {
39 
41  const char *name;
42 
44  size_t (*get_bitlen)( const void * );
45 
48 
50  int (*verify_func)( void *ctx, mbedtls_md_type_t md_alg,
51  const unsigned char *hash, size_t hash_len,
52  const unsigned char *sig, size_t sig_len );
53 
55  int (*sign_func)( void *ctx, mbedtls_md_type_t md_alg,
56  const unsigned char *hash, size_t hash_len,
57  unsigned char *sig, size_t *sig_len,
58  int (*f_rng)(void *, unsigned char *, size_t),
59  void *p_rng );
60 
62  int (*decrypt_func)( void *ctx, const unsigned char *input, size_t ilen,
63  unsigned char *output, size_t *olen, size_t osize,
64  int (*f_rng)(void *, unsigned char *, size_t),
65  void *p_rng );
66 
68  int (*encrypt_func)( void *ctx, const unsigned char *input, size_t ilen,
69  unsigned char *output, size_t *olen, size_t osize,
70  int (*f_rng)(void *, unsigned char *, size_t),
71  void *p_rng );
72 
74  int (*check_pair_func)( const void *pub, const void *prv );
75 
77  void * (*ctx_alloc_func)( void );
78 
80  void (*ctx_free_func)( void *ctx );
81 
83  void (*debug_func)( const void *ctx, mbedtls_pk_debug_item *items );
84 
85 };
86 #if defined(MBEDTLS_PK_RSA_ALT_SUPPORT)
87 /* Container for RSA-alt */
88 typedef struct
89 {
90  void *key;
95 #endif
96 
97 #if defined(MBEDTLS_RSA_C)
99 #endif
100 
101 #if defined(MBEDTLS_ECP_C)
104 #endif
105 
106 #if defined(MBEDTLS_ECDSA_C)
108 #endif
109 
110 #if defined(MBEDTLS_PK_RSA_ALT_SUPPORT)
112 #endif
113 
114 #endif /* MBEDTLS_PK_WRAP_H */
Definition: pk_internal.h:35
mbedtls_pk_type_t type
Definition: pk_internal.h:38
Configuration options (set of defines)
Public Key abstraction layer.
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:55
mbedtls_pk_rsa_alt_decrypt_func decrypt_func
Definition: pk_internal.h:91
int(* check_pair_func)(const void *pub, const void *prv)
Definition: pk_internal.h:74
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
mbedtls_pk_rsa_alt_sign_func sign_func
Definition: pk_internal.h:92
GLenum GLenum GLenum input
Definition: glext.h:9938
void(* ctx_free_func)(void *ctx)
Definition: pk_internal.h:80
mbedtls_md_type_t
Definition: md.h:39
mbedtls_pk_type_t
Public key types.
Definition: pk.h:71
void(* debug_func)(const void *ctx, mbedtls_pk_debug_item *items)
Definition: pk_internal.h:83
AVFormatContext * ctx
Definition: record_ffmpeg.c:247
const mbedtls_pk_info_t mbedtls_ecdsa_info
Definition: pk_wrap.c:375
void * key
Definition: pk_internal.h:90
int(* can_do)(mbedtls_pk_type_t type)
Definition: pk_internal.h:47
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:50
mbedtls_pk_rsa_alt_key_len_func key_len_func
Definition: pk_internal.h:93
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:62
int(* mbedtls_pk_rsa_alt_decrypt_func)(void *ctx, int mode, size_t *olen, const unsigned char *input, unsigned char *output, size_t output_max_len)
Types for RSA-alt abstraction.
Definition: pk.h:159
size_t(* mbedtls_pk_rsa_alt_key_len_func)(void *ctx)
Definition: pk.h:166
std::string output
Definition: Config.FromFile.cpp:44
const mbedtls_pk_info_t mbedtls_rsa_alt_info
Definition: pk_wrap.c:489
const char * name
Definition: pk_internal.h:41
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:68
const mbedtls_pk_info_t mbedtls_eckeydh_info
Definition: pk_wrap.c:312
const mbedtls_pk_info_t mbedtls_eckey_info
Definition: pk_wrap.c:283
const mbedtls_pk_info_t mbedtls_rsa_info
Definition: pk_wrap.c:173
Definition: pk_internal.h:88
int(* mbedtls_pk_rsa_alt_sign_func)(void *ctx, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng, int mode, mbedtls_md_type_t md_alg, unsigned int hashlen, const unsigned char *hash, unsigned char *sig)
Definition: pk.h:162
Item to send to the debug module.
Definition: pk.h:105
size_t(* get_bitlen)(const void *)
Definition: pk_internal.h:44