aes256.h
1 /*
2 * Byte-oriented AES-256 implementation.
3 * All lookup tables replaced with 'on the fly' calculations.
4 *
5 * Copyright (c) 2007-2009 Ilya O. Levin, http://www.literatecode.com
6 * Other contributors: Hal Finney
7 *
8 * Permission to use, copy, modify, and distribute this software for any
9 * purpose with or without fee is hereby granted, provided that the above
10 * copyright notice and this permission notice appear in all copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 */
20 
21 #ifndef AES_256_H
22 #define AES_256_H
23 
24 #include "typedefs.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30  typedef struct {
31  uint8_t key[32];
32  uint8_t enckey[32];
33  uint8_t deckey[32];
35 
36 
37  void aes256_init(aes256_context *, uint8_t * /* key */);
38  void aes256_done(aes256_context *);
39  void aes256_encrypt_ecb(aes256_context *, uint8_t * /* plaintext */);
40  void aes256_decrypt_ecb(aes256_context *, uint8_t * /* cipertext */);
41 
42 #ifdef __cplusplus
43 }
44 #endif
45 
46 #endif
Definition: aes256.h:30