summaryrefslogtreecommitdiff
path: root/doc/uImage.FIT/signature.txt
Commit message (Collapse)AuthorAgeFilesLines
* Provide more details of exactly how configuration signatures are calculatedMartin Bonner2022-07-291-0/+26
| | | | | | | | Describe exactly which bytes are hashed and in what order when signing a configuration. Signed-off-by: Martin Bonner <martingreybeard@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* mkimage: use environment variable MKIMAGE_SIGN_PIN to set pin for OpenSSL EngineMarc Kleine-Budde2021-07-281-2/+2
| | | | | | | | | | This patch adds the possibility to pass the PIN the OpenSSL Engine used during signing via the environment variable MKIMAGE_SIGN_PIN. This follows the approach used during kernel module signing ("KBUILD_SIGN_PIN") or UBIFS image signing ("MKIMAGE_SIGN_PIN"). Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* doc: fix typo in signature.txtThomas Perrot2021-07-121-2/+2
| | | | | | | Fix value fields in signature nodes. Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* doc: signature.txt: Document the keydir and keyfile argumentsAlexandru Gagniuc2021-04-141-0/+13
| | | | | | | | After lots of debating, this documents how we'd like mkimage to treat 'keydir' and 'keyfile' arguments. The rest is in the docs. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* doc: signature.txt: Document devicetree format for ECDSA keysAlexandru Gagniuc2021-04-141-1/+6
| | | | | Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* doc: verified-boot: add required-mode informationThirupathaiah Annapureddy2020-10-121-0/+14
| | | | | | | | Add documentation about 'required-mode' property in /signature node in U-Boot's control FDT. Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* lib: rsa: avoid overriding the object name when already specifiedWIP/2020-05-15-misc-bugfixesJan Luebbe2020-05-151-3/+5
| | | | | | | | | | | If "object=" is specified in "keydir" when using the pkcs11 engine do not append another "object=<key-name-hint>". This makes it possible to use object names other than the key name hint. These two string identifiers are not necessarily equal. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Bastian Krause <bst@pengutronix.de> Reviewed-by: George McCollister <george.mccollister@gmail.com>
* doc: fitImage: example of a signature nodeHeinrich Schuchardt2019-12-131-0/+62
| | | | | | | | | Describe that a signature node can be added to a binary device tree using the mkimage tool. Provide an example device tree node. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* doc: fitImage: Cosmetics break linesMickaël Tansorier2019-07-241-0/+3
| | | | | | Add missing newline before title and subtitle. Signed-off-by: Mickaël Tansorier <mickael.tansorier@smile.fr>
* doc: fitImage: Fix conf number incrementationMickaël Tansorier2019-07-241-2/+2
| | | | | | | Increment conf id to avoid to have two same conf name into one configuration description. Signed-off-by: Mickaël Tansorier <mickael.tansorier@smile.fr>
* lib: rsa: add support to other openssl engine types than pkcs11Vesa Jääskeläinen2019-07-181-4/+33
| | | | | | | | | | | There are multiple other openssl engines used by HSMs that can be used to sign FIT images instead of forcing users to use pkcs11 type of service. Relax engine selection so that other openssl engines can be specified and use generic key id definition formula. Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Cc: Tom Rini <trini@konsulko.com>
* configs: Rename CONFIG_IMAGE_FORMAT_LEGACY to CONFIG_LEGACY_IMAGE_FORMATTom Rini2019-07-111-1/+1
| | | | | | | | | The name CONFIG_LEGACY_IMAGE_FORMAT reads slightly better along with allowing us to avoid a rather nasty Kbuild/Kconfig issue down the line with CONFIG_IS_ENABLED(IMAGE_FORMAT_LEGACY). In a few places outside of cmd/ switch to using CONFIG_IS_ENABLED() to test what is set. Signed-off-by: Tom Rini <trini@konsulko.com>
* doc: uImage.FIT: signature.txt: add option paddingPhilippe Reynes2018-12-031-0/+3
| | | | | Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* doc: FIT image: fix incorrect description of DT node unit addressAndre Przywara2018-01-151-50/+50
| | | | | | | | | | The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case. Fix all occurences in the FIT image documentation files where this was not observed, to not give bad examples to the reader. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
* doc: verified-boot: fix crypto algorithm examplesMasahiro Yamada2017-10-231-2/+2
| | | | | | | | As you see in crypto_algos in common/image-sig.c, the algorithm should be either "rsa2048" or "rsa4096". "rs2048" is a typo. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* doc: verified-boot: fix typosMasahiro Yamada2017-08-261-5/+5
| | | | Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* mkimage: Add support for signing with pkcs11George McCollister2017-01-141-0/+143
| | | | | | | | | | | | Add support for signing with the pkcs11 engine. This allows FIT images to be signed with keys securely stored on a smartcard, hardware security module, etc without exposing the keys. Support for other engines can be added in the future by modifying rsa_engine_get_pub_key() and rsa_engine_get_priv_key() to construct correct key_id strings. Signed-off-by: George McCollister <george.mccollister@gmail.com>
* doc: clarify openssl-based key and certificate generation processAndreas Dannenberg2016-04-011-4/+4
| | | | | | | | Add some basic clarification that the dev.key file generated by OpenSSL contains both the public and private key, and further highlight that the certificate generated here contains the public key only. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
* Implement generalised RSA public exponents for verified bootMichael van der Westhuizen2014-08-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Remove the verified boot limitation that only allows a single RSA public exponent of 65537 (F4). This change allows use with existing PKI infrastructure and has been tested with HSM-based PKI. Change the configuration OF tree format to store the RSA public exponent as a 64 bit integer and implement backward compatibility for verified boot configuration trees without this extra field. Parameterise vboot_test.sh to test different public exponents. Mathematics and other hard work by Andrew Bott. Tested with the following public exponents: 3, 5, 17, 257, 39981, 50457, 65537 and 4294967297. Signed-off-by: Andrew Bott <Andrew.Bott@ipaccess.com> Signed-off-by: Andrew Wishart <Andrew.Wishart@ipaccess.com> Signed-off-by: Neil Piercy <Neil.Piercy@ipaccess.com> Signed-off-by: Michael van der Westhuizen <michael@smart-africa.com> Cc: Simon Glass <sjg@chromium.org>
* Enhance fit_check_sign to check all imagesSimon Glass2014-06-191-0/+3
| | | | | | | | | At present this tool only checks the configuration signing. Have it also look at each of the images in the configuration and confirm that they verify. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de> (v1)
* bootm: make use of legacy image format configurableHeiko Schocher2014-06-051-0/+3
| | | | | | | | | | | | | | | | | | | | make the use of legacy image format configurable through the config define CONFIG_IMAGE_FORMAT_LEGACY. When relying on signed FIT images with required signature check the legacy image format should be disabled. Therefore introduce this new define and enable legacy image format if CONFIG_FIT_SIGNATURE is not set. If CONFIG_FIT_SIGNATURE is set disable per default the legacy image format. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Lars Steubesand <lars.steubesand@philips.com> Cc: Mike Pearce <mike@kaew.be> Cc: Wolfgang Denk <wd@denx.de> Cc: Tom Rini <trini@ti.com> Cc: Michal Simek <monstr@monstr.eu> Acked-by: Simon Glass <sjg@chromium.org>
* tools, fit_check_sign: verify a signed fit imageHeiko Schocher2014-03-211-0/+6
| | | | | | | | add host tool "fit_check_sign" which verifies, if a fit image is signed correct. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org>
* rsa: add sha256-rsa2048 algorithmHeiko Schocher2014-03-211-1/+13
| | | | | | | | | | | | | | | | | | | | | based on patch from andreas@oetken.name: http://patchwork.ozlabs.org/patch/294318/ commit message: I currently need support for rsa-sha256 signatures in u-boot and found out that the code for signatures is not very generic. Thus adding of different hash-algorithms for rsa-signatures is not easy to do without copy-pasting the rsa-code. I attached a patch for how I think it could be better and included support for rsa-sha256. This is a fast first shot. aditionally work: - removed checkpatch warnings - removed compiler warnings - rebased against current head Signed-off-by: Heiko Schocher <hs@denx.de> Cc: andreas@oetken.name Cc: Simon Glass <sjg@chromium.org>
* image: Add support for signing of FIT configurationsSimon Glass2013-06-261-1/+167
| | | | | | | | | | | | | | | | While signing images is useful, it does not provide complete protection against several types of attack. For example, it it possible to create a FIT with the same signed images, but with the configuration changed such that a different one is selected (mix and match attack). It is also possible to substitute a signed image from an older FIT version into a newer FIT (roll-back attack). Add support for signing of FIT configurations using the libfdt's region support. Please see doc/uImage.FIT/signature.txt for more information. Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Add signing infrastructureSimon Glass2013-06-261-0/+216
Add a structure to describe an algorithm which can sign and (later) verify images. Signed-off-by: Simon Glass <sjg@chromium.org>