comparison aes.c @ 172:96094ee43c14 libavutil

memcpy
author michael
date Sun, 14 Jan 2007 13:37:19 +0000
parents acc949f04f7a
children 712b0f43e8ac
comparison
equal deleted inserted replaced
171:acc949f04f7a 172:96094ee43c14
144 144
145 memcpy(tk, key, KC*4); 145 memcpy(tk, key, KC*4);
146 146
147 for(t= 0; t < (rounds+1)*4; ) { 147 for(t= 0; t < (rounds+1)*4; ) {
148 for(j = 0; (j < KC) && (t < (rounds+1)*4); j++, t++) 148 for(j = 0; (j < KC) && (t < (rounds+1)*4); j++, t++)
149 for(i = 0; i < 4; i++) 149 memcpy(a->round_key[0][t], tk[j], 4);
150 a->round_key[0][t][i] = tk[j][i];
151 150
152 for(i = 0; i < 4; i++) 151 for(i = 0; i < 4; i++)
153 tk[0][i] ^= sbox[tk[KC-1][(i+1)&3]]; 152 tk[0][i] ^= sbox[tk[KC-1][(i+1)&3]];
154 tk[0][0] ^= rcon[rconpointer++]; 153 tk[0][0] ^= rcon[rconpointer++];
155 154