Lines Matching refs:enc

219 static inline int create_ctx_hdr(struct skcipher_request *req, u32 enc,
238 if (enc) {
258 fctx->enc.enc_ctrl.e.enc_cipher = ctx->cipher_type;
259 fctx->enc.enc_ctrl.e.aes_key = ctx->key_type;
260 fctx->enc.enc_ctrl.e.iv_source = OTX2_CPT_FROM_CPTR;
263 memcpy(fctx->enc.encr_key, ctx->enc_key, ctx->key_len * 2);
265 memcpy(fctx->enc.encr_key, ctx->enc_key, ctx->key_len);
267 memcpy(fctx->enc.encr_iv, req->iv, crypto_skcipher_ivsize(stfm));
269 cpu_to_be64s(&fctx->enc.enc_ctrl.u);
289 static inline int create_input_list(struct skcipher_request *req, u32 enc,
297 ret = create_ctx_hdr(req, enc, &argcnt);
349 static inline int cpt_enc_dec(struct skcipher_request *req, u32 enc)
366 return skcipher_do_fallback(req, enc);
370 rctx->fctx.enc.enc_ctrl.u = 0;
372 status = create_input_list(req, enc, enc_iv_len);
384 req_info->is_enc = enc;
1041 static inline int create_aead_ctx_hdr(struct aead_request *req, u32 enc,
1059 fctx->enc.enc_ctrl.e.iv_source = OTX2_CPT_FROM_CPTR;
1061 memcpy(fctx->enc.encr_key, ctx->key + ctx->auth_key_len,
1064 memcpy(fctx->enc.encr_iv, req->iv, crypto_aead_ivsize(tfm));
1079 fctx->enc.enc_ctrl.e.iv_source = OTX2_CPT_FROM_DPTR;
1081 memcpy(fctx->enc.encr_key, ctx->key, ctx->enc_key_len);
1083 memcpy(fctx->enc.encr_iv, ctx->key + ctx->enc_key_len,
1099 if (enc) {
1109 fctx->enc.enc_ctrl.e.enc_cipher = ctx->cipher_type;
1110 fctx->enc.enc_ctrl.e.aes_key = ctx->key_type;
1111 fctx->enc.enc_ctrl.e.mac_type = ctx->mac_type;
1112 fctx->enc.enc_ctrl.e.mac_len = mac_len;
1113 cpu_to_be64s(&fctx->enc.enc_ctrl.u);
1133 u32 enc)
1157 static inline int create_aead_input_list(struct aead_request *req, u32 enc)
1164 status = create_aead_ctx_hdr(req, enc, &argcnt);
1173 static inline void create_aead_output_list(struct aead_request *req, u32 enc,
1180 if (enc)
1190 u32 enc, u32 mac_len)
1196 if (enc)
1201 create_hmac_ctx_hdr(req, &argcnt, enc);
1207 u32 enc, u32 mac_len)
1216 if (enc)
1248 if (enc) {
1311 static int cpt_aead_enc_dec(struct aead_request *req, u8 reg_type, u8 enc)
1322 rctx->fctx.enc.enc_ctrl.u = 0;
1327 req_info->is_enc = enc;
1335 status = create_aead_input_list(req, enc);
1338 create_aead_output_list(req, enc, crypto_aead_authsize(tfm));
1342 create_aead_null_input_list(req, enc,
1344 status = create_aead_null_output_list(req, enc,
1359 return aead_do_fallback(req, enc);