blob: d2f6cd58907f4ded738aed95c627de44b847a68d (
plain) (
blame)
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
38
39
40
41
42
|
/**
* \file
* \author Egor Tensin <Egor.Tensin@gmail.com>
* \date 2015
* \copyright This file is licensed under the terms of the MIT License.
* See LICENSE.txt for details.
*/
#pragma once
#include <emmintrin.h>
typedef __m128i AesBlock;
AesBlock make_aes_block(int highest, int high, int low, int lowest);
typedef AesBlock Aes128Key;
typedef struct
{
AesBlock hi;
AesBlock lo;
}
Aes192Key;
typedef struct
{
AesBlock hi;
AesBlock lo;
}
Aes256Key;
typedef struct
{
unsigned char bytes[4][4];
}
AesState;
AesState aes_block_to_state(AesBlock);
AesBlock aes_state_to_block(AesState);
void print_aes_block(AesBlock);
|