Revision 17c78b08

View differences:

libavutil/aes.c
61 61
    s3[0][1]=box[s3[1][13]]; s3[0][13]=box[s3[1][ 9]]; s3[0][ 9]=box[s3[1][ 5]]; s3[0][ 5]=box[s3[1][ 1]];
62 62
}
63 63

  
64
static inline int mix_core(uint32_t multbl[4][256], int a, int b, int c, int d){
64
static inline int mix_core(uint32_t multbl[][256], int a, int b, int c, int d){
65 65
#if CONFIG_SMALL
66 66
#define ROT(x,s) ((x<<s)|(x>>(32-s)))
67 67
    return multbl[0][a] ^ ROT(multbl[0][b], 8) ^ ROT(multbl[0][c], 16) ^ ROT(multbl[0][d], 24);
......
70 70
#endif
71 71
}
72 72

  
73
static inline void mix(uint8_t state[2][4][4], uint32_t multbl[4][256], int s1, int s3){
73
static inline void mix(uint8_t state[2][4][4], uint32_t multbl[][256], int s1, int s3){
74 74
    ((uint32_t *)(state))[0] = mix_core(multbl, state[1][0][0], state[1][s1  ][1], state[1][2][2], state[1][s3  ][3]);
75 75
    ((uint32_t *)(state))[1] = mix_core(multbl, state[1][1][0], state[1][s3-1][1], state[1][3][2], state[1][s1-1][3]);
76 76
    ((uint32_t *)(state))[2] = mix_core(multbl, state[1][2][0], state[1][s3  ][1], state[1][0][2], state[1][s1  ][3]);
77 77
    ((uint32_t *)(state))[3] = mix_core(multbl, state[1][3][0], state[1][s1-1][1], state[1][1][2], state[1][s3-1][3]);
78 78
}
79 79

  
80
static inline void crypt(AVAES *a, int s, const uint8_t *sbox, const uint32_t *multbl){
80
static inline void crypt(AVAES *a, int s, const uint8_t *sbox, uint32_t multbl[][256]){
81 81
    int r;
82 82

  
83 83
    for(r=a->rounds-1; r>0; r--){

Also available in: Unified diff