-
Notifications
You must be signed in to change notification settings - Fork 2
/
TestAES.h
37 lines (30 loc) · 1.82 KB
/
TestAES.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#
# #
# AVR-AES-Faster Library #
# (c) 2020 Radosław Gancarz <radgan99@gmail.com> #
# #
# This Source Code Form is subject to the terms of the Mozilla Public #
# License, v. 2.0. If a copy of the MPL was not distributed with this #
# file, You can obtain one at http://mozilla.org/MPL/2.0/. #
# #
#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#*/
/****************************************************************************
* *
* Pure C implementation of Advanced Encryption Standard with on fly S-Box *
* FOR TEST PURPOSES ONLY - DIRTY, SLOW, SUSCEPTIBLE TO TIMING ATTACKS *
* *
****************************************************************************/
#ifndef TESTAES_H_INCLUDED
#define TESTAES_H_INCLUDED
#include <stdint.h>
extern void TestAES_ExpandKey(const uint8_t *key, uint8_t *xkey,
uint8_t nk, uint8_t nr);
extern void TestAES_ExpandKeyInv(const uint8_t *key, uint8_t *xkey,
uint8_t nk, uint8_t nr);
extern void TestAES_Encrypt( const uint8_t *in, uint8_t *out,
const uint8_t *xkey, uint8_t nr);
extern void TestAES_DecryptInv( const uint8_t *in, uint8_t *out,
const uint8_t *xkey, uint8_t nr);
extern void TestAES_DecryptEqu( const uint8_t *in, uint8_t *out,
const uint8_t *xkey, uint8_t nr);
#endif