blob: 086fd7f44aa07341524f5e0cc17246082b2737c9 [file] [log] [blame]
Paul Bakker5121ce52009-01-03 21:22:43 +00001/*
2 * FIPS-180-1 compliant SHA-1 implementation
3 *
Manuel Pégourié-Gonnarda658a402015-01-23 09:45:19 +00004 * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved
Paul Bakkerb96f1542010-07-18 20:36:00 +00005 *
Manuel Pégourié-Gonnardfe446432015-03-06 13:17:10 +00006 * This file is part of mbed TLS (https://tls.mbed.org)
Paul Bakkerb96f1542010-07-18 20:36:00 +00007 *
Paul Bakker5121ce52009-01-03 21:22:43 +00008 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 */
22/*
23 * The SHA-1 standard was published by NIST in 1993.
24 *
25 * http://www.itl.nist.gov/fipspubs/fip180-1.htm
26 */
27
Manuel Pégourié-Gonnardcef4ad22014-04-29 12:39:06 +020028#if !defined(POLARSSL_CONFIG_FILE)
Manuel Pégourié-Gonnard7f809972015-03-09 17:05:11 +000029#include "mbedtls/config.h"
Manuel Pégourié-Gonnardcef4ad22014-04-29 12:39:06 +020030#else
31#include POLARSSL_CONFIG_FILE
32#endif
Paul Bakker5121ce52009-01-03 21:22:43 +000033
Paul Bakker40e46942009-01-03 21:51:57 +000034#if defined(POLARSSL_SHA1_C)
Paul Bakker5121ce52009-01-03 21:22:43 +000035
Manuel Pégourié-Gonnard7f809972015-03-09 17:05:11 +000036#include "mbedtls/sha1.h"
Paul Bakker5121ce52009-01-03 21:22:43 +000037
Rich Evans00ab4702015-02-06 13:43:58 +000038#include <string.h>
39
40#if defined(POLARSSL_FS_IO)
Paul Bakker5121ce52009-01-03 21:22:43 +000041#include <stdio.h>
Paul Bakker335db3f2011-04-25 15:28:35 +000042#endif
Paul Bakker5121ce52009-01-03 21:22:43 +000043
Rich Evans00ab4702015-02-06 13:43:58 +000044#if defined(POLARSSL_SELF_TEST)
Paul Bakker7dc4c442014-02-01 22:50:26 +010045#if defined(POLARSSL_PLATFORM_C)
Manuel Pégourié-Gonnard7f809972015-03-09 17:05:11 +000046#include "mbedtls/platform.h"
Paul Bakker7dc4c442014-02-01 22:50:26 +010047#else
Rich Evans00ab4702015-02-06 13:43:58 +000048#include <stdio.h>
Paul Bakker7dc4c442014-02-01 22:50:26 +010049#define polarssl_printf printf
Rich Evans00ab4702015-02-06 13:43:58 +000050#endif /* POLARSSL_PLATFORM_C */
51#endif /* POLARSSL_SELF_TEST */
Paul Bakker7dc4c442014-02-01 22:50:26 +010052
Paul Bakker34617722014-06-13 17:20:13 +020053/* Implementation that should never be optimized out by the compiler */
54static void polarssl_zeroize( void *v, size_t n ) {
55 volatile unsigned char *p = v; while( n-- ) *p++ = 0;
56}
57
Paul Bakker90995b52013-06-24 19:20:35 +020058#if !defined(POLARSSL_SHA1_ALT)
59
Paul Bakker5121ce52009-01-03 21:22:43 +000060/*
61 * 32-bit integer manipulation macros (big endian)
62 */
Paul Bakker5c2364c2012-10-01 14:41:15 +000063#ifndef GET_UINT32_BE
64#define GET_UINT32_BE(n,b,i) \
Paul Bakker5121ce52009-01-03 21:22:43 +000065{ \
Paul Bakker5c2364c2012-10-01 14:41:15 +000066 (n) = ( (uint32_t) (b)[(i) ] << 24 ) \
67 | ( (uint32_t) (b)[(i) + 1] << 16 ) \
68 | ( (uint32_t) (b)[(i) + 2] << 8 ) \
69 | ( (uint32_t) (b)[(i) + 3] ); \
Paul Bakker5121ce52009-01-03 21:22:43 +000070}
71#endif
72
Paul Bakker5c2364c2012-10-01 14:41:15 +000073#ifndef PUT_UINT32_BE
74#define PUT_UINT32_BE(n,b,i) \
Paul Bakker5121ce52009-01-03 21:22:43 +000075{ \
76 (b)[(i) ] = (unsigned char) ( (n) >> 24 ); \
77 (b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \
78 (b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \
79 (b)[(i) + 3] = (unsigned char) ( (n) ); \
80}
81#endif
82
Paul Bakker5b4af392014-06-26 12:09:34 +020083void sha1_init( sha1_context *ctx )
84{
85 memset( ctx, 0, sizeof( sha1_context ) );
86}
87
88void sha1_free( sha1_context *ctx )
89{
90 if( ctx == NULL )
91 return;
92
93 polarssl_zeroize( ctx, sizeof( sha1_context ) );
94}
95
Paul Bakker5121ce52009-01-03 21:22:43 +000096/*
97 * SHA-1 context setup
98 */
99void sha1_starts( sha1_context *ctx )
100{
101 ctx->total[0] = 0;
102 ctx->total[1] = 0;
103
104 ctx->state[0] = 0x67452301;
105 ctx->state[1] = 0xEFCDAB89;
106 ctx->state[2] = 0x98BADCFE;
107 ctx->state[3] = 0x10325476;
108 ctx->state[4] = 0xC3D2E1F0;
109}
110
Paul Bakkere47b34b2013-02-27 14:48:00 +0100111void sha1_process( sha1_context *ctx, const unsigned char data[64] )
Paul Bakker5121ce52009-01-03 21:22:43 +0000112{
Paul Bakker5c2364c2012-10-01 14:41:15 +0000113 uint32_t temp, W[16], A, B, C, D, E;
Paul Bakker5121ce52009-01-03 21:22:43 +0000114
Paul Bakker5c2364c2012-10-01 14:41:15 +0000115 GET_UINT32_BE( W[ 0], data, 0 );
116 GET_UINT32_BE( W[ 1], data, 4 );
117 GET_UINT32_BE( W[ 2], data, 8 );
118 GET_UINT32_BE( W[ 3], data, 12 );
119 GET_UINT32_BE( W[ 4], data, 16 );
120 GET_UINT32_BE( W[ 5], data, 20 );
121 GET_UINT32_BE( W[ 6], data, 24 );
122 GET_UINT32_BE( W[ 7], data, 28 );
123 GET_UINT32_BE( W[ 8], data, 32 );
124 GET_UINT32_BE( W[ 9], data, 36 );
125 GET_UINT32_BE( W[10], data, 40 );
126 GET_UINT32_BE( W[11], data, 44 );
127 GET_UINT32_BE( W[12], data, 48 );
128 GET_UINT32_BE( W[13], data, 52 );
129 GET_UINT32_BE( W[14], data, 56 );
130 GET_UINT32_BE( W[15], data, 60 );
Paul Bakker5121ce52009-01-03 21:22:43 +0000131
132#define S(x,n) ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n)))
133
134#define R(t) \
135( \
Paul Bakker66d5d072014-06-17 16:39:18 +0200136 temp = W[( t - 3 ) & 0x0F] ^ W[( t - 8 ) & 0x0F] ^ \
137 W[( t - 14 ) & 0x0F] ^ W[ t & 0x0F], \
Paul Bakker5121ce52009-01-03 21:22:43 +0000138 ( W[t & 0x0F] = S(temp,1) ) \
139)
140
141#define P(a,b,c,d,e,x) \
142{ \
143 e += S(a,5) + F(b,c,d) + K + x; b = S(b,30); \
144}
145
146 A = ctx->state[0];
147 B = ctx->state[1];
148 C = ctx->state[2];
149 D = ctx->state[3];
150 E = ctx->state[4];
151
152#define F(x,y,z) (z ^ (x & (y ^ z)))
153#define K 0x5A827999
154
155 P( A, B, C, D, E, W[0] );
156 P( E, A, B, C, D, W[1] );
157 P( D, E, A, B, C, W[2] );
158 P( C, D, E, A, B, W[3] );
159 P( B, C, D, E, A, W[4] );
160 P( A, B, C, D, E, W[5] );
161 P( E, A, B, C, D, W[6] );
162 P( D, E, A, B, C, W[7] );
163 P( C, D, E, A, B, W[8] );
164 P( B, C, D, E, A, W[9] );
165 P( A, B, C, D, E, W[10] );
166 P( E, A, B, C, D, W[11] );
167 P( D, E, A, B, C, W[12] );
168 P( C, D, E, A, B, W[13] );
169 P( B, C, D, E, A, W[14] );
170 P( A, B, C, D, E, W[15] );
171 P( E, A, B, C, D, R(16) );
172 P( D, E, A, B, C, R(17) );
173 P( C, D, E, A, B, R(18) );
174 P( B, C, D, E, A, R(19) );
175
176#undef K
177#undef F
178
179#define F(x,y,z) (x ^ y ^ z)
180#define K 0x6ED9EBA1
181
182 P( A, B, C, D, E, R(20) );
183 P( E, A, B, C, D, R(21) );
184 P( D, E, A, B, C, R(22) );
185 P( C, D, E, A, B, R(23) );
186 P( B, C, D, E, A, R(24) );
187 P( A, B, C, D, E, R(25) );
188 P( E, A, B, C, D, R(26) );
189 P( D, E, A, B, C, R(27) );
190 P( C, D, E, A, B, R(28) );
191 P( B, C, D, E, A, R(29) );
192 P( A, B, C, D, E, R(30) );
193 P( E, A, B, C, D, R(31) );
194 P( D, E, A, B, C, R(32) );
195 P( C, D, E, A, B, R(33) );
196 P( B, C, D, E, A, R(34) );
197 P( A, B, C, D, E, R(35) );
198 P( E, A, B, C, D, R(36) );
199 P( D, E, A, B, C, R(37) );
200 P( C, D, E, A, B, R(38) );
201 P( B, C, D, E, A, R(39) );
202
203#undef K
204#undef F
205
206#define F(x,y,z) ((x & y) | (z & (x | y)))
207#define K 0x8F1BBCDC
208
209 P( A, B, C, D, E, R(40) );
210 P( E, A, B, C, D, R(41) );
211 P( D, E, A, B, C, R(42) );
212 P( C, D, E, A, B, R(43) );
213 P( B, C, D, E, A, R(44) );
214 P( A, B, C, D, E, R(45) );
215 P( E, A, B, C, D, R(46) );
216 P( D, E, A, B, C, R(47) );
217 P( C, D, E, A, B, R(48) );
218 P( B, C, D, E, A, R(49) );
219 P( A, B, C, D, E, R(50) );
220 P( E, A, B, C, D, R(51) );
221 P( D, E, A, B, C, R(52) );
222 P( C, D, E, A, B, R(53) );
223 P( B, C, D, E, A, R(54) );
224 P( A, B, C, D, E, R(55) );
225 P( E, A, B, C, D, R(56) );
226 P( D, E, A, B, C, R(57) );
227 P( C, D, E, A, B, R(58) );
228 P( B, C, D, E, A, R(59) );
229
230#undef K
231#undef F
232
233#define F(x,y,z) (x ^ y ^ z)
234#define K 0xCA62C1D6
235
236 P( A, B, C, D, E, R(60) );
237 P( E, A, B, C, D, R(61) );
238 P( D, E, A, B, C, R(62) );
239 P( C, D, E, A, B, R(63) );
240 P( B, C, D, E, A, R(64) );
241 P( A, B, C, D, E, R(65) );
242 P( E, A, B, C, D, R(66) );
243 P( D, E, A, B, C, R(67) );
244 P( C, D, E, A, B, R(68) );
245 P( B, C, D, E, A, R(69) );
246 P( A, B, C, D, E, R(70) );
247 P( E, A, B, C, D, R(71) );
248 P( D, E, A, B, C, R(72) );
249 P( C, D, E, A, B, R(73) );
250 P( B, C, D, E, A, R(74) );
251 P( A, B, C, D, E, R(75) );
252 P( E, A, B, C, D, R(76) );
253 P( D, E, A, B, C, R(77) );
254 P( C, D, E, A, B, R(78) );
255 P( B, C, D, E, A, R(79) );
256
257#undef K
258#undef F
259
260 ctx->state[0] += A;
261 ctx->state[1] += B;
262 ctx->state[2] += C;
263 ctx->state[3] += D;
264 ctx->state[4] += E;
265}
266
267/*
268 * SHA-1 process buffer
269 */
Paul Bakker23986e52011-04-24 08:57:21 +0000270void sha1_update( sha1_context *ctx, const unsigned char *input, size_t ilen )
Paul Bakker5121ce52009-01-03 21:22:43 +0000271{
Paul Bakker23986e52011-04-24 08:57:21 +0000272 size_t fill;
Paul Bakker5c2364c2012-10-01 14:41:15 +0000273 uint32_t left;
Paul Bakker5121ce52009-01-03 21:22:43 +0000274
Brian White12895d12014-04-11 11:29:42 -0400275 if( ilen == 0 )
Paul Bakker5121ce52009-01-03 21:22:43 +0000276 return;
277
278 left = ctx->total[0] & 0x3F;
279 fill = 64 - left;
280
Paul Bakker5c2364c2012-10-01 14:41:15 +0000281 ctx->total[0] += (uint32_t) ilen;
Paul Bakker5121ce52009-01-03 21:22:43 +0000282 ctx->total[0] &= 0xFFFFFFFF;
283
Paul Bakker5c2364c2012-10-01 14:41:15 +0000284 if( ctx->total[0] < (uint32_t) ilen )
Paul Bakker5121ce52009-01-03 21:22:43 +0000285 ctx->total[1]++;
286
287 if( left && ilen >= fill )
288 {
Paul Bakker3c2122f2013-06-24 19:03:14 +0200289 memcpy( (void *) (ctx->buffer + left), input, fill );
Paul Bakker5121ce52009-01-03 21:22:43 +0000290 sha1_process( ctx, ctx->buffer );
291 input += fill;
292 ilen -= fill;
293 left = 0;
294 }
295
296 while( ilen >= 64 )
297 {
298 sha1_process( ctx, input );
299 input += 64;
300 ilen -= 64;
301 }
302
303 if( ilen > 0 )
Paul Bakker3c2122f2013-06-24 19:03:14 +0200304 memcpy( (void *) (ctx->buffer + left), input, ilen );
Paul Bakker5121ce52009-01-03 21:22:43 +0000305}
306
307static const unsigned char sha1_padding[64] =
308{
309 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
310 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
311 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
312 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
313};
314
315/*
316 * SHA-1 final digest
317 */
318void sha1_finish( sha1_context *ctx, unsigned char output[20] )
319{
Paul Bakker5c2364c2012-10-01 14:41:15 +0000320 uint32_t last, padn;
321 uint32_t high, low;
Paul Bakker5121ce52009-01-03 21:22:43 +0000322 unsigned char msglen[8];
323
324 high = ( ctx->total[0] >> 29 )
325 | ( ctx->total[1] << 3 );
326 low = ( ctx->total[0] << 3 );
327
Paul Bakker5c2364c2012-10-01 14:41:15 +0000328 PUT_UINT32_BE( high, msglen, 0 );
329 PUT_UINT32_BE( low, msglen, 4 );
Paul Bakker5121ce52009-01-03 21:22:43 +0000330
331 last = ctx->total[0] & 0x3F;
332 padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last );
333
Paul Bakker3c2122f2013-06-24 19:03:14 +0200334 sha1_update( ctx, sha1_padding, padn );
Paul Bakker5121ce52009-01-03 21:22:43 +0000335 sha1_update( ctx, msglen, 8 );
336
Paul Bakker5c2364c2012-10-01 14:41:15 +0000337 PUT_UINT32_BE( ctx->state[0], output, 0 );
338 PUT_UINT32_BE( ctx->state[1], output, 4 );
339 PUT_UINT32_BE( ctx->state[2], output, 8 );
340 PUT_UINT32_BE( ctx->state[3], output, 12 );
341 PUT_UINT32_BE( ctx->state[4], output, 16 );
Paul Bakker5121ce52009-01-03 21:22:43 +0000342}
343
Paul Bakker90995b52013-06-24 19:20:35 +0200344#endif /* !POLARSSL_SHA1_ALT */
345
Paul Bakker5121ce52009-01-03 21:22:43 +0000346/*
347 * output = SHA-1( input buffer )
348 */
Paul Bakker23986e52011-04-24 08:57:21 +0000349void sha1( const unsigned char *input, size_t ilen, unsigned char output[20] )
Paul Bakker5121ce52009-01-03 21:22:43 +0000350{
351 sha1_context ctx;
352
Paul Bakker5b4af392014-06-26 12:09:34 +0200353 sha1_init( &ctx );
Paul Bakker5121ce52009-01-03 21:22:43 +0000354 sha1_starts( &ctx );
355 sha1_update( &ctx, input, ilen );
356 sha1_finish( &ctx, output );
Paul Bakker5b4af392014-06-26 12:09:34 +0200357 sha1_free( &ctx );
Paul Bakker5121ce52009-01-03 21:22:43 +0000358}
359
Paul Bakker335db3f2011-04-25 15:28:35 +0000360#if defined(POLARSSL_FS_IO)
Paul Bakker5121ce52009-01-03 21:22:43 +0000361/*
362 * output = SHA-1( file contents )
363 */
Paul Bakkerff60ee62010-03-16 21:09:09 +0000364int sha1_file( const char *path, unsigned char output[20] )
Paul Bakker5121ce52009-01-03 21:22:43 +0000365{
366 FILE *f;
367 size_t n;
368 sha1_context ctx;
369 unsigned char buf[1024];
370
371 if( ( f = fopen( path, "rb" ) ) == NULL )
Paul Bakker69e095c2011-12-10 21:55:01 +0000372 return( POLARSSL_ERR_SHA1_FILE_IO_ERROR );
Paul Bakker5121ce52009-01-03 21:22:43 +0000373
Paul Bakker5b4af392014-06-26 12:09:34 +0200374 sha1_init( &ctx );
Paul Bakker5121ce52009-01-03 21:22:43 +0000375 sha1_starts( &ctx );
376
377 while( ( n = fread( buf, 1, sizeof( buf ), f ) ) > 0 )
Paul Bakker27fdf462011-06-09 13:55:13 +0000378 sha1_update( &ctx, buf, n );
Paul Bakker5121ce52009-01-03 21:22:43 +0000379
380 sha1_finish( &ctx, output );
Paul Bakker5b4af392014-06-26 12:09:34 +0200381 sha1_free( &ctx );
Paul Bakker5121ce52009-01-03 21:22:43 +0000382
383 if( ferror( f ) != 0 )
384 {
385 fclose( f );
Paul Bakker69e095c2011-12-10 21:55:01 +0000386 return( POLARSSL_ERR_SHA1_FILE_IO_ERROR );
Paul Bakker5121ce52009-01-03 21:22:43 +0000387 }
388
389 fclose( f );
390 return( 0 );
391}
Paul Bakker335db3f2011-04-25 15:28:35 +0000392#endif /* POLARSSL_FS_IO */
Paul Bakker5121ce52009-01-03 21:22:43 +0000393
Paul Bakker40e46942009-01-03 21:51:57 +0000394#if defined(POLARSSL_SELF_TEST)
Paul Bakker5121ce52009-01-03 21:22:43 +0000395/*
396 * FIPS-180-1 test vectors
397 */
Manuel Pégourié-Gonnard28122e42015-03-11 09:13:42 +0000398static const unsigned char sha1_test_buf[3][57] =
Paul Bakker5121ce52009-01-03 21:22:43 +0000399{
400 { "abc" },
401 { "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" },
402 { "" }
403};
404
405static const int sha1_test_buflen[3] =
406{
407 3, 56, 1000
408};
409
410static const unsigned char sha1_test_sum[3][20] =
411{
412 { 0xA9, 0x99, 0x3E, 0x36, 0x47, 0x06, 0x81, 0x6A, 0xBA, 0x3E,
413 0x25, 0x71, 0x78, 0x50, 0xC2, 0x6C, 0x9C, 0xD0, 0xD8, 0x9D },
414 { 0x84, 0x98, 0x3E, 0x44, 0x1C, 0x3B, 0xD2, 0x6E, 0xBA, 0xAE,
415 0x4A, 0xA1, 0xF9, 0x51, 0x29, 0xE5, 0xE5, 0x46, 0x70, 0xF1 },
416 { 0x34, 0xAA, 0x97, 0x3C, 0xD4, 0xC4, 0xDA, 0xA4, 0xF6, 0x1E,
417 0xEB, 0x2B, 0xDB, 0xAD, 0x27, 0x31, 0x65, 0x34, 0x01, 0x6F }
418};
419
420/*
Paul Bakker5121ce52009-01-03 21:22:43 +0000421 * Checkup routine
422 */
423int sha1_self_test( int verbose )
424{
Paul Bakker5b4af392014-06-26 12:09:34 +0200425 int i, j, buflen, ret = 0;
Paul Bakker5121ce52009-01-03 21:22:43 +0000426 unsigned char buf[1024];
427 unsigned char sha1sum[20];
428 sha1_context ctx;
429
Paul Bakker5b4af392014-06-26 12:09:34 +0200430 sha1_init( &ctx );
431
Paul Bakker5121ce52009-01-03 21:22:43 +0000432 /*
433 * SHA-1
434 */
435 for( i = 0; i < 3; i++ )
436 {
437 if( verbose != 0 )
Paul Bakker7dc4c442014-02-01 22:50:26 +0100438 polarssl_printf( " SHA-1 test #%d: ", i + 1 );
Paul Bakker5121ce52009-01-03 21:22:43 +0000439
440 sha1_starts( &ctx );
441
442 if( i == 2 )
443 {
444 memset( buf, 'a', buflen = 1000 );
445
446 for( j = 0; j < 1000; j++ )
447 sha1_update( &ctx, buf, buflen );
448 }
449 else
450 sha1_update( &ctx, sha1_test_buf[i],
451 sha1_test_buflen[i] );
452
453 sha1_finish( &ctx, sha1sum );
454
455 if( memcmp( sha1sum, sha1_test_sum[i], 20 ) != 0 )
456 {
457 if( verbose != 0 )
Paul Bakker7dc4c442014-02-01 22:50:26 +0100458 polarssl_printf( "failed\n" );
Paul Bakker5121ce52009-01-03 21:22:43 +0000459
Paul Bakker5b4af392014-06-26 12:09:34 +0200460 ret = 1;
461 goto exit;
Paul Bakker5121ce52009-01-03 21:22:43 +0000462 }
463
464 if( verbose != 0 )
Paul Bakker7dc4c442014-02-01 22:50:26 +0100465 polarssl_printf( "passed\n" );
Paul Bakker5121ce52009-01-03 21:22:43 +0000466 }
467
468 if( verbose != 0 )
Paul Bakker7dc4c442014-02-01 22:50:26 +0100469 polarssl_printf( "\n" );
Paul Bakker5121ce52009-01-03 21:22:43 +0000470
Paul Bakker5b4af392014-06-26 12:09:34 +0200471exit:
472 sha1_free( &ctx );
473
474 return( ret );
Paul Bakker5121ce52009-01-03 21:22:43 +0000475}
476
Paul Bakker9af723c2014-05-01 13:03:14 +0200477#endif /* POLARSSL_SELF_TEST */
Paul Bakker5121ce52009-01-03 21:22:43 +0000478
Paul Bakker9af723c2014-05-01 13:03:14 +0200479#endif /* POLARSSL_SHA1_C */