MLK-18169 imx: imx7 Support for Manufacturing Protection
authorBreno Lima <breno.lima@nxp.com>
Tue, 14 Nov 2017 22:10:45 +0000 (20:10 -0200)
committerYe Li <ye.li@nxp.com>
Fri, 24 May 2019 09:27:18 +0000 (02:27 -0700)
commit554b7cdcf47a49097cc5417cc6130e469d7ccc20
tree040db0f7fa4b3ca54a425d6faa283643bb7663dc
parent609e6607572225bfff9dcd84928fd061c1682669
MLK-18169 imx: imx7 Support for Manufacturing Protection

This code was originally developed by Raul Cardenas <raul.casas@nxp.com>
and modified to be applied in U-Boot imx_v2017.03.

More information about the initial submission can be seen
in the link below:
https://lists.denx.de/pipermail/u-boot/2016-February/245273.html

i.MX7D has an a protection feature for Manufacturing process.
This feature uses asymmetric encryption to sign and verify
authenticated software handled between parties. This command
enables the use of such feature.

The private key is unique and generated once per device.
And it is stored in secure memory and only accessible by CAAM.
Therefore, the public key generation and signature functions
are the only functions available for the user.

The manufacturing-protection authentication process can be used to
authenticate the chip to the OEM's server.

Command usage:

Print the public key for the device.
- mfgprot pubk

Generates Signature over given data.
- mfgprot sign <data_address> <data_size>

Signed-off-by: Raul Ulises Cardenas <raul.casas@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit db2dbf622d3c711b2fbd85e6814992e023479dad)
arch/arm/mach-imx/Kconfig
arch/arm/mach-imx/Makefile
arch/arm/mach-imx/cmd_mfgprot.c [new file with mode: 0644]
drivers/crypto/fsl/Makefile
drivers/crypto/fsl/desc.h
drivers/crypto/fsl/fsl_mfgprot.c [new file with mode: 0644]
include/fsl_sec.h