xref: /rk3399_rockchip-uboot/drivers/crypto/fsl/rsa_caam.h (revision e1cc4d31f889428a4ca73120951389c756404184)
1*34276478SRuchika Gupta /*
2*34276478SRuchika Gupta  * Copyright 2014 Freescale Semiconductor, Inc.
3*34276478SRuchika Gupta  *
4*34276478SRuchika Gupta  * SPDX-License-Identifier:	GPL-2.0+
5*34276478SRuchika Gupta  */
6*34276478SRuchika Gupta 
7*34276478SRuchika Gupta #ifndef __RSA_CAAM_H
8*34276478SRuchika Gupta #define __RSA_CAAM_H
9*34276478SRuchika Gupta 
10*34276478SRuchika Gupta #include <common.h>
11*34276478SRuchika Gupta 
12*34276478SRuchika Gupta /**
13*34276478SRuchika Gupta  * struct pk_in_params - holder for input to PKHA block in CAAM
14*34276478SRuchika Gupta  * These parameters are required to perform Modular Exponentiation
15*34276478SRuchika Gupta  * using PKHA Block in CAAM
16*34276478SRuchika Gupta  */
17*34276478SRuchika Gupta struct pk_in_params {
18*34276478SRuchika Gupta 	const uint8_t *e;	/* public exponent as byte array */
19*34276478SRuchika Gupta 	uint32_t e_siz;		/* size of e[] in number of bytes */
20*34276478SRuchika Gupta 	const uint8_t *n;	/* modulus as byte array */
21*34276478SRuchika Gupta 	uint32_t n_siz;		/* size of n[] in number of bytes */
22*34276478SRuchika Gupta 	const uint8_t *a;		/* Signature as byte array */
23*34276478SRuchika Gupta 	uint32_t a_siz;		/* size of a[] in number of bytes */
24*34276478SRuchika Gupta 	uint8_t *b;		/* Result exp. modulus in number of bytes */
25*34276478SRuchika Gupta 	uint32_t b_siz;		/* size of b[] in number of bytes */
26*34276478SRuchika Gupta };
27*34276478SRuchika Gupta 
28*34276478SRuchika Gupta #endif
29