Lines Matching defs:ctx
215 memcpy(skreq->iv, basereq->chain.last->op->ctx.skcipher.iv,
233 void *ctx = crypto_tfm_ctx(tfm);
235 memzero_explicit(ctx, tfm->__crt_alg->cra_ctxsize);
240 struct mv_cesa_ctx *ctx = crypto_tfm_ctx(tfm);
242 ctx->ops = &mv_cesa_skcipher_req_ops;
254 struct mv_cesa_aes_ctx *ctx = crypto_tfm_ctx(tfm);
260 ret = aes_expandkey(&ctx->aes, key, len);
264 remaining = (ctx->aes.key_length - 16) / 4;
265 offset = ctx->aes.key_length + 24 - remaining;
267 ctx->aes.key_dec[4 + i] = ctx->aes.key_enc[offset + i];
275 struct mv_cesa_des_ctx *ctx = crypto_skcipher_ctx(cipher);
282 memcpy(ctx->key, key, DES_KEY_SIZE);
290 struct mv_cesa_des3_ctx *ctx = crypto_skcipher_ctx(cipher);
297 memcpy(ctx->key, key, DES3_EDE_KEY_SIZE);
470 struct mv_cesa_des_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
475 memcpy(tmpl->ctx.skcipher.key, ctx->key, DES_KEY_SIZE);
529 memcpy(tmpl->ctx.skcipher.iv, req->iv, DES_BLOCK_SIZE);
577 struct mv_cesa_des3_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
582 memcpy(tmpl->ctx.skcipher.key, ctx->key, DES3_EDE_KEY_SIZE);
635 memcpy(tmpl->ctx.skcipher.iv, req->iv, DES3_EDE_BLOCK_SIZE);
689 struct mv_cesa_aes_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
697 key = ctx->aes.key_dec;
699 key = ctx->aes.key_enc;
701 for (i = 0; i < ctx->aes.key_length / sizeof(u32); i++)
702 tmpl->ctx.skcipher.key[i] = cpu_to_le32(key[i]);
704 if (ctx->aes.key_length == 24)
706 else if (ctx->aes.key_length == 32)
764 memcpy(tmpl->ctx.skcipher.iv, req->iv, AES_BLOCK_SIZE);