Manuel Pégourié-Gonnard | d73b3c1 | 2013-08-12 17:06:05 +0200 | [diff] [blame] | 1 | /** |
Darryl Green | a40a101 | 2018-01-05 15:33:17 +0000 | [diff] [blame] | 2 | * \file pk_internal.h |
Manuel Pégourié-Gonnard | d73b3c1 | 2013-08-12 17:06:05 +0200 | [diff] [blame] | 3 | * |
| 4 | * \brief Public Key abstraction layer: wrapper functions |
Darryl Green | a40a101 | 2018-01-05 15:33:17 +0000 | [diff] [blame] | 5 | */ |
| 6 | /* |
Manuel Pégourié-Gonnard | 6fb8187 | 2015-07-27 11:11:48 +0200 | [diff] [blame] | 7 | * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved |
Manuel Pégourié-Gonnard | 37ff140 | 2015-09-04 14:21:07 +0200 | [diff] [blame] | 8 | * SPDX-License-Identifier: Apache-2.0 |
| 9 | * |
| 10 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 11 | * not use this file except in compliance with the License. |
| 12 | * You may obtain a copy of the License at |
| 13 | * |
| 14 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 15 | * |
| 16 | * Unless required by applicable law or agreed to in writing, software |
| 17 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 18 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 19 | * See the License for the specific language governing permissions and |
| 20 | * limitations under the License. |
Manuel Pégourié-Gonnard | d73b3c1 | 2013-08-12 17:06:05 +0200 | [diff] [blame] | 21 | * |
Manuel Pégourié-Gonnard | fe44643 | 2015-03-06 13:17:10 +0000 | [diff] [blame] | 22 | * This file is part of mbed TLS (https://tls.mbed.org) |
Manuel Pégourié-Gonnard | d73b3c1 | 2013-08-12 17:06:05 +0200 | [diff] [blame] | 23 | */ |
| 24 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 25 | #ifndef MBEDTLS_PK_WRAP_H |
| 26 | #define MBEDTLS_PK_WRAP_H |
Manuel Pégourié-Gonnard | d73b3c1 | 2013-08-12 17:06:05 +0200 | [diff] [blame] | 27 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 28 | #if !defined(MBEDTLS_CONFIG_FILE) |
Manuel Pégourié-Gonnard | d73b3c1 | 2013-08-12 17:06:05 +0200 | [diff] [blame] | 29 | #include "config.h" |
Manuel Pégourié-Gonnard | cef4ad2 | 2014-04-29 12:39:06 +0200 | [diff] [blame] | 30 | #else |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 31 | #include MBEDTLS_CONFIG_FILE |
Manuel Pégourié-Gonnard | cef4ad2 | 2014-04-29 12:39:06 +0200 | [diff] [blame] | 32 | #endif |
Manuel Pégourié-Gonnard | d73b3c1 | 2013-08-12 17:06:05 +0200 | [diff] [blame] | 33 | |
| 34 | #include "pk.h" |
| 35 | |
Manuel Pégourié-Gonnard | 342cecf | 2019-09-19 10:45:14 +0200 | [diff] [blame^] | 36 | /* |
| 37 | * PK information macro definitions |
| 38 | */ |
| 39 | |
| 40 | /* |
| 41 | * Each PK type that can be used with MBEDTLS_PK_SINGLE_TYPE needs to have |
| 42 | * the following MBEDTLS_PK_INFO_{FIELD} definitions, plus a dummy one for the |
| 43 | * base name. For now, only ECKEY with MBEDTLS_USE_TINYCRYPT is defined. |
| 44 | */ |
| 45 | |
| 46 | #if defined(MBEDTLS_USE_TINYCRYPT) |
Manuel Pégourié-Gonnard | 1c1cc0d | 2019-09-19 10:45:14 +0200 | [diff] [blame] | 47 | /* Dummy definition to keep check-names.sh happy - don't uncomment */ |
| 48 | //#define MBEDTLS_PK_INFO_ECKEY |
| 49 | |
Manuel Pégourié-Gonnard | 342cecf | 2019-09-19 10:45:14 +0200 | [diff] [blame^] | 50 | #define MBEDTLS_PK_INFO_ECKEY_TYPE MBEDTLS_PK_ECKEY |
| 51 | #define MBEDTLS_PK_INFO_ECKEY_NAME "EC" |
| 52 | #define MBEDTLS_PK_INFO_ECKEY_GET_BITLEN uecc_eckey_get_bitlen |
| 53 | #define MBEDTLS_PK_INFO_ECKEY_CAN_DO uecc_eckey_can_do |
| 54 | #define MBEDTLS_PK_INFO_ECKEY_VERIFY_FUNC uecc_eckey_verify_wrap |
| 55 | #define MBEDTLS_PK_INFO_ECKEY_SIGN_FUNC uecc_eckey_sign_wrap |
| 56 | #define MBEDTLS_PK_INFO_ECKEY_DECRYPT_FUNC NULL |
| 57 | #define MBEDTLS_PK_INFO_ECKEY_ENCRYPT_FUNC NULL |
| 58 | #define MBEDTLS_PK_INFO_ECKEY_CHECK_PAIR_FUNC uecc_eckey_check_pair |
| 59 | #define MBEDTLS_PK_INFO_ECKEY_CTX_ALLOC_FUNC uecc_eckey_alloc_wrap |
| 60 | #define MBEDTLS_PK_INFO_ECKEY_CTX_FREE_FUNC uecc_eckey_free_wrap |
| 61 | #define MBEDTLS_PK_INFO_ECKEY_DEBUG_FUNC NULL |
| 62 | #endif /* MBEDTLS_USE_TINYCRYPT */ |
| 63 | |
| 64 | /* |
| 65 | * Helper macros to extract fields from PK types |
| 66 | */ |
| 67 | #define MBEDTLS_PK_INFO_TYPE_T( PK ) PK ## _TYPE |
| 68 | #define MBEDTLS_PK_INFO_NAME_T( PK ) PK ## _NAME |
| 69 | #define MBEDTLS_PK_INFO_GET_BITLEN_T( PK ) PK ## _GET_BITLEN |
| 70 | #define MBEDTLS_PK_INFO_CAN_DO_T( PK ) PK ## _CAN_DO |
| 71 | #define MBEDTLS_PK_INFO_VERIFY_FUNC_T( PK ) PK ## _VERIFY_FUNC |
| 72 | #define MBEDTLS_PK_INFO_SIGN_FUNC_T( PK ) PK ## _SIGN_FUNC |
| 73 | #define MBEDTLS_PK_INFO_DECRYPT_FUNC_T( PK ) PK ## _DECRYPT_FUNC |
| 74 | #define MBEDTLS_PK_INFO_ENCRYPT_FUNC_T( PK ) PK ## _ENCRYPT_FUNC |
| 75 | #define MBEDTLS_PK_INFO_CHECK_PAIR_FUNC_T( PK ) PK ## _CHECK_PAIR_FUNC |
| 76 | #define MBEDTLS_PK_INFO_CTX_ALLOC_FUNC_T( PK ) PK ## _CTX_ALLOC_FUNC |
| 77 | #define MBEDTLS_PK_INFO_CTX_FREE_FUNC_T( PK ) PK ## _CTX_FREE_FUNC |
| 78 | #define MBEDTLS_PK_INFO_DEBUG_FUNC_T( PK ) PK ## _DEBUG_FUNC |
| 79 | |
| 80 | /* Wrappers around MBEDTLS_PK_INFO_{FIELD}_T() which makes sure that |
| 81 | * the argument is macro-expanded before concatenated with the |
| 82 | * field name. This allows to call these macros as |
| 83 | * MBEDTLS_PK_INFO_{FIELD}( MBEDTLS_PK_SINGLE_TYPE ). |
| 84 | * where MBEDTLS_PK_SINGLE_TYPE expands to MBEDTLS_PK_INFO_{TYPE}. */ |
| 85 | #define MBEDTLS_PK_INFO_TYPE( PK ) MBEDTLS_PK_INFO_TYPE_T( PK ) |
| 86 | #define MBEDTLS_PK_INFO_NAME( PK ) MBEDTLS_PK_INFO_NAME_T( PK ) |
| 87 | #define MBEDTLS_PK_INFO_GET_BITLEN( PK ) MBEDTLS_PK_INFO_GET_BITLEN_T( PK ) |
| 88 | #define MBEDTLS_PK_INFO_CAN_DO( PK ) MBEDTLS_PK_INFO_CAN_DO_T( PK ) |
| 89 | #define MBEDTLS_PK_INFO_VERIFY_FUNC( PK ) MBEDTLS_PK_INFO_VERIFY_FUNC_T( PK ) |
| 90 | #define MBEDTLS_PK_INFO_SIGN_FUNC( PK ) MBEDTLS_PK_INFO_SIGN_FUNC_T( PK ) |
| 91 | #define MBEDTLS_PK_INFO_DECRYPT_FUNC( PK ) MBEDTLS_PK_INFO_DECRYPT_FUNC_T( PK ) |
| 92 | #define MBEDTLS_PK_INFO_ENCRYPT_FUNC( PK ) MBEDTLS_PK_INFO_ENCRYPT_FUNC_T( PK ) |
| 93 | #define MBEDTLS_PK_INFO_CHECK_PAIR_FUNC( PK ) MBEDTLS_PK_INFO_CHECK_PAIR_FUNC_T( PK ) |
| 94 | #define MBEDTLS_PK_INFO_CTX_ALLOC_FUNC( PK ) MBEDTLS_PK_INFO_CTX_ALLOC_FUNC_T( PK ) |
| 95 | #define MBEDTLS_PK_INFO_CTX_FREE_FUNC( PK ) MBEDTLS_PK_INFO_CTX_FREE_FUNC_T( PK ) |
| 96 | #define MBEDTLS_PK_INFO_DEBUG_FUNC( PK ) MBEDTLS_PK_INFO_DEBUG_FUNC_T( PK ) |
| 97 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 98 | struct mbedtls_pk_info_t |
Manuel Pégourié-Gonnard | c89d6cf | 2015-03-31 14:43:19 +0200 | [diff] [blame] | 99 | { |
| 100 | /** Public key type */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 101 | mbedtls_pk_type_t type; |
Manuel Pégourié-Gonnard | c89d6cf | 2015-03-31 14:43:19 +0200 | [diff] [blame] | 102 | |
| 103 | /** Type name */ |
| 104 | const char *name; |
| 105 | |
Manuel Pégourié-Gonnard | 57d96cd | 2019-09-19 10:45:14 +0200 | [diff] [blame] | 106 | /** Get key size in bits (must be valid)*/ |
Manuel Pégourié-Gonnard | 39a48f4 | 2015-06-18 16:06:55 +0200 | [diff] [blame] | 107 | size_t (*get_bitlen)( const void * ); |
Manuel Pégourié-Gonnard | c89d6cf | 2015-03-31 14:43:19 +0200 | [diff] [blame] | 108 | |
Manuel Pégourié-Gonnard | 57d96cd | 2019-09-19 10:45:14 +0200 | [diff] [blame] | 109 | /** Tell if the context implements this type (e.g. ECKEY can do ECDSA) |
| 110 | * (must be valid) */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 111 | int (*can_do)( mbedtls_pk_type_t type ); |
Manuel Pégourié-Gonnard | c89d6cf | 2015-03-31 14:43:19 +0200 | [diff] [blame] | 112 | |
Manuel Pégourié-Gonnard | 57d96cd | 2019-09-19 10:45:14 +0200 | [diff] [blame] | 113 | /** Verify signature (may be NULL) */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 114 | int (*verify_func)( void *ctx, mbedtls_md_type_t md_alg, |
Manuel Pégourié-Gonnard | c89d6cf | 2015-03-31 14:43:19 +0200 | [diff] [blame] | 115 | const unsigned char *hash, size_t hash_len, |
| 116 | const unsigned char *sig, size_t sig_len ); |
| 117 | |
Manuel Pégourié-Gonnard | 57d96cd | 2019-09-19 10:45:14 +0200 | [diff] [blame] | 118 | /** Make signature (may be NULL)*/ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 119 | int (*sign_func)( void *ctx, mbedtls_md_type_t md_alg, |
Manuel Pégourié-Gonnard | c89d6cf | 2015-03-31 14:43:19 +0200 | [diff] [blame] | 120 | const unsigned char *hash, size_t hash_len, |
| 121 | unsigned char *sig, size_t *sig_len, |
| 122 | int (*f_rng)(void *, unsigned char *, size_t), |
| 123 | void *p_rng ); |
| 124 | |
Manuel Pégourié-Gonnard | aaa9814 | 2017-08-18 17:30:37 +0200 | [diff] [blame] | 125 | #if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE) |
Manuel Pégourié-Gonnard | 57d96cd | 2019-09-19 10:45:14 +0200 | [diff] [blame] | 126 | /** Verify signature (restartable) (may be NULL) */ |
Manuel Pégourié-Gonnard | 1f59606 | 2017-05-09 10:42:40 +0200 | [diff] [blame] | 127 | int (*verify_rs_func)( void *ctx, mbedtls_md_type_t md_alg, |
| 128 | const unsigned char *hash, size_t hash_len, |
| 129 | const unsigned char *sig, size_t sig_len, |
| 130 | void *rs_ctx ); |
| 131 | |
Manuel Pégourié-Gonnard | 57d96cd | 2019-09-19 10:45:14 +0200 | [diff] [blame] | 132 | /** Make signature (restartable) (may be NULL) */ |
Manuel Pégourié-Gonnard | 1f59606 | 2017-05-09 10:42:40 +0200 | [diff] [blame] | 133 | int (*sign_rs_func)( void *ctx, mbedtls_md_type_t md_alg, |
| 134 | const unsigned char *hash, size_t hash_len, |
| 135 | unsigned char *sig, size_t *sig_len, |
| 136 | int (*f_rng)(void *, unsigned char *, size_t), |
| 137 | void *p_rng, void *rs_ctx ); |
Manuel Pégourié-Gonnard | aaa9814 | 2017-08-18 17:30:37 +0200 | [diff] [blame] | 138 | #endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */ |
Manuel Pégourié-Gonnard | 1f59606 | 2017-05-09 10:42:40 +0200 | [diff] [blame] | 139 | |
Manuel Pégourié-Gonnard | 57d96cd | 2019-09-19 10:45:14 +0200 | [diff] [blame] | 140 | /** Decrypt message (may be NULL) */ |
Manuel Pégourié-Gonnard | c89d6cf | 2015-03-31 14:43:19 +0200 | [diff] [blame] | 141 | int (*decrypt_func)( void *ctx, const unsigned char *input, size_t ilen, |
| 142 | unsigned char *output, size_t *olen, size_t osize, |
| 143 | int (*f_rng)(void *, unsigned char *, size_t), |
| 144 | void *p_rng ); |
| 145 | |
Manuel Pégourié-Gonnard | 57d96cd | 2019-09-19 10:45:14 +0200 | [diff] [blame] | 146 | /** Encrypt message (may be NULL ) */ |
Manuel Pégourié-Gonnard | c89d6cf | 2015-03-31 14:43:19 +0200 | [diff] [blame] | 147 | int (*encrypt_func)( void *ctx, const unsigned char *input, size_t ilen, |
| 148 | unsigned char *output, size_t *olen, size_t osize, |
| 149 | int (*f_rng)(void *, unsigned char *, size_t), |
| 150 | void *p_rng ); |
| 151 | |
Manuel Pégourié-Gonnard | 57d96cd | 2019-09-19 10:45:14 +0200 | [diff] [blame] | 152 | /** Check public-private key pair (may be NULL) */ |
Manuel Pégourié-Gonnard | c89d6cf | 2015-03-31 14:43:19 +0200 | [diff] [blame] | 153 | int (*check_pair_func)( const void *pub, const void *prv ); |
| 154 | |
Manuel Pégourié-Gonnard | 57d96cd | 2019-09-19 10:45:14 +0200 | [diff] [blame] | 155 | /** Allocate a new context (must be valid) */ |
Manuel Pégourié-Gonnard | c89d6cf | 2015-03-31 14:43:19 +0200 | [diff] [blame] | 156 | void * (*ctx_alloc_func)( void ); |
| 157 | |
Manuel Pégourié-Gonnard | 57d96cd | 2019-09-19 10:45:14 +0200 | [diff] [blame] | 158 | /** Free the given context (must be valid) */ |
Manuel Pégourié-Gonnard | c89d6cf | 2015-03-31 14:43:19 +0200 | [diff] [blame] | 159 | void (*ctx_free_func)( void *ctx ); |
| 160 | |
Manuel Pégourié-Gonnard | aaa9814 | 2017-08-18 17:30:37 +0200 | [diff] [blame] | 161 | #if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE) |
Manuel Pégourié-Gonnard | 57d96cd | 2019-09-19 10:45:14 +0200 | [diff] [blame] | 162 | /** Allocate the restart context (may be NULL)*/ |
Manuel Pégourié-Gonnard | 0bbc66c | 2017-08-18 16:22:06 +0200 | [diff] [blame] | 163 | void * (*rs_alloc_func)( void ); |
| 164 | |
Manuel Pégourié-Gonnard | 57d96cd | 2019-09-19 10:45:14 +0200 | [diff] [blame] | 165 | /** Free the restart context (may be NULL) */ |
Manuel Pégourié-Gonnard | 0bbc66c | 2017-08-18 16:22:06 +0200 | [diff] [blame] | 166 | void (*rs_free_func)( void *rs_ctx ); |
Manuel Pégourié-Gonnard | aaa9814 | 2017-08-18 17:30:37 +0200 | [diff] [blame] | 167 | #endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */ |
Manuel Pégourié-Gonnard | 0bbc66c | 2017-08-18 16:22:06 +0200 | [diff] [blame] | 168 | |
Manuel Pégourié-Gonnard | 57d96cd | 2019-09-19 10:45:14 +0200 | [diff] [blame] | 169 | /** Interface with the debug module (may be NULL) */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 170 | void (*debug_func)( const void *ctx, mbedtls_pk_debug_item *items ); |
Manuel Pégourié-Gonnard | c89d6cf | 2015-03-31 14:43:19 +0200 | [diff] [blame] | 171 | |
| 172 | }; |
Manuel Pégourié-Gonnard | 342cecf | 2019-09-19 10:45:14 +0200 | [diff] [blame^] | 173 | |
| 174 | /** |
| 175 | * \brief This macro builds an instance of ::mbedtls_pk_info_t |
| 176 | * from an \c MBEDTLS_PK_INFO_{TYPE} identifier. |
| 177 | */ |
| 178 | #if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE) |
| 179 | #define MBEDTLS_PK_INFO( PK ) \ |
| 180 | { \ |
| 181 | MBEDTLS_PK_INFO_TYPE( PK ), \ |
| 182 | MBEDTLS_PK_INFO_NAME( PK ), \ |
| 183 | MBEDTLS_PK_INFO_GET_BITLEN( PK ), \ |
| 184 | MBEDTLS_PK_INFO_CAN_DO( PK ), \ |
| 185 | MBEDTLS_PK_INFO_VERIFY_FUNC( PK ), \ |
| 186 | MBEDTLS_PK_INFO_SIGN_FUNC( PK ), \ |
| 187 | NULL, \ |
| 188 | NULL, \ |
| 189 | MBEDTLS_PK_INFO_DECRYPT_FUNC( PK ), \ |
| 190 | MBEDTLS_PK_INFO_ENCRYPT_FUNC( PK ), \ |
| 191 | MBEDTLS_PK_INFO_CHECK_PAIR_FUNC( PK ), \ |
| 192 | MBEDTLS_PK_INFO_CTX_ALLOC_FUNC( PK ), \ |
| 193 | MBEDTLS_PK_INFO_CTX_FREE_FUNC( PK ), \ |
| 194 | NULL, \ |
| 195 | NULL, \ |
| 196 | MBEDTLS_PK_INFO_DEBUG_FUNC( PK ), \ |
| 197 | } |
| 198 | #else /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */ |
| 199 | #define MBEDTLS_PK_INFO( PK ) \ |
| 200 | { \ |
| 201 | MBEDTLS_PK_INFO_TYPE( PK ), \ |
| 202 | MBEDTLS_PK_INFO_NAME( PK ), \ |
| 203 | MBEDTLS_PK_INFO_GET_BITLEN( PK ), \ |
| 204 | MBEDTLS_PK_INFO_CAN_DO( PK ), \ |
| 205 | MBEDTLS_PK_INFO_VERIFY_FUNC( PK ), \ |
| 206 | MBEDTLS_PK_INFO_SIGN_FUNC( PK ), \ |
| 207 | MBEDTLS_PK_INFO_DECRYPT_FUNC( PK ), \ |
| 208 | MBEDTLS_PK_INFO_ENCRYPT_FUNC( PK ), \ |
| 209 | MBEDTLS_PK_INFO_CHECK_PAIR_FUNC( PK ), \ |
| 210 | MBEDTLS_PK_INFO_CTX_ALLOC_FUNC( PK ), \ |
| 211 | MBEDTLS_PK_INFO_CTX_FREE_FUNC( PK ), \ |
| 212 | MBEDTLS_PK_INFO_DEBUG_FUNC( PK ), \ |
| 213 | } |
| 214 | #endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */ |
| 215 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 216 | #if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) |
Manuel Pégourié-Gonnard | 12c1ff0 | 2013-08-21 12:28:31 +0200 | [diff] [blame] | 217 | /* Container for RSA-alt */ |
| 218 | typedef struct |
| 219 | { |
| 220 | void *key; |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 221 | mbedtls_pk_rsa_alt_decrypt_func decrypt_func; |
| 222 | mbedtls_pk_rsa_alt_sign_func sign_func; |
| 223 | mbedtls_pk_rsa_alt_key_len_func key_len_func; |
| 224 | } mbedtls_rsa_alt_context; |
Manuel Pégourié-Gonnard | 348bcb3 | 2015-03-31 14:01:33 +0200 | [diff] [blame] | 225 | #endif |
Manuel Pégourié-Gonnard | 12c1ff0 | 2013-08-21 12:28:31 +0200 | [diff] [blame] | 226 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 227 | #if defined(MBEDTLS_RSA_C) |
| 228 | extern const mbedtls_pk_info_t mbedtls_rsa_info; |
Manuel Pégourié-Gonnard | d73b3c1 | 2013-08-12 17:06:05 +0200 | [diff] [blame] | 229 | #endif |
| 230 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 231 | #if defined(MBEDTLS_ECP_C) |
| 232 | extern const mbedtls_pk_info_t mbedtls_eckey_info; |
| 233 | extern const mbedtls_pk_info_t mbedtls_eckeydh_info; |
Manuel Pégourié-Gonnard | d73b3c1 | 2013-08-12 17:06:05 +0200 | [diff] [blame] | 234 | #endif |
| 235 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 236 | #if defined(MBEDTLS_ECDSA_C) |
| 237 | extern const mbedtls_pk_info_t mbedtls_ecdsa_info; |
Manuel Pégourié-Gonnard | d73b3c1 | 2013-08-12 17:06:05 +0200 | [diff] [blame] | 238 | #endif |
| 239 | |
Jarno Lamsa | 42b83db | 2019-04-16 16:48:22 +0300 | [diff] [blame] | 240 | #if defined(MBEDTLS_USE_TINYCRYPT) |
Hanno Becker | adf11e1 | 2019-08-21 13:03:44 +0100 | [diff] [blame] | 241 | extern const mbedtls_pk_info_t mbedtls_uecc_eckey_info; |
Jarno Lamsa | 42b83db | 2019-04-16 16:48:22 +0300 | [diff] [blame] | 242 | #endif |
| 243 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 244 | #if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) |
| 245 | extern const mbedtls_pk_info_t mbedtls_rsa_alt_info; |
Manuel Pégourié-Gonnard | 348bcb3 | 2015-03-31 14:01:33 +0200 | [diff] [blame] | 246 | #endif |
Manuel Pégourié-Gonnard | 12c1ff0 | 2013-08-21 12:28:31 +0200 | [diff] [blame] | 247 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 248 | #endif /* MBEDTLS_PK_WRAP_H */ |