blob: 0a430949326825bc5c214035e1d63d408eb6c4f8 [file] [log] [blame]
Paul Bakker5121ce52009-01-03 21:22:43 +00001/*
2 * Benchmark demonstration program
3 *
Paul Bakkercce9d772011-11-18 14:26:47 +00004 * Copyright (C) 2006-2011, Brainspark B.V.
Paul Bakkerb96f1542010-07-18 20:36:00 +00005 *
6 * This file is part of PolarSSL (http://www.polarssl.org)
Paul Bakker84f12b72010-07-18 10:13:04 +00007 * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
Paul Bakkerb96f1542010-07-18 20:36:00 +00008 *
Paul Bakker77b385e2009-07-28 17:23:11 +00009 * All rights reserved.
Paul Bakkere0ccd0a2009-01-04 16:27:10 +000010 *
Paul Bakker5121ce52009-01-03 21:22:43 +000011 * 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
26#ifndef _CRT_SECURE_NO_DEPRECATE
27#define _CRT_SECURE_NO_DEPRECATE 1
28#endif
29
30#include <string.h>
31#include <stdlib.h>
32#include <stdio.h>
33
Paul Bakker40e46942009-01-03 21:51:57 +000034#include "polarssl/config.h"
Paul Bakker5121ce52009-01-03 21:22:43 +000035
Paul Bakker40e46942009-01-03 21:51:57 +000036#include "polarssl/md4.h"
37#include "polarssl/md5.h"
38#include "polarssl/sha1.h"
39#include "polarssl/sha2.h"
Paul Bakker026c03b2009-03-28 17:53:03 +000040#include "polarssl/sha4.h"
Paul Bakker40e46942009-01-03 21:51:57 +000041#include "polarssl/arc4.h"
42#include "polarssl/des.h"
43#include "polarssl/aes.h"
Paul Bakker38119b12009-01-10 23:31:23 +000044#include "polarssl/camellia.h"
Paul Bakker89e80c92012-03-20 13:50:09 +000045#include "polarssl/gcm.h"
Paul Bakker40e46942009-01-03 21:51:57 +000046#include "polarssl/rsa.h"
47#include "polarssl/timing.h"
Paul Bakker02faf452011-11-29 11:23:58 +000048#include "polarssl/havege.h"
49#include "polarssl/ctr_drbg.h"
Paul Bakker5121ce52009-01-03 21:22:43 +000050
Paul Bakker02faf452011-11-29 11:23:58 +000051#define BUFSIZE 1024
52#define HEADER_FORMAT " %-15s : "
Paul Bakker5121ce52009-01-03 21:22:43 +000053
Paul Bakkera3d195c2011-11-27 21:07:34 +000054static int myrand( void *rng_state, unsigned char *output, size_t len )
Paul Bakker5121ce52009-01-03 21:22:43 +000055{
Paul Bakkera3d195c2011-11-27 21:07:34 +000056 size_t use_len;
57 int rnd;
58
Paul Bakker5121ce52009-01-03 21:22:43 +000059 if( rng_state != NULL )
60 rng_state = NULL;
61
Paul Bakkera3d195c2011-11-27 21:07:34 +000062 while( len > 0 )
63 {
64 use_len = len;
65 if( use_len > sizeof(int) )
66 use_len = sizeof(int);
67
68 rnd = rand();
69 memcpy( output, &rnd, use_len );
70 output += use_len;
71 len -= use_len;
72 }
73
74 return( 0 );
Paul Bakker5121ce52009-01-03 21:22:43 +000075}
76
77unsigned char buf[BUFSIZE];
78
Paul Bakker5690efc2011-05-26 13:16:06 +000079#if !defined(POLARSSL_TIMING_C)
Paul Bakkercce9d772011-11-18 14:26:47 +000080int main( int argc, char *argv[] )
Paul Bakker5690efc2011-05-26 13:16:06 +000081{
Paul Bakkercce9d772011-11-18 14:26:47 +000082 ((void) argc);
83 ((void) argv);
84
Paul Bakker5690efc2011-05-26 13:16:06 +000085 printf("POLARSSL_TIMING_C not defined.\n");
86 return( 0 );
87}
88#else
Paul Bakkercce9d772011-11-18 14:26:47 +000089int main( int argc, char *argv[] )
Paul Bakker5121ce52009-01-03 21:22:43 +000090{
91 int keysize;
92 unsigned long i, j, tsc;
Paul Bakker5a0aa772009-02-09 22:38:52 +000093 unsigned char tmp[64];
Paul Bakker40e46942009-01-03 21:51:57 +000094#if defined(POLARSSL_ARC4_C)
Paul Bakker5121ce52009-01-03 21:22:43 +000095 arc4_context arc4;
96#endif
Paul Bakker40e46942009-01-03 21:51:57 +000097#if defined(POLARSSL_DES_C)
Paul Bakker5121ce52009-01-03 21:22:43 +000098 des3_context des3;
99 des_context des;
100#endif
Paul Bakker40e46942009-01-03 21:51:57 +0000101#if defined(POLARSSL_AES_C)
Paul Bakker5121ce52009-01-03 21:22:43 +0000102 aes_context aes;
Paul Bakker89e80c92012-03-20 13:50:09 +0000103#if defined(POLARSSL_GCM_C)
104 gcm_context gcm;
105#endif
Paul Bakker5121ce52009-01-03 21:22:43 +0000106#endif
Paul Bakker38119b12009-01-10 23:31:23 +0000107#if defined(POLARSSL_CAMELLIA_C)
108 camellia_context camellia;
109#endif
Paul Bakker5690efc2011-05-26 13:16:06 +0000110#if defined(POLARSSL_RSA_C) && defined(POLARSSL_BIGNUM_C) && \
111 defined(POLARSSL_GENPRIME)
Paul Bakker5121ce52009-01-03 21:22:43 +0000112 rsa_context rsa;
113#endif
Paul Bakker02faf452011-11-29 11:23:58 +0000114#if defined(POLARSSL_HAVEGE_C)
115 havege_state hs;
116#endif
117#if defined(POLARSSL_CTR_DRBG_C)
118 ctr_drbg_context ctr_drbg;
119#endif
Paul Bakkercce9d772011-11-18 14:26:47 +0000120 ((void) argc);
121 ((void) argv);
122
Paul Bakker5121ce52009-01-03 21:22:43 +0000123 memset( buf, 0xAA, sizeof( buf ) );
124
125 printf( "\n" );
126
Paul Bakker40e46942009-01-03 21:51:57 +0000127#if defined(POLARSSL_MD4_C)
Paul Bakker02faf452011-11-29 11:23:58 +0000128 printf( HEADER_FORMAT, "MD4" );
Paul Bakker5121ce52009-01-03 21:22:43 +0000129 fflush( stdout );
130
131 set_alarm( 1 );
132 for( i = 1; ! alarmed; i++ )
133 md4( buf, BUFSIZE, tmp );
134
135 tsc = hardclock();
136 for( j = 0; j < 1024; j++ )
137 md4( buf, BUFSIZE, tmp );
138
139 printf( "%9lu Kb/s, %9lu cycles/byte\n", i * BUFSIZE / 1024,
140 ( hardclock() - tsc ) / ( j * BUFSIZE ) );
141#endif
142
Paul Bakker40e46942009-01-03 21:51:57 +0000143#if defined(POLARSSL_MD5_C)
Paul Bakker02faf452011-11-29 11:23:58 +0000144 printf( HEADER_FORMAT, "MD5" );
Paul Bakker5121ce52009-01-03 21:22:43 +0000145 fflush( stdout );
146
147 set_alarm( 1 );
148 for( i = 1; ! alarmed; i++ )
149 md5( buf, BUFSIZE, tmp );
150
151 tsc = hardclock();
152 for( j = 0; j < 1024; j++ )
153 md5( buf, BUFSIZE, tmp );
154
155 printf( "%9lu Kb/s, %9lu cycles/byte\n", i * BUFSIZE / 1024,
156 ( hardclock() - tsc ) / ( j * BUFSIZE ) );
157#endif
158
Paul Bakker40e46942009-01-03 21:51:57 +0000159#if defined(POLARSSL_SHA1_C)
Paul Bakker02faf452011-11-29 11:23:58 +0000160 printf( HEADER_FORMAT, "SHA-1" );
Paul Bakker5121ce52009-01-03 21:22:43 +0000161 fflush( stdout );
162
163 set_alarm( 1 );
164 for( i = 1; ! alarmed; i++ )
165 sha1( buf, BUFSIZE, tmp );
166
167 tsc = hardclock();
168 for( j = 0; j < 1024; j++ )
169 sha1( buf, BUFSIZE, tmp );
170
171 printf( "%9lu Kb/s, %9lu cycles/byte\n", i * BUFSIZE / 1024,
172 ( hardclock() - tsc ) / ( j * BUFSIZE ) );
173#endif
174
Paul Bakker40e46942009-01-03 21:51:57 +0000175#if defined(POLARSSL_SHA2_C)
Paul Bakker02faf452011-11-29 11:23:58 +0000176 printf( HEADER_FORMAT, "SHA-256" );
Paul Bakker5121ce52009-01-03 21:22:43 +0000177 fflush( stdout );
178
179 set_alarm( 1 );
180 for( i = 1; ! alarmed; i++ )
181 sha2( buf, BUFSIZE, tmp, 0 );
182
183 tsc = hardclock();
184 for( j = 0; j < 1024; j++ )
185 sha2( buf, BUFSIZE, tmp, 0 );
186
187 printf( "%9lu Kb/s, %9lu cycles/byte\n", i * BUFSIZE / 1024,
188 ( hardclock() - tsc ) / ( j * BUFSIZE ) );
189#endif
190
Paul Bakker3a3c3c22009-02-09 22:33:30 +0000191#if defined(POLARSSL_SHA4_C)
Paul Bakker02faf452011-11-29 11:23:58 +0000192 printf( HEADER_FORMAT, "SHA-512" );
Paul Bakker3a3c3c22009-02-09 22:33:30 +0000193 fflush( stdout );
194
195 set_alarm( 1 );
196 for( i = 1; ! alarmed; i++ )
197 sha4( buf, BUFSIZE, tmp, 0 );
198
199 tsc = hardclock();
200 for( j = 0; j < 1024; j++ )
201 sha4( buf, BUFSIZE, tmp, 0 );
202
203 printf( "%9lu Kb/s, %9lu cycles/byte\n", i * BUFSIZE / 1024,
204 ( hardclock() - tsc ) / ( j * BUFSIZE ) );
205#endif
206
Paul Bakker40e46942009-01-03 21:51:57 +0000207#if defined(POLARSSL_ARC4_C)
Paul Bakker02faf452011-11-29 11:23:58 +0000208 printf( HEADER_FORMAT, "ARC4" );
Paul Bakker5121ce52009-01-03 21:22:43 +0000209 fflush( stdout );
210
211 arc4_setup( &arc4, tmp, 32 );
212
213 set_alarm( 1 );
214 for( i = 1; ! alarmed; i++ )
Paul Bakkerbaad6502010-03-21 15:42:15 +0000215 arc4_crypt( &arc4, BUFSIZE, buf, buf );
Paul Bakker5121ce52009-01-03 21:22:43 +0000216
217 tsc = hardclock();
218 for( j = 0; j < 1024; j++ )
Paul Bakkerbaad6502010-03-21 15:42:15 +0000219 arc4_crypt( &arc4, BUFSIZE, buf, buf );
Paul Bakker5121ce52009-01-03 21:22:43 +0000220
221 printf( "%9lu Kb/s, %9lu cycles/byte\n", i * BUFSIZE / 1024,
222 ( hardclock() - tsc ) / ( j * BUFSIZE ) );
223#endif
224
Paul Bakker40e46942009-01-03 21:51:57 +0000225#if defined(POLARSSL_DES_C)
Paul Bakker02faf452011-11-29 11:23:58 +0000226 printf( HEADER_FORMAT, "3DES" );
Paul Bakker5121ce52009-01-03 21:22:43 +0000227 fflush( stdout );
228
229 des3_set3key_enc( &des3, tmp );
230
231 set_alarm( 1 );
232 for( i = 1; ! alarmed; i++ )
233 des3_crypt_cbc( &des3, DES_ENCRYPT, BUFSIZE, tmp, buf, buf );
234
235 tsc = hardclock();
236 for( j = 0; j < 1024; j++ )
237 des3_crypt_cbc( &des3, DES_ENCRYPT, BUFSIZE, tmp, buf, buf );
238
239 printf( "%9lu Kb/s, %9lu cycles/byte\n", i * BUFSIZE / 1024,
240 ( hardclock() - tsc ) / ( j * BUFSIZE ) );
241
Paul Bakker02faf452011-11-29 11:23:58 +0000242 printf( HEADER_FORMAT, "DES" );
Paul Bakker5121ce52009-01-03 21:22:43 +0000243 fflush( stdout );
244
245 des_setkey_enc( &des, tmp );
246
247 set_alarm( 1 );
248 for( i = 1; ! alarmed; i++ )
249 des_crypt_cbc( &des, DES_ENCRYPT, BUFSIZE, tmp, buf, buf );
250
251 tsc = hardclock();
252 for( j = 0; j < 1024; j++ )
253 des_crypt_cbc( &des, DES_ENCRYPT, BUFSIZE, tmp, buf, buf );
254
255 printf( "%9lu Kb/s, %9lu cycles/byte\n", i * BUFSIZE / 1024,
256 ( hardclock() - tsc ) / ( j * BUFSIZE ) );
257#endif
258
Paul Bakker40e46942009-01-03 21:51:57 +0000259#if defined(POLARSSL_AES_C)
Paul Bakker5121ce52009-01-03 21:22:43 +0000260 for( keysize = 128; keysize <= 256; keysize += 64 )
261 {
Paul Bakker89e80c92012-03-20 13:50:09 +0000262 printf( " AES-CBC-%d : ", keysize );
Paul Bakker5121ce52009-01-03 21:22:43 +0000263 fflush( stdout );
264
265 memset( buf, 0, sizeof( buf ) );
266 memset( tmp, 0, sizeof( tmp ) );
267 aes_setkey_enc( &aes, tmp, keysize );
268
269 set_alarm( 1 );
270
271 for( i = 1; ! alarmed; i++ )
272 aes_crypt_cbc( &aes, AES_ENCRYPT, BUFSIZE, tmp, buf, buf );
273
274 tsc = hardclock();
275 for( j = 0; j < 4096; j++ )
276 aes_crypt_cbc( &aes, AES_ENCRYPT, BUFSIZE, tmp, buf, buf );
277
278 printf( "%9lu Kb/s, %9lu cycles/byte\n", i * BUFSIZE / 1024,
279 ( hardclock() - tsc ) / ( j * BUFSIZE ) );
280 }
Paul Bakker89e80c92012-03-20 13:50:09 +0000281#if defined(POLARSSL_GCM_C)
282 for( keysize = 128; keysize <= 256; keysize += 64 )
283 {
284 printf( " AES-GCM-%d : ", keysize );
285 fflush( stdout );
286
287 memset( buf, 0, sizeof( buf ) );
288 memset( tmp, 0, sizeof( tmp ) );
289 gcm_init( &gcm, tmp, keysize );
290
291 set_alarm( 1 );
292
293 for( i = 1; ! alarmed; i++ )
294 gcm_crypt_and_tag( &gcm, GCM_ENCRYPT, BUFSIZE, tmp, 16, NULL, 0, buf, buf, 16, tmp );
295
296 tsc = hardclock();
297 for( j = 0; j < 4096; j++ )
298 gcm_crypt_and_tag( &gcm, GCM_ENCRYPT, BUFSIZE, tmp, 16, NULL, 0, buf, buf, 16, tmp );
299
300 printf( "%9lu Kb/s, %9lu cycles/byte\n", i * BUFSIZE / 1024,
301 ( hardclock() - tsc ) / ( j * BUFSIZE ) );
302 }
303#endif
Paul Bakker5121ce52009-01-03 21:22:43 +0000304#endif
305
Paul Bakker38119b12009-01-10 23:31:23 +0000306#if defined(POLARSSL_CAMELLIA_C)
307 for( keysize = 128; keysize <= 256; keysize += 64 )
308 {
Paul Bakker89e80c92012-03-20 13:50:09 +0000309 printf( " CAMELLIA-CBC-%d: ", keysize );
Paul Bakker38119b12009-01-10 23:31:23 +0000310 fflush( stdout );
311
312 memset( buf, 0, sizeof( buf ) );
313 memset( tmp, 0, sizeof( tmp ) );
314 camellia_setkey_enc( &camellia, tmp, keysize );
315
316 set_alarm( 1 );
317
318 for( i = 1; ! alarmed; i++ )
319 camellia_crypt_cbc( &camellia, CAMELLIA_ENCRYPT, BUFSIZE, tmp, buf, buf );
320
321 tsc = hardclock();
322 for( j = 0; j < 4096; j++ )
323 camellia_crypt_cbc( &camellia, CAMELLIA_ENCRYPT, BUFSIZE, tmp, buf, buf );
324
325 printf( "%9lu Kb/s, %9lu cycles/byte\n", i * BUFSIZE / 1024,
326 ( hardclock() - tsc ) / ( j * BUFSIZE ) );
327 }
328#endif
329
Paul Bakker02faf452011-11-29 11:23:58 +0000330#if defined(POLARSSL_HAVEGE_C)
331 printf( HEADER_FORMAT, "HAVEGE" );
332 fflush( stdout );
333
334 havege_init( &hs );
335
336 set_alarm( 1 );
337 for( i = 1; ! alarmed; i++ )
338 havege_random( &hs, buf, BUFSIZE );
339
340 tsc = hardclock();
341 for( j = 1; j < 1024; j++ )
342 havege_random( &hs, buf, BUFSIZE );
343
344 printf( "%9lu Kb/s, %9lu cycles/byte\n", i * BUFSIZE / 1024,
345 ( hardclock() - tsc ) / ( j * BUFSIZE ) );
346#endif
347
348#if defined(POLARSSL_CTR_DRBG_C)
349 printf( HEADER_FORMAT, "CTR_DRBG (NOPR)" );
350 fflush( stdout );
351
352 if( ctr_drbg_init( &ctr_drbg, myrand, NULL, NULL, 0 ) != 0 )
353 exit(1);
354
355 set_alarm( 1 );
356 for( i = 1; ! alarmed; i++ )
357 if( ctr_drbg_random( &ctr_drbg, buf, BUFSIZE ) != 0 )
358 exit(1);
359
360 tsc = hardclock();
361 for( j = 1; j < 1024; j++ )
362 if( ctr_drbg_random( &ctr_drbg, buf, BUFSIZE ) != 0 )
363 exit(1);
364
365 printf( "%9lu Kb/s, %9lu cycles/byte\n", i * BUFSIZE / 1024,
366 ( hardclock() - tsc ) / ( j * BUFSIZE ) );
367
368 printf( HEADER_FORMAT, "CTR_DRBG (PR)" );
369 fflush( stdout );
370
371 if( ctr_drbg_init( &ctr_drbg, myrand, NULL, NULL, 0 ) != 0 )
372 exit(1);
373
374 ctr_drbg_set_prediction_resistance( &ctr_drbg, CTR_DRBG_PR_ON );
375
376 set_alarm( 1 );
377 for( i = 1; ! alarmed; i++ )
378 if( ctr_drbg_random( &ctr_drbg, buf, BUFSIZE ) != 0 )
379 exit(1);
380
381 tsc = hardclock();
382 for( j = 1; j < 1024; j++ )
383 if( ctr_drbg_random( &ctr_drbg, buf, BUFSIZE ) != 0 )
384 exit(1);
385
386 printf( "%9lu Kb/s, %9lu cycles/byte\n", i * BUFSIZE / 1024,
387 ( hardclock() - tsc ) / ( j * BUFSIZE ) );
388#endif
389
Paul Bakker5690efc2011-05-26 13:16:06 +0000390#if defined(POLARSSL_RSA_C) && defined(POLARSSL_BIGNUM_C) && \
391 defined(POLARSSL_GENPRIME)
Paul Bakkera802e1a2010-08-16 11:56:45 +0000392 rsa_init( &rsa, RSA_PKCS_V15, 0 );
393 rsa_gen_key( &rsa, myrand, NULL, 1024, 65537 );
Paul Bakker5121ce52009-01-03 21:22:43 +0000394
Paul Bakker02faf452011-11-29 11:23:58 +0000395 printf( HEADER_FORMAT, "RSA-1024" );
Paul Bakker5121ce52009-01-03 21:22:43 +0000396 fflush( stdout );
397 set_alarm( 3 );
398
399 for( i = 1; ! alarmed; i++ )
400 {
401 buf[0] = 0;
402 rsa_public( &rsa, buf, buf );
403 }
404
405 printf( "%9lu public/s\n", i / 3 );
406
Paul Bakker02faf452011-11-29 11:23:58 +0000407 printf( HEADER_FORMAT, "RSA-1024" );
Paul Bakker5121ce52009-01-03 21:22:43 +0000408 fflush( stdout );
409 set_alarm( 3 );
410
411 for( i = 1; ! alarmed; i++ )
412 {
413 buf[0] = 0;
414 rsa_private( &rsa, buf, buf );
415 }
416
Paul Bakker1d4da2e2009-10-25 12:36:53 +0000417 printf( "%9lu private/s\n", i / 3 );
418
419 rsa_free( &rsa );
420
Paul Bakkera802e1a2010-08-16 11:56:45 +0000421 rsa_init( &rsa, RSA_PKCS_V15, 0 );
422 rsa_gen_key( &rsa, myrand, NULL, 2048, 65537 );
Paul Bakker1d4da2e2009-10-25 12:36:53 +0000423
Paul Bakker02faf452011-11-29 11:23:58 +0000424 printf( HEADER_FORMAT, "RSA-2048" );
Paul Bakker1d4da2e2009-10-25 12:36:53 +0000425 fflush( stdout );
426 set_alarm( 3 );
427
428 for( i = 1; ! alarmed; i++ )
429 {
430 buf[0] = 0;
431 rsa_public( &rsa, buf, buf );
432 }
433
434 printf( "%9lu public/s\n", i / 3 );
435
Paul Bakker02faf452011-11-29 11:23:58 +0000436 printf( HEADER_FORMAT, "RSA-2048" );
Paul Bakker1d4da2e2009-10-25 12:36:53 +0000437 fflush( stdout );
438 set_alarm( 3 );
439
440 for( i = 1; ! alarmed; i++ )
441 {
442 buf[0] = 0;
443 rsa_private( &rsa, buf, buf );
444 }
445
446 printf( "%9lu private/s\n", i / 3 );
447
448 rsa_free( &rsa );
449
Paul Bakkera802e1a2010-08-16 11:56:45 +0000450 rsa_init( &rsa, RSA_PKCS_V15, 0 );
451 rsa_gen_key( &rsa, myrand, NULL, 4096, 65537 );
Paul Bakker1d4da2e2009-10-25 12:36:53 +0000452
Paul Bakker02faf452011-11-29 11:23:58 +0000453 printf( HEADER_FORMAT, "RSA-4096" );
Paul Bakker1d4da2e2009-10-25 12:36:53 +0000454 fflush( stdout );
455 set_alarm( 3 );
456
457 for( i = 1; ! alarmed; i++ )
458 {
459 buf[0] = 0;
460 rsa_public( &rsa, buf, buf );
461 }
462
463 printf( "%9lu public/s\n", i / 3 );
464
Paul Bakker02faf452011-11-29 11:23:58 +0000465 printf( HEADER_FORMAT, "RSA-4096" );
Paul Bakker1d4da2e2009-10-25 12:36:53 +0000466 fflush( stdout );
467 set_alarm( 3 );
468
469 for( i = 1; ! alarmed; i++ )
470 {
471 buf[0] = 0;
472 rsa_private( &rsa, buf, buf );
473 }
474
475 printf( "%9lu private/s\n", i / 3 );
Paul Bakker5121ce52009-01-03 21:22:43 +0000476
477 rsa_free( &rsa );
478#endif
479
Paul Bakker1d4da2e2009-10-25 12:36:53 +0000480 printf( "\n" );
481
Paul Bakkercce9d772011-11-18 14:26:47 +0000482#if defined(_WIN32)
Paul Bakker5121ce52009-01-03 21:22:43 +0000483 printf( " Press Enter to exit this program.\n" );
484 fflush( stdout ); getchar();
485#endif
486
487 return( 0 );
488}
Paul Bakker5690efc2011-05-26 13:16:06 +0000489#endif /* POLARSSL_TIMING_C */