Lines Matching refs:ctx

57 static int num_rounds(struct crypto_aes_ctx *ctx)
66 return 6 + ctx->key_length / 4;
69 static int ce_aes_expandkey(struct crypto_aes_ctx *ctx, const u8 *in_key,
88 ctx->key_length = key_len;
90 ctx->key_enc[i] = get_unaligned_le32(in_key + i * sizeof(u32));
94 u32 *rki = ctx->key_enc + (i * kwords);
124 key_enc = (struct aes_block *)ctx->key_enc;
125 key_dec = (struct aes_block *)ctx->key_dec;
126 j = num_rounds(ctx);
140 struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm);
142 return ce_aes_expandkey(ctx, in_key, key_len);
153 struct crypto_aes_xts_ctx *ctx = crypto_skcipher_ctx(tfm);
160 ret = ce_aes_expandkey(&ctx->key1, in_key, key_len / 2);
162 ret = ce_aes_expandkey(&ctx->key2, &in_key[key_len / 2],
170 struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm);
180 ctx->key_enc, num_rounds(ctx), blocks);
190 struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm);
200 ctx->key_dec, num_rounds(ctx), blocks);
211 struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm);
218 ctx->key_enc, num_rounds(ctx), blocks,
241 struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm);
248 ctx->key_dec, num_rounds(ctx), blocks,
270 struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm);
318 ctx->key_enc, num_rounds(ctx), walk.nbytes,
328 struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm);
376 ctx->key_dec, num_rounds(ctx), walk.nbytes,
386 struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm);
395 ctx->key_enc, num_rounds(ctx), blocks,
412 ce_aes_ctr_encrypt(tail, NULL, ctx->key_enc, num_rounds(ctx),
423 struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm);
432 aes_encrypt(ctx, dst, src);
447 struct crypto_aes_xts_ctx *ctx = crypto_skcipher_ctx(tfm);
448 int err, first, rounds = num_rounds(&ctx->key1);
487 ctx->key1.key_enc, rounds, nbytes, walk.iv,
488 ctx->key2.key_enc, first);
509 ctx->key1.key_enc, rounds, walk.nbytes, walk.iv,
510 ctx->key2.key_enc, first);
519 struct crypto_aes_xts_ctx *ctx = crypto_skcipher_ctx(tfm);
520 int err, first, rounds = num_rounds(&ctx->key1);
559 ctx->key1.key_dec, rounds, nbytes, walk.iv,
560 ctx->key2.key_enc, first);
581 ctx->key1.key_dec, rounds, walk.nbytes, walk.iv,
582 ctx->key2.key_enc, first);