blob: 84b3edd6e2f9ab5ad4b49e1da105143fc654400e [file] [log] [blame]
Ruchika Guptab9eebfa2014-10-15 11:35:30 +05301/*
2 * Copyright 2014 Freescale Semiconductor, Inc.
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 *
6 */
7
8#ifndef __JOBDESC_H
9#define __JOBDESC_H
10
11#include <common.h>
12#include <asm/io.h>
Ruchika Gupta34276472015-01-23 16:01:55 +053013#include "rsa_caam.h"
Ruchika Guptab9eebfa2014-10-15 11:35:30 +053014
Ruchika Guptac5de15c2014-10-07 15:46:20 +053015#define KEY_IDNFR_SZ_BYTES 16
16
Ruchika Guptab9eebfa2014-10-15 11:35:30 +053017void inline_cnstr_jobdesc_hash(uint32_t *desc,
18 const uint8_t *msg, uint32_t msgsz, uint8_t *digest,
19 u32 alg_type, uint32_t alg_size, int sg_tbl);
20
Ruchika Guptac5de15c2014-10-07 15:46:20 +053021void inline_cnstr_jobdesc_blob_encap(uint32_t *desc, uint8_t *key_idnfr,
22 uint8_t *plain_txt, uint8_t *enc_blob,
23 uint32_t in_sz);
24
25void inline_cnstr_jobdesc_blob_decap(uint32_t *desc, uint8_t *key_idnfr,
26 uint8_t *enc_blob, uint8_t *plain_txt,
27 uint32_t out_sz);
28
29void inline_cnstr_jobdesc_rng_instantiation(uint32_t *desc);
Ruchika Gupta34276472015-01-23 16:01:55 +053030
31void inline_cnstr_jobdesc_pkha_rsaexp(uint32_t *desc,
32 struct pk_in_params *pkin, uint8_t *out,
33 uint32_t out_siz);
Ruchika Guptab9eebfa2014-10-15 11:35:30 +053034#endif