diff options
author | Ruchika Gupta <ruchika.gupta@freescale.com> | 2015-01-23 16:01:55 +0530 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-01-29 17:09:58 -0700 |
commit | 34276478f7b7a0fea9c76e365a477962910ef770 (patch) | |
tree | 45021bad9d49780795816921ea05c1e94e5ba454 /drivers/crypto/fsl/rsa_caam.h | |
parent | c937ff6dc2ee3fcd8f97087427fe8ba5086852c4 (diff) | |
download | u-boot-34276478f7b7a0fea9c76e365a477962910ef770.tar.gz |
DM: crypto/fsl - Add Freescale rsa DM driver
Driver added for RSA Modular Exponentiation using Freescale Hardware
Accelerator CAAM. The driver uses UCLASS_MOD_EXP
Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
CC: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/crypto/fsl/rsa_caam.h')
-rw-r--r-- | drivers/crypto/fsl/rsa_caam.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/crypto/fsl/rsa_caam.h b/drivers/crypto/fsl/rsa_caam.h new file mode 100644 index 0000000000..4ff87efc5b --- /dev/null +++ b/drivers/crypto/fsl/rsa_caam.h @@ -0,0 +1,28 @@ +/* + * Copyright 2014 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __RSA_CAAM_H +#define __RSA_CAAM_H + +#include <common.h> + +/** + * struct pk_in_params - holder for input to PKHA block in CAAM + * These parameters are required to perform Modular Exponentiation + * using PKHA Block in CAAM + */ +struct pk_in_params { + const uint8_t *e; /* public exponent as byte array */ + uint32_t e_siz; /* size of e[] in number of bytes */ + const uint8_t *n; /* modulus as byte array */ + uint32_t n_siz; /* size of n[] in number of bytes */ + const uint8_t *a; /* Signature as byte array */ + uint32_t a_siz; /* size of a[] in number of bytes */ + uint8_t *b; /* Result exp. modulus in number of bytes */ + uint32_t b_siz; /* size of b[] in number of bytes */ +}; + +#endif |