Lines Matching refs:i
76 unsigned int i; in tc_aes128_set_encrypt_key() local
85 for (i = 0; i < Nk; ++i) { in tc_aes128_set_encrypt_key()
86 s->words[i] = ((uint32_t)k[Nb*i]<<24) | (k[Nb*i+1]<<16) | in tc_aes128_set_encrypt_key()
87 (k[Nb*i+2]<<8) | (k[Nb*i+3]); in tc_aes128_set_encrypt_key()
90 for (; i < (Nb * (Nr + 1)); ++i) { in tc_aes128_set_encrypt_key()
91 t = s->words[i-1]; in tc_aes128_set_encrypt_key()
92 if ((i % Nk) == 0) { in tc_aes128_set_encrypt_key()
93 t = subword(rotword(t)) ^ rconst[i/Nk]; in tc_aes128_set_encrypt_key()
95 s->words[i] = s->words[i-Nk] ^ t; in tc_aes128_set_encrypt_key()
115 unsigned int i; in sub_bytes() local
117 for (i = 0; i < (Nb * Nk); ++i) { in sub_bytes()
118 s[i] = sbox[s[i]]; in sub_bytes()
161 unsigned int i; in tc_aes_encrypt() local
174 for (i = 0; i < (Nr - 1); ++i) { in tc_aes_encrypt()
178 add_round_key(state, s->words + Nb*(i+1)); in tc_aes_encrypt()
183 add_round_key(state, s->words + Nb*(i+1)); in tc_aes_encrypt()