-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgf2_2_tables.h
36 lines (29 loc) · 943 Bytes
/
gf2_2_tables.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
/* these tables were generated with polynomial: 7 */
#ifndef GF2_2_TABLES
#define GF2_2_TABLES
/* clang-format off */
static const uint8_t GF2_2_LOG[] =
{
3, 0, 1, 2,};
static const uint8_t GF2_2_EXP[] =
{
1, 2, 3, 1, 2, 3,};
static const uint8_t GF2_2_INV[] =
{
0, 1, 3, 2,};
static const uint8_t GF2_2_SHUF_LO[] =
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
0, 2, 3, 1, 8, 10, 11, 9, 12, 14, 15, 13, 4, 6, 7, 5,
0, 3, 1, 2, 12, 15, 13, 14, 4, 7, 5, 6, 8, 11, 9, 10,
};
static const uint8_t GF2_2_SHUF_HI[] =
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 16, 32, 48, 0, 80, 96,112, 0,144,160,176, 0,208,224,240,
0, 32, 48, 16, 0,160,176,144, 0,224,240,208, 0, 96,112, 80,
0, 48, 16, 32, 0,240,208,224, 0,112, 80, 96, 0,176,144,160,
};
/* clang-format on */
#endif