2 * GF-Complete: A Comprehensive Open Source Library for Galois Field Arithmetic
3 * James S. Plank, Ethan L. Miller, Kevin M. Greenan,
4 * Benjamin A. Arnold, John A. Burnum, Adam W. Disney, Allen C. McBride.
8 * Defines and data structures for 16-bit Galois fields
11 #ifndef GF_COMPLETE_GF_W16_H
12 #define GF_COMPLETE_GF_W16_H
16 #define GF_FIELD_WIDTH (16)
17 #define GF_FIELD_SIZE (1 << GF_FIELD_WIDTH)
18 #define GF_MULT_GROUP_SIZE GF_FIELD_SIZE-1
20 #define GF_BASE_FIELD_WIDTH (8)
21 #define GF_BASE_FIELD_SIZE (1 << GF_BASE_FIELD_WIDTH)
23 struct gf_w16_logtable_data {
24 uint16_t log_tbl[GF_FIELD_SIZE];
25 uint16_t antilog_tbl[GF_FIELD_SIZE * 2];
26 uint16_t inv_tbl[GF_FIELD_SIZE];
30 struct gf_w16_zero_logtable_data {
31 int log_tbl[GF_FIELD_SIZE];
32 uint16_t _antilog_tbl[GF_FIELD_SIZE * 4];
33 uint16_t *antilog_tbl;
34 uint16_t inv_tbl[GF_FIELD_SIZE];
37 struct gf_w16_lazytable_data {
38 uint16_t log_tbl[GF_FIELD_SIZE];
39 uint16_t antilog_tbl[GF_FIELD_SIZE * 2];
40 uint16_t inv_tbl[GF_FIELD_SIZE];
42 uint16_t lazytable[GF_FIELD_SIZE];
45 struct gf_w16_bytwo_data {
51 struct gf_w16_split_8_8_data {
52 uint16_t tables[3][256][256];
55 struct gf_w16_group_4_4_data {
60 struct gf_w16_composite_data {
64 void gf_w16_neon_split_init(gf_t *gf);
66 #endif /* GF_COMPLETE_GF_W16_H */