Lines Matching refs:enc

231 static inline u32 create_ctx_hdr(struct skcipher_request *req, u32 enc,  in create_ctx_hdr()  argument
251 if (enc) { in create_ctx_hdr()
271 fctx->enc.enc_ctrl.e.enc_cipher = ctx->cipher_type; in create_ctx_hdr()
272 fctx->enc.enc_ctrl.e.aes_key = ctx->key_type; in create_ctx_hdr()
273 fctx->enc.enc_ctrl.e.iv_source = OTX_CPT_FROM_CPTR; in create_ctx_hdr()
276 memcpy(fctx->enc.encr_key, ctx->enc_key, ctx->key_len * 2); in create_ctx_hdr()
278 memcpy(fctx->enc.encr_key, ctx->enc_key, ctx->key_len); in create_ctx_hdr()
280 memcpy(fctx->enc.encr_iv, req->iv, crypto_skcipher_ivsize(stfm)); in create_ctx_hdr()
282 fctx->enc.enc_ctrl.flags = cpu_to_be64(fctx->enc.enc_ctrl.cflags); in create_ctx_hdr()
302 static inline u32 create_input_list(struct skcipher_request *req, u32 enc, in create_input_list() argument
310 ret = create_ctx_hdr(req, enc, &argcnt); in create_input_list()
339 static inline int cpt_enc_dec(struct skcipher_request *req, u32 enc) in cpt_enc_dec() argument
354 rctx->fctx.enc.enc_ctrl.flags = 0; in cpt_enc_dec()
356 status = create_input_list(req, enc, enc_iv_len); in cpt_enc_dec()
368 req_info->is_enc = enc; in cpt_enc_dec()
964 static inline u32 create_aead_ctx_hdr(struct aead_request *req, u32 enc, in create_aead_ctx_hdr() argument
979 fctx->enc.enc_ctrl.e.iv_source = OTX_CPT_FROM_CPTR; in create_aead_ctx_hdr()
981 memcpy(fctx->enc.encr_key, ctx->key + ctx->auth_key_len, in create_aead_ctx_hdr()
984 memcpy(fctx->enc.encr_iv, req->iv, crypto_aead_ivsize(tfm)); in create_aead_ctx_hdr()
996 fctx->enc.enc_ctrl.e.iv_source = OTX_CPT_FROM_DPTR; in create_aead_ctx_hdr()
998 memcpy(fctx->enc.encr_key, ctx->key, ctx->enc_key_len); in create_aead_ctx_hdr()
1000 memcpy(fctx->enc.encr_iv, ctx->key + ctx->enc_key_len, in create_aead_ctx_hdr()
1016 if (enc) { in create_aead_ctx_hdr()
1026 fctx->enc.enc_ctrl.e.enc_cipher = ctx->cipher_type; in create_aead_ctx_hdr()
1027 fctx->enc.enc_ctrl.e.aes_key = ctx->key_type; in create_aead_ctx_hdr()
1028 fctx->enc.enc_ctrl.e.mac_type = ctx->mac_type; in create_aead_ctx_hdr()
1029 fctx->enc.enc_ctrl.e.mac_len = mac_len; in create_aead_ctx_hdr()
1030 fctx->enc.enc_ctrl.flags = cpu_to_be64(fctx->enc.enc_ctrl.cflags); in create_aead_ctx_hdr()
1050 u32 enc) in create_hmac_ctx_hdr() argument
1076 static inline u32 create_aead_input_list(struct aead_request *req, u32 enc) in create_aead_input_list() argument
1083 status = create_aead_ctx_hdr(req, enc, &argcnt); in create_aead_input_list()
1092 static inline u32 create_aead_output_list(struct aead_request *req, u32 enc, in create_aead_output_list() argument
1099 if (enc) in create_aead_output_list()
1111 u32 enc, u32 mac_len) in create_aead_null_input_list() argument
1117 if (enc) in create_aead_null_input_list()
1122 create_hmac_ctx_hdr(req, &argcnt, enc); in create_aead_null_input_list()
1130 u32 enc, u32 mac_len) in create_aead_null_output_list() argument
1139 if (enc) in create_aead_null_output_list()
1173 if (enc) { in create_aead_null_output_list()
1217 static u32 cpt_aead_enc_dec(struct aead_request *req, u8 reg_type, u8 enc) in cpt_aead_enc_dec() argument
1227 rctx->fctx.enc.enc_ctrl.flags = 0; in cpt_aead_enc_dec()
1232 req_info->is_enc = enc; in cpt_aead_enc_dec()
1237 status = create_aead_input_list(req, enc); in cpt_aead_enc_dec()
1240 status = create_aead_output_list(req, enc, in cpt_aead_enc_dec()
1247 status = create_aead_null_input_list(req, enc, in cpt_aead_enc_dec()
1251 status = create_aead_null_output_list(req, enc, in cpt_aead_enc_dec()