Lines Matching refs:x

77 #define f1(x)   (x)  argument
78 #define f2(x) ((x << 1) ^ (((x >> 7) & 1) * WPOLY)) argument
79 #define f4(x) ((x << 2) ^ (((x >> 6) & 1) * WPOLY) ^ (((x >> 6) & 2) * WPOLY)) argument
80 #define f8(x) ((x << 3) ^ (((x >> 5) & 1) * WPOLY) ^ (((x >> 5) & 2) * WPOLY) \ argument
81 ^ (((x >> 5) & 4) * WPOLY))
82 #define d2(x) (((x) >> 1) ^ ((x) & 1 ? DPOLY : 0)) argument
84 #define f3(x) (f2(x) ^ x) argument
85 #define f9(x) (f8(x) ^ x) argument
86 #define fb(x) (f8(x) ^ f2(x) ^ x) argument
87 #define fd(x) (f8(x) ^ f4(x) ^ x) argument
88 #define fe(x) (f8(x) ^ f4(x) ^ f2(x)) argument
210 #define s_box(x) sbox[(x)] argument
212 #define is_box(x) isbox[(x)] argument
214 #define gfm2_sb(x) gfm2_sbox[(x)] argument
215 #define gfm3_sb(x) gfm3_sbox[(x)] argument
217 #define gfm_9(x) gfmul_9[(x)] argument
218 #define gfm_b(x) gfmul_b[(x)] argument
219 #define gfm_d(x) gfmul_d[(x)] argument
220 #define gfm_e(x) gfmul_e[(x)] argument
229 static uint8_t hibit(const uint8_t x) in hibit() argument
230 { uint8_t r = (uint8_t)((x >> 1) | (x >> 2)); in hibit()
239 static uint8_t gf_inv(const uint8_t x) in gf_inv() argument
240 { uint8_t p1 = x, p2 = BPOLY, n1 = hibit(x), n2 = 0x80, v1 = 1, v2 = 0; in gf_inv()
242 if(x < 2) in gf_inv()
243 return x; in gf_inv()
272 uint8_t fwd_affine(const uint8_t x) in fwd_affine() argument
275 uint32_t w = x; in fwd_affine()
279 return 0x63 ^ x ^ (x << 1) ^ (x << 2) ^ (x << 3) ^ (x << 4) in fwd_affine()
280 ^ (x >> 7) ^ (x >> 6) ^ (x >> 5) ^ (x >> 4); in fwd_affine()
284 uint8_t inv_affine(const uint8_t x) in inv_affine() argument
287 uint32_t w = x; in inv_affine()
291 return 0x05 ^ (x << 1) ^ (x << 3) ^ (x << 6) in inv_affine()
292 ^ (x >> 7) ^ (x >> 5) ^ (x >> 2); in inv_affine()
296 #define s_box(x) fwd_affine(gf_inv(x)) argument
297 #define is_box(x) gf_inv(inv_affine(x)) argument
298 #define gfm2_sb(x) f2(s_box(x)) argument
299 #define gfm3_sb(x) f3(s_box(x)) argument
300 #define gfm_9(x) f9(x) argument
301 #define gfm_b(x) fb(x) argument
302 #define gfm_d(x) fd(x) argument
303 #define gfm_e(x) fe(x) argument