Lines Matching refs:ctx
1150 t ^= ctx->key_enc[4 * i]; \
1151 ctx->key_enc[4 * i + 4] = t; \
1152 t ^= ctx->key_enc[4 * i + 1]; \
1153 ctx->key_enc[4 * i + 5] = t; \
1154 t ^= ctx->key_enc[4 * i + 2]; \
1155 ctx->key_enc[4 * i + 6] = t; \
1156 t ^= ctx->key_enc[4 * i + 3]; \
1157 ctx->key_enc[4 * i + 7] = t; \
1163 t ^= ctx->key_enc[6 * i]; \
1164 ctx->key_enc[6 * i + 6] = t; \
1165 t ^= ctx->key_enc[6 * i + 1]; \
1166 ctx->key_enc[6 * i + 7] = t; \
1167 t ^= ctx->key_enc[6 * i + 2]; \
1168 ctx->key_enc[6 * i + 8] = t; \
1169 t ^= ctx->key_enc[6 * i + 3]; \
1170 ctx->key_enc[6 * i + 9] = t; \
1171 t ^= ctx->key_enc[6 * i + 4]; \
1172 ctx->key_enc[6 * i + 10] = t; \
1173 t ^= ctx->key_enc[6 * i + 5]; \
1174 ctx->key_enc[6 * i + 11] = t; \
1180 t ^= ctx->key_enc[8 * i]; \
1181 ctx->key_enc[8 * i + 8] = t; \
1182 t ^= ctx->key_enc[8 * i + 1]; \
1183 ctx->key_enc[8 * i + 9] = t; \
1184 t ^= ctx->key_enc[8 * i + 2]; \
1185 ctx->key_enc[8 * i + 10] = t; \
1186 t ^= ctx->key_enc[8 * i + 3]; \
1187 ctx->key_enc[8 * i + 11] = t; \
1192 t = ctx->key_enc[8 * i + 4] ^ ls_box(t); \
1193 ctx->key_enc[8 * i + 12] = t; \
1194 t ^= ctx->key_enc[8 * i + 5]; \
1195 ctx->key_enc[8 * i + 13] = t; \
1196 t ^= ctx->key_enc[8 * i + 6]; \
1197 ctx->key_enc[8 * i + 14] = t; \
1198 t ^= ctx->key_enc[8 * i + 7]; \
1199 ctx->key_enc[8 * i + 15] = t; \
1216 int crypto_aes_expand_key(struct crypto_aes_ctx *ctx, const u8 *in_key, in crypto_aes_expand_key() argument
1226 ctx->key_length = key_len; in crypto_aes_expand_key()
1228 ctx->key_dec[key_len + 24] = ctx->key_enc[0] = le32_to_cpu(key[0]); in crypto_aes_expand_key()
1229 ctx->key_dec[key_len + 25] = ctx->key_enc[1] = le32_to_cpu(key[1]); in crypto_aes_expand_key()
1230 ctx->key_dec[key_len + 26] = ctx->key_enc[2] = le32_to_cpu(key[2]); in crypto_aes_expand_key()
1231 ctx->key_dec[key_len + 27] = ctx->key_enc[3] = le32_to_cpu(key[3]); in crypto_aes_expand_key()
1235 t = ctx->key_enc[3]; in crypto_aes_expand_key()
1241 ctx->key_enc[4] = le32_to_cpu(key[4]); in crypto_aes_expand_key()
1242 t = ctx->key_enc[5] = le32_to_cpu(key[5]); in crypto_aes_expand_key()
1248 ctx->key_enc[4] = le32_to_cpu(key[4]); in crypto_aes_expand_key()
1249 ctx->key_enc[5] = le32_to_cpu(key[5]); in crypto_aes_expand_key()
1250 ctx->key_enc[6] = le32_to_cpu(key[6]); in crypto_aes_expand_key()
1251 t = ctx->key_enc[7] = le32_to_cpu(key[7]); in crypto_aes_expand_key()
1258 ctx->key_dec[0] = ctx->key_enc[key_len + 24]; in crypto_aes_expand_key()
1259 ctx->key_dec[1] = ctx->key_enc[key_len + 25]; in crypto_aes_expand_key()
1260 ctx->key_dec[2] = ctx->key_enc[key_len + 26]; in crypto_aes_expand_key()
1261 ctx->key_dec[3] = ctx->key_enc[key_len + 27]; in crypto_aes_expand_key()
1265 imix_col(ctx->key_dec[j], ctx->key_enc[i]); in crypto_aes_expand_key()
1285 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); in crypto_aes_set_key() local
1289 ret = crypto_aes_expand_key(ctx, in_key, key_len); in crypto_aes_set_key()
1331 const struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); in aes_encrypt() local
1335 const u32 *kp = ctx->key_enc + 4; in aes_encrypt()
1336 const int key_len = ctx->key_length; in aes_encrypt()
1338 b0[0] = le32_to_cpu(src[0]) ^ ctx->key_enc[0]; in aes_encrypt()
1339 b0[1] = le32_to_cpu(src[1]) ^ ctx->key_enc[1]; in aes_encrypt()
1340 b0[2] = le32_to_cpu(src[2]) ^ ctx->key_enc[2]; in aes_encrypt()
1341 b0[3] = le32_to_cpu(src[3]) ^ ctx->key_enc[3]; in aes_encrypt()
1403 const struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); in aes_decrypt() local
1407 const int key_len = ctx->key_length; in aes_decrypt()
1408 const u32 *kp = ctx->key_dec + 4; in aes_decrypt()
1410 b0[0] = le32_to_cpu(src[0]) ^ ctx->key_dec[0]; in aes_decrypt()
1411 b0[1] = le32_to_cpu(src[1]) ^ ctx->key_dec[1]; in aes_decrypt()
1412 b0[2] = le32_to_cpu(src[2]) ^ ctx->key_dec[2]; in aes_decrypt()
1413 b0[3] = le32_to_cpu(src[3]) ^ ctx->key_dec[3]; in aes_decrypt()