Chameleon-Mini
CryptoTests.h
1 /* CryptoTests.h */
2 
3 #ifdef ENABLE_CRYPTO_TESTS
4 
5 #ifndef __CRYPTO_TESTS_H__
6 #define __CRYPTO_TESTS_H__
7 
8 #include "../Common.h"
9 #include "../Terminal/Terminal.h"
10 #include "../Application/CryptoTDEA.h"
11 #include "../Application/CryptoAES128.h"
12 
13 #include <stdlib.h>
14 #include <string.h>
15 #include <inttypes.h>
16 #include <stdbool.h>
17 
18 /* DES crypto test cases: */
19 
20 /* Test 2KTDEA encryption, ECB mode: */
21 bool CryptoTDEATestCase1(char *OutParam, uint16_t MaxOutputLength);
22 
23 /* Test 2KTDEA encryption, CBC receive mode: */
24 bool CryptoTDEATestCase2(char *OutParam, uint16_t MaxOutputLength);
25 
26 /* AES-128 crypto test cases: */
27 
28 /* Test AES-128 encrypt/decrypt for a single block (ECB mode): */
29 bool CryptoAESTestCase1(char *OutParam, uint16_t MaxOutputLength);
30 
31 /* Test AES-128 encrypt/decrypt for a single-block buffer (CBC mode, with an IV) -- Version 1:
32  * Adapted from: https://github.com/eewiki/asf/blob/master/xmega/drivers/aes/example2/aes_example2.c
33  */
34 bool CryptoAESTestCase2(char *OutParam, uint16_t MaxOutputLength);
35 
36 #endif /* __CRYPTO_TESTS_H__ */
37 
38 #endif /* ENABLE_CRYPTO_TESTS */