Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1 | /* |
| 2 | * AES-256 file encryption program |
| 3 | * |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 4 | * Copyright (C) 2006-2013, Brainspark B.V. |
Paul Bakker | b96f154 | 2010-07-18 20:36:00 +0000 | [diff] [blame] | 5 | * |
| 6 | * This file is part of PolarSSL (http://www.polarssl.org) |
Paul Bakker | 84f12b7 | 2010-07-18 10:13:04 +0000 | [diff] [blame] | 7 | * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> |
Paul Bakker | b96f154 | 2010-07-18 20:36:00 +0000 | [diff] [blame] | 8 | * |
Paul Bakker | 77b385e | 2009-07-28 17:23:11 +0000 | [diff] [blame] | 9 | * All rights reserved. |
Paul Bakker | e0ccd0a | 2009-01-04 16:27:10 +0000 | [diff] [blame] | 10 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 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é-Gonnard | abd6e02 | 2013-09-20 13:30:43 +0200 | [diff] [blame] | 26 | #include "polarssl/config.h" |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 27 | |
Paul Bakker | 494c0b8 | 2011-04-24 15:30:07 +0000 | [diff] [blame] | 28 | #if defined(_WIN32) |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 29 | #include <windows.h> |
Paul Bakker | cce9d77 | 2011-11-18 14:26:47 +0000 | [diff] [blame] | 30 | #if !defined(_WIN32_WCE) |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 31 | #include <io.h> |
Paul Bakker | cce9d77 | 2011-11-18 14:26:47 +0000 | [diff] [blame] | 32 | #endif |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 33 | #else |
| 34 | #include <sys/types.h> |
| 35 | #include <unistd.h> |
| 36 | #endif |
| 37 | |
| 38 | #include <string.h> |
| 39 | #include <stdlib.h> |
| 40 | #include <stdio.h> |
| 41 | #include <time.h> |
| 42 | |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 43 | #include "polarssl/aes.h" |
Paul Bakker | d2681d8 | 2013-06-30 14:49:12 +0200 | [diff] [blame] | 44 | #include "polarssl/sha256.h" |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 45 | |
| 46 | #define MODE_ENCRYPT 0 |
| 47 | #define MODE_DECRYPT 1 |
| 48 | |
| 49 | #define USAGE \ |
| 50 | "\n aescrypt2 <mode> <input filename> <output filename> <key>\n" \ |
| 51 | "\n <mode>: 0 = encrypt, 1 = decrypt\n" \ |
| 52 | "\n example: aescrypt2 0 file file.aes hex:E76B2413958B00E193\n" \ |
| 53 | "\n" |
| 54 | |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 55 | #if !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) |
Paul Bakker | cce9d77 | 2011-11-18 14:26:47 +0000 | [diff] [blame] | 56 | int main( int argc, char *argv[] ) |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 57 | { |
Paul Bakker | cce9d77 | 2011-11-18 14:26:47 +0000 | [diff] [blame] | 58 | ((void) argc); |
| 59 | ((void) argv); |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 60 | printf("POLARSSL_AES_C and/or POLARSSL_SHA256_C not defined.\n"); |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 61 | return( 0 ); |
| 62 | } |
| 63 | #else |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 64 | int main( int argc, char *argv[] ) |
| 65 | { |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 66 | int ret = 1; |
| 67 | |
| 68 | int i, n; |
Paul Bakker | 23986e5 | 2011-04-24 08:57:21 +0000 | [diff] [blame] | 69 | int mode, lastn; |
| 70 | size_t keylen; |
Paul Bakker | 20a7808 | 2011-01-21 09:32:12 +0000 | [diff] [blame] | 71 | FILE *fkey, *fin = NULL, *fout = NULL; |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 72 | |
| 73 | char *p; |
| 74 | unsigned char IV[16]; |
| 75 | unsigned char key[512]; |
| 76 | unsigned char digest[32]; |
| 77 | unsigned char buffer[1024]; |
| 78 | |
| 79 | aes_context aes_ctx; |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 80 | sha256_context sha_ctx; |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 81 | |
Paul Bakker | cce9d77 | 2011-11-18 14:26:47 +0000 | [diff] [blame] | 82 | #if defined(_WIN32_WCE) |
| 83 | long filesize, offset; |
| 84 | #elif defined(_WIN32) |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 85 | LARGE_INTEGER li_size; |
| 86 | __int64 filesize, offset; |
| 87 | #else |
| 88 | off_t filesize, offset; |
| 89 | #endif |
| 90 | |
| 91 | /* |
| 92 | * Parse the command-line arguments. |
| 93 | */ |
| 94 | if( argc != 5 ) |
| 95 | { |
| 96 | printf( USAGE ); |
| 97 | |
Paul Bakker | cce9d77 | 2011-11-18 14:26:47 +0000 | [diff] [blame] | 98 | #if defined(_WIN32) |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 99 | printf( "\n Press Enter to exit this program.\n" ); |
| 100 | fflush( stdout ); getchar(); |
| 101 | #endif |
| 102 | |
| 103 | goto exit; |
| 104 | } |
| 105 | |
| 106 | mode = atoi( argv[1] ); |
| 107 | |
| 108 | if( mode != MODE_ENCRYPT && mode != MODE_DECRYPT ) |
| 109 | { |
| 110 | fprintf( stderr, "invalide operation mode\n" ); |
| 111 | goto exit; |
| 112 | } |
| 113 | |
| 114 | if( strcmp( argv[2], argv[3] ) == 0 ) |
| 115 | { |
| 116 | fprintf( stderr, "input and output filenames must differ\n" ); |
| 117 | goto exit; |
| 118 | } |
| 119 | |
| 120 | if( ( fin = fopen( argv[2], "rb" ) ) == NULL ) |
| 121 | { |
| 122 | fprintf( stderr, "fopen(%s,rb) failed\n", argv[2] ); |
| 123 | goto exit; |
| 124 | } |
| 125 | |
| 126 | if( ( fout = fopen( argv[3], "wb+" ) ) == NULL ) |
| 127 | { |
| 128 | fprintf( stderr, "fopen(%s,wb+) failed\n", argv[3] ); |
| 129 | goto exit; |
| 130 | } |
| 131 | |
| 132 | /* |
| 133 | * Read the secret key and clean the command line. |
| 134 | */ |
| 135 | if( ( fkey = fopen( argv[4], "rb" ) ) != NULL ) |
| 136 | { |
| 137 | keylen = fread( key, 1, sizeof( key ), fkey ); |
| 138 | fclose( fkey ); |
| 139 | } |
| 140 | else |
| 141 | { |
| 142 | if( memcmp( argv[4], "hex:", 4 ) == 0 ) |
| 143 | { |
| 144 | p = &argv[4][4]; |
| 145 | keylen = 0; |
| 146 | |
| 147 | while( sscanf( p, "%02X", &n ) > 0 && |
| 148 | keylen < (int) sizeof( key ) ) |
| 149 | { |
| 150 | key[keylen++] = (unsigned char) n; |
| 151 | p += 2; |
| 152 | } |
| 153 | } |
| 154 | else |
| 155 | { |
| 156 | keylen = strlen( argv[4] ); |
| 157 | |
| 158 | if( keylen > (int) sizeof( key ) ) |
| 159 | keylen = (int) sizeof( key ); |
| 160 | |
| 161 | memcpy( key, argv[4], keylen ); |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | memset( argv[4], 0, strlen( argv[4] ) ); |
| 166 | |
Paul Bakker | cce9d77 | 2011-11-18 14:26:47 +0000 | [diff] [blame] | 167 | #if defined(_WIN32_WCE) |
| 168 | filesize = fseek( fin, 0L, SEEK_END ); |
| 169 | #else |
| 170 | #if defined(_WIN32) |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 171 | /* |
| 172 | * Support large files (> 2Gb) on Win32 |
| 173 | */ |
| 174 | li_size.QuadPart = 0; |
| 175 | li_size.LowPart = |
| 176 | SetFilePointer( (HANDLE) _get_osfhandle( _fileno( fin ) ), |
| 177 | li_size.LowPart, &li_size.HighPart, FILE_END ); |
| 178 | |
| 179 | if( li_size.LowPart == 0xFFFFFFFF && GetLastError() != NO_ERROR ) |
| 180 | { |
| 181 | fprintf( stderr, "SetFilePointer(0,FILE_END) failed\n" ); |
| 182 | goto exit; |
| 183 | } |
| 184 | |
| 185 | filesize = li_size.QuadPart; |
| 186 | #else |
| 187 | if( ( filesize = lseek( fileno( fin ), 0, SEEK_END ) ) < 0 ) |
| 188 | { |
| 189 | perror( "lseek" ); |
| 190 | goto exit; |
| 191 | } |
| 192 | #endif |
Paul Bakker | cce9d77 | 2011-11-18 14:26:47 +0000 | [diff] [blame] | 193 | #endif |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 194 | |
| 195 | if( fseek( fin, 0, SEEK_SET ) < 0 ) |
| 196 | { |
| 197 | fprintf( stderr, "fseek(0,SEEK_SET) failed\n" ); |
| 198 | goto exit; |
| 199 | } |
| 200 | |
| 201 | if( mode == MODE_ENCRYPT ) |
| 202 | { |
| 203 | /* |
| 204 | * Generate the initialization vector as: |
| 205 | * IV = SHA-256( filesize || filename )[0..15] |
| 206 | */ |
| 207 | for( i = 0; i < 8; i++ ) |
| 208 | buffer[i] = (unsigned char)( filesize >> ( i << 3 ) ); |
| 209 | |
| 210 | p = argv[2]; |
| 211 | |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 212 | sha256_starts( &sha_ctx, 0 ); |
| 213 | sha256_update( &sha_ctx, buffer, 8 ); |
| 214 | sha256_update( &sha_ctx, (unsigned char *) p, strlen( p ) ); |
| 215 | sha256_finish( &sha_ctx, digest ); |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 216 | |
| 217 | memcpy( IV, digest, 16 ); |
| 218 | |
| 219 | /* |
| 220 | * The last four bits in the IV are actually used |
| 221 | * to store the file size modulo the AES block size. |
| 222 | */ |
| 223 | lastn = (int)( filesize & 0x0F ); |
| 224 | |
| 225 | IV[15] = (unsigned char) |
| 226 | ( ( IV[15] & 0xF0 ) | lastn ); |
| 227 | |
| 228 | /* |
| 229 | * Append the IV at the beginning of the output. |
| 230 | */ |
| 231 | if( fwrite( IV, 1, 16, fout ) != 16 ) |
| 232 | { |
| 233 | fprintf( stderr, "fwrite(%d bytes) failed\n", 16 ); |
| 234 | goto exit; |
| 235 | } |
| 236 | |
| 237 | /* |
| 238 | * Hash the IV and the secret key together 8192 times |
| 239 | * using the result to setup the AES context and HMAC. |
| 240 | */ |
| 241 | memset( digest, 0, 32 ); |
| 242 | memcpy( digest, IV, 16 ); |
| 243 | |
| 244 | for( i = 0; i < 8192; i++ ) |
| 245 | { |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 246 | sha256_starts( &sha_ctx, 0 ); |
| 247 | sha256_update( &sha_ctx, digest, 32 ); |
| 248 | sha256_update( &sha_ctx, key, keylen ); |
| 249 | sha256_finish( &sha_ctx, digest ); |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 250 | } |
| 251 | |
| 252 | memset( key, 0, sizeof( key ) ); |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 253 | aes_setkey_enc( &aes_ctx, digest, 256 ); |
| 254 | sha256_hmac_starts( &sha_ctx, digest, 32, 0 ); |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 255 | |
| 256 | /* |
| 257 | * Encrypt and write the ciphertext. |
| 258 | */ |
| 259 | for( offset = 0; offset < filesize; offset += 16 ) |
| 260 | { |
| 261 | n = ( filesize - offset > 16 ) ? 16 : (int) |
| 262 | ( filesize - offset ); |
| 263 | |
| 264 | if( fread( buffer, 1, n, fin ) != (size_t) n ) |
| 265 | { |
| 266 | fprintf( stderr, "fread(%d bytes) failed\n", n ); |
| 267 | goto exit; |
| 268 | } |
| 269 | |
| 270 | for( i = 0; i < 16; i++ ) |
| 271 | buffer[i] = (unsigned char)( buffer[i] ^ IV[i] ); |
| 272 | |
| 273 | aes_crypt_ecb( &aes_ctx, AES_ENCRYPT, buffer, buffer ); |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 274 | sha256_hmac_update( &sha_ctx, buffer, 16 ); |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 275 | |
| 276 | if( fwrite( buffer, 1, 16, fout ) != 16 ) |
| 277 | { |
| 278 | fprintf( stderr, "fwrite(%d bytes) failed\n", 16 ); |
| 279 | goto exit; |
| 280 | } |
| 281 | |
| 282 | memcpy( IV, buffer, 16 ); |
| 283 | } |
| 284 | |
| 285 | /* |
| 286 | * Finally write the HMAC. |
| 287 | */ |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 288 | sha256_hmac_finish( &sha_ctx, digest ); |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 289 | |
| 290 | if( fwrite( digest, 1, 32, fout ) != 32 ) |
| 291 | { |
| 292 | fprintf( stderr, "fwrite(%d bytes) failed\n", 16 ); |
| 293 | goto exit; |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | if( mode == MODE_DECRYPT ) |
| 298 | { |
| 299 | unsigned char tmp[16]; |
| 300 | |
| 301 | /* |
| 302 | * The encrypted file must be structured as follows: |
| 303 | * |
| 304 | * 00 .. 15 Initialization Vector |
| 305 | * 16 .. 31 AES Encrypted Block #1 |
| 306 | * .. |
| 307 | * N*16 .. (N+1)*16 - 1 AES Encrypted Block #N |
| 308 | * (N+1)*16 .. (N+1)*16 + 32 HMAC-SHA-256(ciphertext) |
| 309 | */ |
| 310 | if( filesize < 48 ) |
| 311 | { |
| 312 | fprintf( stderr, "File too short to be encrypted.\n" ); |
| 313 | goto exit; |
| 314 | } |
| 315 | |
| 316 | if( ( filesize & 0x0F ) != 0 ) |
| 317 | { |
| 318 | fprintf( stderr, "File size not a multiple of 16.\n" ); |
| 319 | goto exit; |
| 320 | } |
| 321 | |
| 322 | /* |
Paul Bakker | 60b1d10 | 2013-10-29 10:02:51 +0100 | [diff] [blame] | 323 | * Subtract the IV + HMAC length. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 324 | */ |
| 325 | filesize -= ( 16 + 32 ); |
| 326 | |
| 327 | /* |
| 328 | * Read the IV and original filesize modulo 16. |
| 329 | */ |
| 330 | if( fread( buffer, 1, 16, fin ) != 16 ) |
| 331 | { |
| 332 | fprintf( stderr, "fread(%d bytes) failed\n", 16 ); |
| 333 | goto exit; |
| 334 | } |
| 335 | |
| 336 | memcpy( IV, buffer, 16 ); |
| 337 | lastn = IV[15] & 0x0F; |
| 338 | |
| 339 | /* |
| 340 | * Hash the IV and the secret key together 8192 times |
| 341 | * using the result to setup the AES context and HMAC. |
| 342 | */ |
| 343 | memset( digest, 0, 32 ); |
| 344 | memcpy( digest, IV, 16 ); |
| 345 | |
| 346 | for( i = 0; i < 8192; i++ ) |
| 347 | { |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 348 | sha256_starts( &sha_ctx, 0 ); |
| 349 | sha256_update( &sha_ctx, digest, 32 ); |
| 350 | sha256_update( &sha_ctx, key, keylen ); |
| 351 | sha256_finish( &sha_ctx, digest ); |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 352 | } |
| 353 | |
| 354 | memset( key, 0, sizeof( key ) ); |
| 355 | aes_setkey_dec( &aes_ctx, digest, 256 ); |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 356 | sha256_hmac_starts( &sha_ctx, digest, 32, 0 ); |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 357 | |
| 358 | /* |
| 359 | * Decrypt and write the plaintext. |
| 360 | */ |
| 361 | for( offset = 0; offset < filesize; offset += 16 ) |
| 362 | { |
| 363 | if( fread( buffer, 1, 16, fin ) != 16 ) |
| 364 | { |
| 365 | fprintf( stderr, "fread(%d bytes) failed\n", 16 ); |
| 366 | goto exit; |
| 367 | } |
| 368 | |
| 369 | memcpy( tmp, buffer, 16 ); |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 370 | |
| 371 | sha256_hmac_update( &sha_ctx, buffer, 16 ); |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 372 | aes_crypt_ecb( &aes_ctx, AES_DECRYPT, buffer, buffer ); |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 373 | |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 374 | for( i = 0; i < 16; i++ ) |
| 375 | buffer[i] = (unsigned char)( buffer[i] ^ IV[i] ); |
| 376 | |
| 377 | memcpy( IV, tmp, 16 ); |
| 378 | |
| 379 | n = ( lastn > 0 && offset == filesize - 16 ) |
| 380 | ? lastn : 16; |
| 381 | |
| 382 | if( fwrite( buffer, 1, n, fout ) != (size_t) n ) |
| 383 | { |
| 384 | fprintf( stderr, "fwrite(%d bytes) failed\n", n ); |
| 385 | goto exit; |
| 386 | } |
| 387 | } |
| 388 | |
| 389 | /* |
| 390 | * Verify the message authentication code. |
| 391 | */ |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 392 | sha256_hmac_finish( &sha_ctx, digest ); |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 393 | |
| 394 | if( fread( buffer, 1, 32, fin ) != 32 ) |
| 395 | { |
| 396 | fprintf( stderr, "fread(%d bytes) failed\n", 32 ); |
| 397 | goto exit; |
| 398 | } |
| 399 | |
| 400 | if( memcmp( digest, buffer, 32 ) != 0 ) |
| 401 | { |
| 402 | fprintf( stderr, "HMAC check failed: wrong key, " |
| 403 | "or file corrupted.\n" ); |
| 404 | goto exit; |
| 405 | } |
| 406 | } |
| 407 | |
| 408 | ret = 0; |
| 409 | |
| 410 | exit: |
Paul Bakker | 6d44032 | 2011-02-06 12:49:19 +0000 | [diff] [blame] | 411 | if( fin ) |
| 412 | fclose( fin ); |
| 413 | if( fout ) |
| 414 | fclose( fout ); |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 415 | |
| 416 | memset( buffer, 0, sizeof( buffer ) ); |
| 417 | memset( digest, 0, sizeof( digest ) ); |
| 418 | |
| 419 | memset( &aes_ctx, 0, sizeof( aes_context ) ); |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 420 | memset( &sha_ctx, 0, sizeof( sha256_context ) ); |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 421 | |
| 422 | return( ret ); |
| 423 | } |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 424 | #endif /* POLARSSL_AES_C && POLARSSL_SHA256_C */ |