-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgalois_field2.h
More file actions
29 lines (22 loc) · 973 Bytes
/
galois_field2.h
File metadata and controls
29 lines (22 loc) · 973 Bytes
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
#ifndef GALOIS_FIELD2_H
#define GALOIS_FIELD2_H
#define GF2_VECTOR_MAX_BYTELEN (32UL)
long gf2_degree_lsb(const unsigned char* in, unsigned long bytelen);
void gf2_multiply_lsb(const unsigned char* in1,
const unsigned char* in2,
unsigned char* out,
unsigned long bytelen);
void gf2_reduce_lsb(unsigned char* inout_reducible,
unsigned long reducible_bytelen,
const unsigned char* in_reducer,
unsigned long reducer_bytelen);
void gf2_lshift_lsb(unsigned char* dst,
const unsigned char* src,
unsigned long bytelen,
unsigned int shift_bits);
void gf2_binary_inverse_lsb(
const unsigned char* in,
unsigned char* out,
unsigned long bytelen,
const unsigned char* modulus);
#endif // GALOIS_FIELD2_H