资源介绍
AES128实现
inline void Generate_key(State *k,row W[])
{
int i;
unsigned int tmp;
for(i=0;i<4;i++)
W[i].b = k->b[i];
for(i=4;i<11*4;i++)
{
tmp = W[i-1].b;
if(!(i%4))
{
tmp = (tmp>>8)|(tmp<<24);
tmp = Sbox_row((row *)&tmp)^Rcon[i/4];
}
W[i].b = W[i-4].b^tmp;
}
}