Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Ruchika Gupta | 29c1a6b | 2015-01-23 16:01:55 +0530 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2014 Freescale Semiconductor, Inc. |
Ruchika Gupta | 29c1a6b | 2015-01-23 16:01:55 +0530 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef __RSA_CAAM_H |
| 7 | #define __RSA_CAAM_H |
| 8 | |
Ruchika Gupta | 29c1a6b | 2015-01-23 16:01:55 +0530 | [diff] [blame] | 9 | /** |
| 10 | * struct pk_in_params - holder for input to PKHA block in CAAM |
| 11 | * These parameters are required to perform Modular Exponentiation |
| 12 | * using PKHA Block in CAAM |
| 13 | */ |
| 14 | struct pk_in_params { |
| 15 | const uint8_t *e; /* public exponent as byte array */ |
| 16 | uint32_t e_siz; /* size of e[] in number of bytes */ |
| 17 | const uint8_t *n; /* modulus as byte array */ |
| 18 | uint32_t n_siz; /* size of n[] in number of bytes */ |
| 19 | const uint8_t *a; /* Signature as byte array */ |
| 20 | uint32_t a_siz; /* size of a[] in number of bytes */ |
| 21 | uint8_t *b; /* Result exp. modulus in number of bytes */ |
| 22 | uint32_t b_siz; /* size of b[] in number of bytes */ |
| 23 | }; |
| 24 | |
| 25 | #endif |