aestab.c File Reference
`#include "aes.h"`
`#include "aesopt.h"`
`#include "aestab.h"`

## Macros

#define | DO_TABLES
#define | sb_data(w)
#define | isb_data(w)
#define | mm_data(w)
#define | rc_data(w)
#define | h0(x) (x)
#define | w0(p) bytes2word(p, 0, 0, 0)
#define | w1(p) bytes2word(0, p, 0, 0)
#define | w2(p) bytes2word(0, 0, p, 0)
#define | w3(p) bytes2word(0, 0, 0, p)
#define | u0(p) bytes2word(f2(p), p, p, f3(p))
#define | u1(p) bytes2word(f3(p), f2(p), p, p)
#define | u2(p) bytes2word(p, f3(p), f2(p), p)
#define | u3(p) bytes2word(p, p, f3(p), f2(p))
#define | v0(p) bytes2word(fe(p), f9(p), fd(p), fb(p))
#define | v1(p) bytes2word(fb(p), fe(p), f9(p), fd(p))
#define | v2(p) bytes2word(fd(p), fb(p), fe(p), f9(p))
#define | v3(p) bytes2word(f9(p), fd(p), fb(p), fe(p))
#define | f2(x) ((x<<1) ^ (((x>>7) & 1) * WPOLY))
#define | f4(x) ((x<<2) ^ (((x>>6) & 1) * WPOLY) ^ (((x>>6) & 2) * WPOLY))
#define | f8(x)
#define | f3(x) (f2(x) ^ x)
#define | f9(x) (f8(x) ^ x)
#define | fb(x) (f8(x) ^ f2(x) ^ x)
#define | fd(x) (f8(x) ^ f4(x) ^ x)
#define | fe(x) (f8(x) ^ f4(x) ^ f2(x))

## Functions

AES_RETURN | aes_init (void)

## Macro Definition Documentation

## DO_TABLES

#define DO_TABLES

## f2

#define f2 | ( |  | x | ) | ((x<<1) ^ (((x>>7) & 1) * WPOLY))

## f3

#define f3 | ( |  | x | ) | (f2(x) ^ x)

## f4

#define f4 | ( |  | x | ) | ((x<<2) ^ (((x>>6) & 1) * WPOLY) ^ (((x>>6) & 2) * WPOLY))

## f8

#define f8 | ( |  | x | ) |

Value:
((x<<3) ^ (((x>>5) & 1) * WPOLY) ^ (((x>>5) & 2) * WPOLY) \
^ (((x>>5) & 4) * WPOLY))
WPOLY
#define WPOLY
Definition: aesopt.h:601

## f9

#define f9 | ( |  | x | ) | (f8(x) ^ x)

## fb

#define fb | ( |  | x | ) | (f8(x) ^ f2(x) ^ x)

## fd

#define fd | ( |  | x | ) | (f8(x) ^ f4(x) ^ x)

## fe

#define fe | ( |  | x | ) | (f8(x) ^ f4(x) ^ f2(x))

## h0

#define h0 | ( |  | x | ) | (x)

## isb_data

#define isb_data | ( |  | w | ) |

## mm_data

#define mm_data | ( |  | w | ) |

## rc_data

#define rc_data | ( |  | w | ) |

Value:
{\
w(0x01), w(0x02), w(0x04), w(0x08), w(0x10),w(0x20), w(0x40), w(0x80),\
w(0x1b), w(0x36) }

## sb_data

#define sb_data | ( |  | w | ) |

## u0

#define u0 | ( |  | p | ) | bytes2word(f2(p), p, p, f3(p))

## u1

#define u1 | ( |  | p | ) | bytes2word(f3(p), f2(p), p, p)

## u2

#define u2 | ( |  | p | ) | bytes2word(p, f3(p), f2(p), p)

## u3

#define u3 | ( |  | p | ) | bytes2word(p, p, f3(p), f2(p))

## v0

#define v0 | ( |  | p | ) | bytes2word(fe(p), f9(p), fd(p), fb(p))

## v1

#define v1 | ( |  | p | ) | bytes2word(fb(p), fe(p), f9(p), fd(p))

## v2

#define v2 | ( |  | p | ) | bytes2word(fd(p), fb(p), fe(p), f9(p))

## v3

#define v3 | ( |  | p | ) | bytes2word(f9(p), fd(p), fb(p), fe(p))

## w0

#define w0 | ( |  | p | ) | bytes2word(p, 0, 0, 0)

## w1

#define w1 | ( |  | p | ) | bytes2word(0, p, 0, 0)

## w2

#define w2 | ( |  | p | ) | bytes2word(0, 0, p, 0)

## w3

#define w3 | ( |  | p | ) | bytes2word(0, 0, 0, p)

## Function Documentation

## aes_init()

AES_RETURN aes_init | ( | void |  | ) |