Lines Matching refs:idx
503 int idx; in add_round_key() local
505 for (idx = 0; idx < 4; idx++) in add_round_key()
506 state[idx] ^= key[idx]; in add_round_key()
541 u32 idx, aes_rounds, aes_keycols; in aes_expand_key() local
548 for (idx = aes_keycols; idx < AES_STATECOLS * (aes_rounds + 1); idx++) { in aes_expand_key()
549 tmp0 = expkey[4*idx - 4]; in aes_expand_key()
550 tmp1 = expkey[4*idx - 3]; in aes_expand_key()
551 tmp2 = expkey[4*idx - 2]; in aes_expand_key()
552 tmp3 = expkey[4*idx - 1]; in aes_expand_key()
553 if (!(idx % aes_keycols)) { in aes_expand_key()
556 tmp0 = sbox[tmp1] ^ rcon[idx / aes_keycols]; in aes_expand_key()
559 } else if ((aes_keycols > 6) && (idx % aes_keycols == 4)) { in aes_expand_key()
566 expkey[4*idx+0] = expkey[4*idx - 4*aes_keycols + 0] ^ tmp0; in aes_expand_key()
567 expkey[4*idx+1] = expkey[4*idx - 4*aes_keycols + 1] ^ tmp1; in aes_expand_key()
568 expkey[4*idx+2] = expkey[4*idx - 4*aes_keycols + 2] ^ tmp2; in aes_expand_key()
569 expkey[4*idx+3] = expkey[4*idx - 4*aes_keycols + 3] ^ tmp3; in aes_expand_key()