blob: c0ad10d01d01695db803efd51480c872de2b79c8 [file] [log] [blame]
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +02001/*
2 * Public Key abstraction layer: wrapper functions
3 *
Paul Bakker7dc4c442014-02-01 22:50:26 +01004 * Copyright (C) 2006-2014, Brainspark B.V.
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +02005 *
6 * This file is part of PolarSSL (http://www.polarssl.org)
7 * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
8 *
9 * All rights reserved.
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 */
25
Manuel Pégourié-Gonnardcef4ad22014-04-29 12:39:06 +020026#if !defined(POLARSSL_CONFIG_FILE)
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +020027#include "polarssl/config.h"
Manuel Pégourié-Gonnardcef4ad22014-04-29 12:39:06 +020028#else
29#include POLARSSL_CONFIG_FILE
30#endif
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +020031
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +020032#if defined(POLARSSL_PK_C)
33
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +020034#include "polarssl/pk_wrap.h"
35
Manuel Pégourié-Gonnarde511ffc2013-08-22 17:33:21 +020036/* Even if RSA not activated, for the sake of RSA-alt */
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +020037#include "polarssl/rsa.h"
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +020038
39#if defined(POLARSSL_ECP_C)
40#include "polarssl/ecp.h"
41#endif
42
43#if defined(POLARSSL_ECDSA_C)
44#include "polarssl/ecdsa.h"
45#endif
46
Paul Bakker7dc4c442014-02-01 22:50:26 +010047#if defined(POLARSSL_PLATFORM_C)
48#include "polarssl/platform.h"
Manuel Pégourié-Gonnard765db072013-08-14 15:00:27 +020049#else
50#include <stdlib.h>
51#define polarssl_malloc malloc
52#define polarssl_free free
53#endif
54
Manuel Pégourié-Gonnarde511ffc2013-08-22 17:33:21 +020055/* Used by RSA-alt too */
Manuel Pégourié-Gonnardf18c3e02013-08-12 18:41:18 +020056static int rsa_can_do( pk_type_t type )
57{
58 return( type == POLARSSL_PK_RSA );
59}
60
Manuel Pégourié-Gonnarde511ffc2013-08-22 17:33:21 +020061#if defined(POLARSSL_RSA_C)
Manuel Pégourié-Gonnard12c1ff02013-08-21 12:28:31 +020062static size_t rsa_get_size( const void *ctx )
Manuel Pégourié-Gonnardf8c948a2013-08-12 19:45:32 +020063{
Paul Bakker8fc30b12013-11-25 13:29:43 +010064 return( 8 * ((const rsa_context *) ctx)->len );
Manuel Pégourié-Gonnardf8c948a2013-08-12 19:45:32 +020065}
66
Manuel Pégourié-Gonnardf73da022013-08-17 14:36:32 +020067static int rsa_verify_wrap( void *ctx, md_type_t md_alg,
68 const unsigned char *hash, size_t hash_len,
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +020069 const unsigned char *sig, size_t sig_len )
70{
Manuel Pégourié-Gonnard2abed842014-04-08 12:40:15 +020071 int ret;
72
73 if( sig_len < ((rsa_context *) ctx)->len )
Manuel Pégourié-Gonnardac4cd362013-08-14 20:20:41 +020074 return( POLARSSL_ERR_RSA_VERIFY_FAILED );
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +020075
Manuel Pégourié-Gonnard2abed842014-04-08 12:40:15 +020076 if( ( ret = rsa_pkcs1_verify( (rsa_context *) ctx, NULL, NULL,
77 RSA_PUBLIC, md_alg,
78 (unsigned int) hash_len, hash, sig ) ) != 0 )
79 return( ret );
80
81 if( sig_len > ((rsa_context *) ctx)->len )
82 return( POLARSSL_ERR_PK_SIG_LEN_MISMATCH );
83
84 return( 0 );
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +020085}
86
Manuel Pégourié-Gonnard8df27692013-08-21 10:34:38 +020087static int rsa_sign_wrap( void *ctx, md_type_t md_alg,
88 const unsigned char *hash, size_t hash_len,
89 unsigned char *sig, size_t *sig_len,
90 int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
91{
92 *sig_len = ((rsa_context *) ctx)->len;
93
94 return( rsa_pkcs1_sign( (rsa_context *) ctx, f_rng, p_rng, RSA_PRIVATE,
Paul Bakkerb9cfaa02013-10-11 18:58:55 +020095 md_alg, (unsigned int) hash_len, hash, sig ) );
Manuel Pégourié-Gonnard8df27692013-08-21 10:34:38 +020096}
97
Manuel Pégourié-Gonnarda2d3f222013-08-21 11:51:08 +020098static int rsa_decrypt_wrap( void *ctx,
99 const unsigned char *input, size_t ilen,
100 unsigned char *output, size_t *olen, size_t osize,
101 int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
102{
Manuel Pégourié-Gonnarda2d3f222013-08-21 11:51:08 +0200103 if( ilen != ((rsa_context *) ctx)->len )
104 return( POLARSSL_ERR_RSA_BAD_INPUT_DATA );
105
Paul Bakker548957d2013-08-30 10:30:02 +0200106 return( rsa_pkcs1_decrypt( (rsa_context *) ctx, f_rng, p_rng,
Manuel Pégourié-Gonnarda2d3f222013-08-21 11:51:08 +0200107 RSA_PRIVATE, olen, input, output, osize ) );
108}
109
110static int rsa_encrypt_wrap( void *ctx,
111 const unsigned char *input, size_t ilen,
112 unsigned char *output, size_t *olen, size_t osize,
113 int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
114{
115 ((void) osize);
116
117 *olen = ((rsa_context *) ctx)->len;
118
119 return( rsa_pkcs1_encrypt( (rsa_context *) ctx,
120 f_rng, p_rng, RSA_PUBLIC, ilen, input, output ) );
121}
122
Manuel Pégourié-Gonnard765db072013-08-14 15:00:27 +0200123static void *rsa_alloc_wrap( void )
124{
125 void *ctx = polarssl_malloc( sizeof( rsa_context ) );
126
127 if( ctx != NULL )
128 rsa_init( (rsa_context *) ctx, 0, 0 );
129
130 return ctx;
131}
132
133static void rsa_free_wrap( void *ctx )
134{
135 rsa_free( (rsa_context *) ctx );
136 polarssl_free( ctx );
137}
138
Manuel Pégourié-Gonnardc6ac8872013-08-14 18:04:18 +0200139static void rsa_debug( const void *ctx, pk_debug_item *items )
140{
141 items->type = POLARSSL_PK_DEBUG_MPI;
142 items->name = "rsa.N";
143 items->value = &( ((rsa_context *) ctx)->N );
144
145 items++;
146
147 items->type = POLARSSL_PK_DEBUG_MPI;
148 items->name = "rsa.E";
149 items->value = &( ((rsa_context *) ctx)->E );
150}
151
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +0200152const pk_info_t rsa_info = {
153 POLARSSL_PK_RSA,
Manuel Pégourié-Gonnardf8c948a2013-08-12 19:45:32 +0200154 "RSA",
155 rsa_get_size,
Manuel Pégourié-Gonnardf18c3e02013-08-12 18:41:18 +0200156 rsa_can_do,
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +0200157 rsa_verify_wrap,
Manuel Pégourié-Gonnard8df27692013-08-21 10:34:38 +0200158 rsa_sign_wrap,
Manuel Pégourié-Gonnarda2d3f222013-08-21 11:51:08 +0200159 rsa_decrypt_wrap,
160 rsa_encrypt_wrap,
Manuel Pégourié-Gonnard765db072013-08-14 15:00:27 +0200161 rsa_alloc_wrap,
162 rsa_free_wrap,
Manuel Pégourié-Gonnardc6ac8872013-08-14 18:04:18 +0200163 rsa_debug,
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +0200164};
165#endif /* POLARSSL_RSA_C */
166
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +0200167#if defined(POLARSSL_ECP_C)
Manuel Pégourié-Gonnard835eb592013-08-12 18:51:26 +0200168/*
169 * Generic EC key
170 */
Manuel Pégourié-Gonnardf18c3e02013-08-12 18:41:18 +0200171static int eckey_can_do( pk_type_t type )
172{
173 return( type == POLARSSL_PK_ECKEY ||
174 type == POLARSSL_PK_ECKEY_DH ||
175 type == POLARSSL_PK_ECDSA );
176}
177
Manuel Pégourié-Gonnardb3d91872013-08-14 15:56:19 +0200178static size_t eckey_get_size( const void *ctx )
Manuel Pégourié-Gonnardf8c948a2013-08-12 19:45:32 +0200179{
180 return( ((ecp_keypair *) ctx)->grp.pbits );
181}
182
Manuel Pégourié-Gonnard09162dd2013-08-14 18:16:50 +0200183#if defined(POLARSSL_ECDSA_C)
Manuel Pégourié-Gonnard8df27692013-08-21 10:34:38 +0200184/* Forward declarations */
Manuel Pégourié-Gonnardf73da022013-08-17 14:36:32 +0200185static int ecdsa_verify_wrap( void *ctx, md_type_t md_alg,
186 const unsigned char *hash, size_t hash_len,
Manuel Pégourié-Gonnard09162dd2013-08-14 18:16:50 +0200187 const unsigned char *sig, size_t sig_len );
Manuel Pégourié-Gonnard09162dd2013-08-14 18:16:50 +0200188
Manuel Pégourié-Gonnard8df27692013-08-21 10:34:38 +0200189static int ecdsa_sign_wrap( void *ctx, md_type_t md_alg,
190 const unsigned char *hash, size_t hash_len,
191 unsigned char *sig, size_t *sig_len,
192 int (*f_rng)(void *, unsigned char *, size_t), void *p_rng );
193
Manuel Pégourié-Gonnardf73da022013-08-17 14:36:32 +0200194static int eckey_verify_wrap( void *ctx, md_type_t md_alg,
195 const unsigned char *hash, size_t hash_len,
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +0200196 const unsigned char *sig, size_t sig_len )
197{
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +0200198 int ret;
199 ecdsa_context ecdsa;
200
201 ecdsa_init( &ecdsa );
202
Manuel Pégourié-Gonnard583b6082013-08-20 16:58:13 +0200203 if( ( ret = ecdsa_from_keypair( &ecdsa, ctx ) ) == 0 )
204 ret = ecdsa_verify_wrap( &ecdsa, md_alg, hash, hash_len, sig, sig_len );
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +0200205
206 ecdsa_free( &ecdsa );
207
208 return( ret );
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +0200209}
Manuel Pégourié-Gonnard8df27692013-08-21 10:34:38 +0200210
211static int eckey_sign_wrap( void *ctx, md_type_t md_alg,
212 const unsigned char *hash, size_t hash_len,
213 unsigned char *sig, size_t *sig_len,
214 int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
215{
216 int ret;
217 ecdsa_context ecdsa;
218
219 ecdsa_init( &ecdsa );
220
221 if( ( ret = ecdsa_from_keypair( &ecdsa, ctx ) ) == 0 )
222 ret = ecdsa_sign_wrap( &ecdsa, md_alg, hash, hash_len, sig, sig_len,
223 f_rng, p_rng );
224
225 ecdsa_free( &ecdsa );
226
227 return( ret );
228}
229
Manuel Pégourié-Gonnardfff80f82013-08-17 15:20:06 +0200230#endif /* POLARSSL_ECDSA_C */
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +0200231
Manuel Pégourié-Gonnard765db072013-08-14 15:00:27 +0200232static void *eckey_alloc_wrap( void )
233{
234 void *ctx = polarssl_malloc( sizeof( ecp_keypair ) );
235
236 if( ctx != NULL )
237 ecp_keypair_init( ctx );
238
239 return( ctx );
240}
241
242static void eckey_free_wrap( void *ctx )
243{
244 ecp_keypair_free( (ecp_keypair *) ctx );
245 polarssl_free( ctx );
246}
247
Manuel Pégourié-Gonnardc6ac8872013-08-14 18:04:18 +0200248static void eckey_debug( const void *ctx, pk_debug_item *items )
249{
250 items->type = POLARSSL_PK_DEBUG_ECP;
251 items->name = "eckey.Q";
252 items->value = &( ((ecp_keypair *) ctx)->Q );
253}
254
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +0200255const pk_info_t eckey_info = {
256 POLARSSL_PK_ECKEY,
Manuel Pégourié-Gonnardf8c948a2013-08-12 19:45:32 +0200257 "EC",
258 eckey_get_size,
Manuel Pégourié-Gonnardf18c3e02013-08-12 18:41:18 +0200259 eckey_can_do,
Manuel Pégourié-Gonnardfff80f82013-08-17 15:20:06 +0200260#if defined(POLARSSL_ECDSA_C)
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +0200261 eckey_verify_wrap,
Manuel Pégourié-Gonnard8df27692013-08-21 10:34:38 +0200262 eckey_sign_wrap,
Manuel Pégourié-Gonnardfff80f82013-08-17 15:20:06 +0200263#else
264 NULL,
Manuel Pégourié-Gonnard8df27692013-08-21 10:34:38 +0200265 NULL,
Manuel Pégourié-Gonnardfff80f82013-08-17 15:20:06 +0200266#endif
Manuel Pégourié-Gonnarda2d3f222013-08-21 11:51:08 +0200267 NULL,
268 NULL,
Manuel Pégourié-Gonnard765db072013-08-14 15:00:27 +0200269 eckey_alloc_wrap,
270 eckey_free_wrap,
Manuel Pégourié-Gonnardc6ac8872013-08-14 18:04:18 +0200271 eckey_debug,
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +0200272};
Manuel Pégourié-Gonnard835eb592013-08-12 18:51:26 +0200273
274/*
Paul Bakker75342a62014-04-08 17:35:40 +0200275 * EC key restricted to ECDH
Manuel Pégourié-Gonnard835eb592013-08-12 18:51:26 +0200276 */
277static int eckeydh_can_do( pk_type_t type )
278{
279 return( type == POLARSSL_PK_ECKEY ||
280 type == POLARSSL_PK_ECKEY_DH );
281}
282
Manuel Pégourié-Gonnard835eb592013-08-12 18:51:26 +0200283const pk_info_t eckeydh_info = {
284 POLARSSL_PK_ECKEY_DH,
Manuel Pégourié-Gonnardf8c948a2013-08-12 19:45:32 +0200285 "EC_DH",
286 eckey_get_size, /* Same underlying key structure */
Manuel Pégourié-Gonnard835eb592013-08-12 18:51:26 +0200287 eckeydh_can_do,
Manuel Pégourié-Gonnardfff80f82013-08-17 15:20:06 +0200288 NULL,
Manuel Pégourié-Gonnard8df27692013-08-21 10:34:38 +0200289 NULL,
Manuel Pégourié-Gonnarda2d3f222013-08-21 11:51:08 +0200290 NULL,
291 NULL,
Manuel Pégourié-Gonnard765db072013-08-14 15:00:27 +0200292 eckey_alloc_wrap, /* Same underlying key structure */
293 eckey_free_wrap, /* Same underlying key structure */
Manuel Pégourié-Gonnard09162dd2013-08-14 18:16:50 +0200294 eckey_debug, /* Same underlying key structure */
Manuel Pégourié-Gonnard835eb592013-08-12 18:51:26 +0200295};
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +0200296#endif /* POLARSSL_ECP_C */
Manuel Pégourié-Gonnard09162dd2013-08-14 18:16:50 +0200297
298#if defined(POLARSSL_ECDSA_C)
299static int ecdsa_can_do( pk_type_t type )
300{
301 return( type == POLARSSL_PK_ECDSA );
302}
303
Manuel Pégourié-Gonnardf73da022013-08-17 14:36:32 +0200304static int ecdsa_verify_wrap( void *ctx, md_type_t md_alg,
305 const unsigned char *hash, size_t hash_len,
Manuel Pégourié-Gonnard09162dd2013-08-14 18:16:50 +0200306 const unsigned char *sig, size_t sig_len )
307{
Manuel Pégourié-Gonnard2abed842014-04-08 12:40:15 +0200308 int ret;
Manuel Pégourié-Gonnardf73da022013-08-17 14:36:32 +0200309 ((void) md_alg);
310
Manuel Pégourié-Gonnard2abed842014-04-08 12:40:15 +0200311 ret = ecdsa_read_signature( (ecdsa_context *) ctx,
312 hash, hash_len, sig, sig_len );
313
314 if( ret == POLARSSL_ERR_ECP_SIG_LEN_MISMATCH )
315 return( POLARSSL_ERR_PK_SIG_LEN_MISMATCH );
316
317 return( ret );
Manuel Pégourié-Gonnard09162dd2013-08-14 18:16:50 +0200318}
319
Manuel Pégourié-Gonnard8df27692013-08-21 10:34:38 +0200320static int ecdsa_sign_wrap( void *ctx, md_type_t md_alg,
321 const unsigned char *hash, size_t hash_len,
322 unsigned char *sig, size_t *sig_len,
323 int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
324{
Manuel Pégourié-Gonnard65ad3e42014-01-06 16:57:24 +0100325 /* Use deterministic ECDSA by default if available */
326#if defined(POLARSSL_ECDSA_DETERMINISTIC)
327 ((void) f_rng);
328 ((void) p_rng);
329
330 return( ecdsa_write_signature_det( (ecdsa_context *) ctx,
331 hash, hash_len, sig, sig_len, md_alg ) );
332#else
Manuel Pégourié-Gonnard8df27692013-08-21 10:34:38 +0200333 ((void) md_alg);
334
335 return( ecdsa_write_signature( (ecdsa_context *) ctx,
336 hash, hash_len, sig, sig_len, f_rng, p_rng ) );
Paul Bakker9af723c2014-05-01 13:03:14 +0200337#endif /* POLARSSL_ECDSA_DETERMINISTIC */
Manuel Pégourié-Gonnard8df27692013-08-21 10:34:38 +0200338}
339
Manuel Pégourié-Gonnard09162dd2013-08-14 18:16:50 +0200340static void *ecdsa_alloc_wrap( void )
341{
342 void *ctx = polarssl_malloc( sizeof( ecdsa_context ) );
343
344 if( ctx != NULL )
345 ecdsa_init( (ecdsa_context *) ctx );
346
347 return( ctx );
348}
349
350static void ecdsa_free_wrap( void *ctx )
351{
352 ecdsa_free( (ecdsa_context *) ctx );
353 polarssl_free( ctx );
354}
355
356const pk_info_t ecdsa_info = {
357 POLARSSL_PK_ECDSA,
358 "ECDSA",
359 eckey_get_size, /* Compatible key structures */
360 ecdsa_can_do,
361 ecdsa_verify_wrap,
Manuel Pégourié-Gonnard8df27692013-08-21 10:34:38 +0200362 ecdsa_sign_wrap,
Manuel Pégourié-Gonnarda2d3f222013-08-21 11:51:08 +0200363 NULL,
364 NULL,
Manuel Pégourié-Gonnard09162dd2013-08-14 18:16:50 +0200365 ecdsa_alloc_wrap,
366 ecdsa_free_wrap,
367 eckey_debug, /* Compatible key structures */
368};
369#endif /* POLARSSL_ECDSA_C */
Manuel Pégourié-Gonnard12c1ff02013-08-21 12:28:31 +0200370
371/*
372 * Support for alternative RSA-private implementations
373 */
374
375static size_t rsa_alt_get_size( const void *ctx )
376{
Paul Bakker8fc30b12013-11-25 13:29:43 +0100377 const rsa_alt_context *rsa_alt = (const rsa_alt_context *) ctx;
Manuel Pégourié-Gonnard12c1ff02013-08-21 12:28:31 +0200378
Manuel Pégourié-Gonnard01488752014-04-03 22:09:18 +0200379 return( 8 * rsa_alt->key_len_func( rsa_alt->key ) );
Manuel Pégourié-Gonnard12c1ff02013-08-21 12:28:31 +0200380}
381
382static int rsa_alt_sign_wrap( void *ctx, md_type_t md_alg,
383 const unsigned char *hash, size_t hash_len,
384 unsigned char *sig, size_t *sig_len,
385 int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
386{
387 rsa_alt_context *rsa_alt = (rsa_alt_context *) ctx;
388
389 *sig_len = rsa_alt->key_len_func( rsa_alt->key );
390
391 return( rsa_alt->sign_func( rsa_alt->key, f_rng, p_rng, RSA_PRIVATE,
Paul Bakkerb9cfaa02013-10-11 18:58:55 +0200392 md_alg, (unsigned int) hash_len, hash, sig ) );
Manuel Pégourié-Gonnard12c1ff02013-08-21 12:28:31 +0200393}
394
395static int rsa_alt_decrypt_wrap( void *ctx,
396 const unsigned char *input, size_t ilen,
397 unsigned char *output, size_t *olen, size_t osize,
398 int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
399{
400 rsa_alt_context *rsa_alt = (rsa_alt_context *) ctx;
401
402 ((void) f_rng);
403 ((void) p_rng);
404
405 if( ilen != rsa_alt->key_len_func( rsa_alt->key ) )
406 return( POLARSSL_ERR_RSA_BAD_INPUT_DATA );
407
408 return( rsa_alt->decrypt_func( rsa_alt->key,
409 RSA_PRIVATE, olen, input, output, osize ) );
410}
411
412static void *rsa_alt_alloc_wrap( void )
413{
414 void *ctx = polarssl_malloc( sizeof( rsa_alt_context ) );
415
416 if( ctx != NULL )
417 memset( ctx, 0, sizeof( rsa_alt_context ) );
418
419 return ctx;
420}
421
422static void rsa_alt_free_wrap( void *ctx )
423{
424 polarssl_free( ctx );
425}
426
427const pk_info_t rsa_alt_info = {
428 POLARSSL_PK_RSA_ALT,
429 "RSA-alt",
430 rsa_alt_get_size,
431 rsa_can_do,
432 NULL,
433 rsa_alt_sign_wrap,
434 rsa_alt_decrypt_wrap,
435 NULL,
436 rsa_alt_alloc_wrap,
437 rsa_alt_free_wrap,
438 NULL,
439};
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +0200440
441#endif /* POLARSSL_PK_C */