NetBurner 3.5.0
PDF Version
 
aes.h
1/*NB_REVISION*/
2
3/*
4 * FIPS-197 compliant AES implementation
5 *
6 * Copyright (C) 2006-2007 Christophe Devine
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License, version 2.1 as published by the Free Software Foundation.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20 * MA 02110-1301 USA
21 */
22
23/*
24 * @file aes.h
25 * @brief Advanced Encryption Standard
26 */
27
37#ifndef _AES_H
38#define _AES_H
39
43typedef struct
44{
45 unsigned long erk[64];
46 unsigned long drk[64];
47 int nr;
49
57void aes_set_key(aes_context *ctx, const unsigned char *key, int keysize);
58
66void aes_encrypt(aes_context *ctx, unsigned char input[16], unsigned char output[16]);
67
75void aes_decrypt(aes_context *ctx, unsigned char input[16], unsigned char output[16]);
76
86void aes_cbc_encrypt(aes_context *ctx, unsigned char iv[16], unsigned char *input, unsigned char *output, int len);
87
97void aes_cbc_decrypt(aes_context *ctx, unsigned char iv[16], unsigned char *input, unsigned char *output, int len);
98
104int aes_self_test(int verbose);
105
106#endif /* aes.h */
107
void aes_encrypt(aes_context *ctx, unsigned char input[16], unsigned char output[16])
AES block encryption (ECB mode)
int aes_self_test(int verbose)
Checkup routine.
Definition aes/src/main.cpp:33
void aes_decrypt(aes_context *ctx, unsigned char input[16], unsigned char output[16])
AES block decryption (ECB mode)
void aes_cbc_encrypt(aes_context *ctx, unsigned char iv[16], unsigned char *input, unsigned char *output, int len)
AES-CBC buffer encryption.
void aes_cbc_decrypt(aes_context *ctx, unsigned char iv[16], unsigned char *input, unsigned char *output, int len)
AES-CBC buffer decryption.
void aes_set_key(aes_context *ctx, const unsigned char *key, int keysize)
AES key schedule.
AES context structure.
Definition aes.h:44
int nr
Definition aes.h:47