Lines Matching full:aes

3  * AMD Cryptographic Coprocessor (CCP) AES crypto API support
16 #include <crypto/aes.h>
32 if (ctx->u.aes.mode != CCP_AES_MODE_ECB) in ccp_aes_complete()
46 ctx->u.aes.type = CCP_AES_TYPE_128; in ccp_aes_setkey()
49 ctx->u.aes.type = CCP_AES_TYPE_192; in ccp_aes_setkey()
52 ctx->u.aes.type = CCP_AES_TYPE_256; in ccp_aes_setkey()
57 ctx->u.aes.mode = alg->mode; in ccp_aes_setkey()
58 ctx->u.aes.key_len = key_len; in ccp_aes_setkey()
60 memcpy(ctx->u.aes.key, key, key_len); in ccp_aes_setkey()
61 sg_init_one(&ctx->u.aes.key_sg, ctx->u.aes.key, key_len); in ccp_aes_setkey()
74 if (!ctx->u.aes.key_len) in ccp_aes_crypt()
77 if (((ctx->u.aes.mode == CCP_AES_MODE_ECB) || in ccp_aes_crypt()
78 (ctx->u.aes.mode == CCP_AES_MODE_CBC)) && in ccp_aes_crypt()
82 if (ctx->u.aes.mode != CCP_AES_MODE_ECB) { in ccp_aes_crypt()
95 rctx->cmd.u.aes.type = ctx->u.aes.type; in ccp_aes_crypt()
96 rctx->cmd.u.aes.mode = ctx->u.aes.mode; in ccp_aes_crypt()
97 rctx->cmd.u.aes.action = in ccp_aes_crypt()
99 rctx->cmd.u.aes.key = &ctx->u.aes.key_sg; in ccp_aes_crypt()
100 rctx->cmd.u.aes.key_len = ctx->u.aes.key_len; in ccp_aes_crypt()
101 rctx->cmd.u.aes.iv = iv_sg; in ccp_aes_crypt()
102 rctx->cmd.u.aes.iv_len = iv_len; in ccp_aes_crypt()
103 rctx->cmd.u.aes.src = req->src; in ccp_aes_crypt()
104 rctx->cmd.u.aes.src_len = req->cryptlen; in ccp_aes_crypt()
105 rctx->cmd.u.aes.dst = req->dst; in ccp_aes_crypt()
125 ctx->u.aes.key_len = 0; in ccp_aes_init_tfm()
153 memcpy(ctx->u.aes.nonce, key + key_len, CTR_RFC3686_NONCE_SIZE); in ccp_aes_rfc3686_setkey()
167 memcpy(iv, ctx->u.aes.nonce, CTR_RFC3686_NONCE_SIZE); in ccp_aes_rfc3686_crypt()
197 ctx->u.aes.key_len = 0; in ccp_aes_rfc3686_init_tfm()
254 .name = "ecb(aes)",
255 .driver_name = "ecb-aes-ccp",
263 .name = "cbc(aes)",
264 .driver_name = "cbc-aes-ccp",
272 .name = "cfb(aes)",
273 .driver_name = "cfb-aes-ccp",
281 .name = "ofb(aes)",
282 .driver_name = "ofb-aes-ccp",
290 .name = "ctr(aes)",
291 .driver_name = "ctr-aes-ccp",
299 .name = "rfc3686(ctr(aes))",
300 .driver_name = "rfc3686-ctr-aes-ccp",