Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 546 Bytes

aes.h

File metadata and controls

18 lines (13 loc) · 546 Bytes
 
Dec 18, 2013
Dec 18, 2013
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef _INCL_AES_H_
#define _INCL_AES_H_
#include <stdint.h>
// AES-128 only supports Nb=4
#define aesNb 4 // number of columns in the state & expanded key
#define aesNk 4 // number of columns in a key
#define aesNr 10 // number of rounds in encryption
#define aesExpandedKeySize (4 * aesNb * (aesNr + 1))
void aesExpandKey(const uint8_t *key, uint8_t *expkey);
// these do one 128-bit block at a time.
void aesEncrypt (uint8_t *in, uint8_t *expkey, uint8_t *out);
void aesDecrypt (uint8_t *in, uint8_t *expkey, uint8_t *out);
#endif