1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright 2014 Freescale Semiconductor, Inc.
14 #define KEY_IDNFR_SZ_BYTES 16
16 #ifdef CONFIG_CMD_DEKBLOB
17 /* inline_cnstr_jobdesc_blob_dek:
18 * Intializes and constructs the job descriptor for DEK encapsulation
19 * using the given parameters.
20 * @desc: reference to the job descriptor
21 * @plain_txt: reference to the DEK
22 * @enc_blob: reference where to store the blob
23 * @in_sz: size in bytes of the DEK
24 * @return: 0 on success, ECONSTRJDESC otherwise
26 int inline_cnstr_jobdesc_blob_dek(uint32_t *desc, const uint8_t *plain_txt,
27 uint8_t *enc_blob, uint32_t in_sz);
30 void inline_cnstr_jobdesc_hash(uint32_t *desc,
31 const uint8_t *msg, uint32_t msgsz, uint8_t *digest,
32 u32 alg_type, uint32_t alg_size, int sg_tbl);
34 void inline_cnstr_jobdesc_blob_encap(uint32_t *desc, uint8_t *key_idnfr,
35 uint8_t *plain_txt, uint8_t *enc_blob,
38 void inline_cnstr_jobdesc_blob_decap(uint32_t *desc, uint8_t *key_idnfr,
39 uint8_t *enc_blob, uint8_t *plain_txt,
42 void inline_cnstr_jobdesc_rng_instantiation(uint32_t *desc, int handle);
44 void inline_cnstr_jobdesc_pkha_rsaexp(uint32_t *desc,
45 struct pk_in_params *pkin, uint8_t *out,