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 32-bit Galois fields
11 #ifndef GF_COMPLETE_GF_W32_H
12 #define GF_COMPLETE_GF_W32_H
16 #define GF_FIELD_WIDTH (32)
17 #define GF_FIRST_BIT ((gf_val_32_t)1 << 31)
19 #define GF_BASE_FIELD_WIDTH (16)
20 #define GF_BASE_FIELD_SIZE (1 << GF_BASE_FIELD_WIDTH)
21 #define GF_BASE_FIELD_GROUP_SIZE GF_BASE_FIELD_SIZE-1
22 #define GF_MULTBY_TWO(p) (((p) & GF_FIRST_BIT) ? (((p) << 1) ^ h->prim_poly) : (p) << 1)
24 struct gf_split_2_32_lazy_data {
25 uint32_t tables[16][4];
29 struct gf_w32_split_8_8_data {
30 uint32_t tables[7][256][256];
31 uint32_t region_tables[4][256];
35 struct gf_w32_group_data {
43 struct gf_split_16_32_lazy_data {
44 uint32_t tables[2][(1<<16)];
48 struct gf_split_8_32_lazy_data {
49 uint32_t tables[4][256];
53 struct gf_split_4_32_lazy_data {
54 uint32_t tables[8][16];
58 struct gf_w32_bytwo_data {
64 struct gf_w32_composite_data {
69 void gf_w32_neon_split_init(gf_t *gf);
71 #endif /* GF_COMPLETE_GF_W32_H */