Pajdeg  0.2.2
Pajdeg
pd_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 #ifndef included_pd_aes256_h
21 #define included_pd_aes256_h
22 
23 #include "PDDefines.h"
24 
25 #ifdef PD_SUPPORT_CRYPTO
26 
27 #ifndef uint8_t
28 #define uint8_t unsigned char
29 #endif
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 typedef struct {
36  uint8_t key[32];
37  uint8_t enckey[32];
38  uint8_t deckey[32];
40 
41 
42 void aes256_init(aes256_context *, uint8_t * /* key */);
43 void aes256_done(aes256_context *);
44 void aes256_encrypt_ecb(aes256_context *, uint8_t * /* plaintext */);
45 void aes256_decrypt_ecb(aes256_context *, uint8_t * /* cipertext */);
46 
47 #ifdef __cplusplus
48 }
49 #endif
50 
51 #endif
52 
53 #endif // included_pd_aes256_h
Definition: pd_aes256.h:35
Definitions for the Pajdeg interface.