Lines Matching refs:ks
157 uint32_t i, *ks = ctx->K, roundConstant = 0x01000000; in aesInitForEncr() local
163 for (i = 0; i < 7; i++, ks += 8, roundConstant <<= 1) { in aesInitForEncr()
164 ks[8] = ks[0] ^ roundConstant in aesInitForEncr()
165 ^ (((uint32_t)FwdSbox[(ks[ 7] >> 16) & 0xff]) << 24) in aesInitForEncr()
166 ^ (((uint32_t)FwdSbox[(ks[ 7] >> 8) & 0xff]) << 16) in aesInitForEncr()
167 ^ (((uint32_t)FwdSbox[(ks[ 7] >> 0) & 0xff]) << 8) in aesInitForEncr()
168 ^ (((uint32_t)FwdSbox[(ks[ 7] >> 24) & 0xff]) << 0); in aesInitForEncr()
169 ks[9] = ks[1] ^ ks[8]; in aesInitForEncr()
170 ks[10] = ks[2] ^ ks[9]; in aesInitForEncr()
171 ks[11] = ks[3] ^ ks[10]; in aesInitForEncr()
172 ks[12] = ks[4] in aesInitForEncr()
173 ^ (((uint32_t)FwdSbox[(ks[11] >> 24) & 0xff]) << 24) in aesInitForEncr()
174 ^ (((uint32_t)FwdSbox[(ks[11] >> 16) & 0xff]) << 16) in aesInitForEncr()
175 ^ (((uint32_t)FwdSbox[(ks[11] >> 8) & 0xff]) << 8) in aesInitForEncr()
176 ^ (((uint32_t)FwdSbox[(ks[11] >> 0) & 0xff]) << 0); in aesInitForEncr()
177 ks[13] = ks[5] ^ ks[12]; in aesInitForEncr()
178 ks[14] = ks[6] ^ ks[13]; in aesInitForEncr()
179 ks[15] = ks[7] ^ ks[14]; in aesInitForEncr()
185 uint32_t i, j, *ks = ctx->K + 4, *encrK = tmpSpace->tmpCtx.K + 52; in aesInitForDecr() local
192 …for (i = 0; i < AES_NUM_ROUNDS - 1; i++, encrK -= 4, ks += 4) { //num_rounds-1 seems to be concens… in aesInitForDecr()
194 ks[j] = in aesInitForDecr()
201 memcpy(ks, encrK, sizeof(uint32_t[4])); in aesInitForDecr()