From 9eef0fe7e5b47b5bc2dde19d67fcde6ee91662c8 Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Fri, 19 Feb 2021 12:45:13 -0600 Subject: doc: signature.txt: Document devicetree format for ECDSA keys Signed-off-by: Alexandru Gagniuc Reviewed-by: Simon Glass --- doc/uImage.FIT/signature.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/uImage.FIT/signature.txt b/doc/uImage.FIT/signature.txt index a3455889ed..0139295d33 100644 --- a/doc/uImage.FIT/signature.txt +++ b/doc/uImage.FIT/signature.txt @@ -142,7 +142,7 @@ public key in U-Boot's control FDT (using CONFIG_OF_CONTROL). Public keys should be stored as sub-nodes in a /signature node. Required properties are: -- algo: Algorithm name (e.g. "sha1,rsa2048") +- algo: Algorithm name (e.g. "sha1,rsa2048" or "sha256,ecdsa256") Optional properties are: @@ -167,6 +167,11 @@ For RSA the following are mandatory: - rsa,r-squared: (2^num-bits)^2 as a big-endian multi-word integer - rsa,n0-inverse: -1 / modulus[0] mod 2^32 +For ECDSA the following are mandatory: +- ecdsa,curve: Name of ECDSA curve (e.g. "prime256v1") +- ecdsa,x-point: Public key X coordinate as a big-endian multi-word integer +- ecdsa,y-point: Public key Y coordinate as a big-endian multi-word integer + These parameters can be added to a binary device tree using parameter -K of the mkimage command:: -- cgit v1.2.3 From fb6532ec6c0c247dc204f65cb298d0865f7eaf3b Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Fri, 19 Feb 2021 12:45:16 -0600 Subject: doc: signature.txt: Document the keydir and keyfile arguments 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 Reviewed-by: Simon Glass --- doc/uImage.FIT/signature.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc') diff --git a/doc/uImage.FIT/signature.txt b/doc/uImage.FIT/signature.txt index 0139295d33..d9a9121190 100644 --- a/doc/uImage.FIT/signature.txt +++ b/doc/uImage.FIT/signature.txt @@ -472,6 +472,19 @@ Test Verified Boot Run: signed config with bad hash: OK Test passed +Software signing: keydir vs keyfile +----------------------------------- + +In the simplest case, signing is done by giving mkimage the 'keyfile'. This is +the path to a file containing the signing key. + +The alternative is to pass the 'keydir' argument. In this case the filename of +the key is derived from the 'keydir' and the "key-name-hint" property in the +FIT. In this case the "key-name-hint" property is mandatory, and the key must +exist in "/." Here the extension "ext" is +specific to the signing algorithm. + + Hardware Signing with PKCS#11 or with HSM ----------------------------------------- -- cgit v1.2.3 From e1662d699551de17e62fee6e2c3a883854e0e2f5 Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Mon, 29 Mar 2021 12:05:11 -0500 Subject: doc: FIT image: Introduce "u-boot, fpga-legacy" property Commit 4afc4f37c70e ("doc: FIT image: Clarify format and simplify syntax") introduced a "compatible" property for loadable images. It did not define its contents. Use "u-boot,fpga-legacy" compatible string to specify that fpga_load() should be used to load the image. Signed-off-by: Alexandru Gagniuc --- doc/uImage.FIT/source_file_format.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/uImage.FIT/source_file_format.txt b/doc/uImage.FIT/source_file_format.txt index 00ed3ebe93..f93ac6d1c7 100644 --- a/doc/uImage.FIT/source_file_format.txt +++ b/doc/uImage.FIT/source_file_format.txt @@ -184,6 +184,7 @@ the '/images' node should have the following layout: Mandatory for types: "firmware", and "kernel". - compatible : compatible method for loading image. Mandatory for types: "fpga", and images that do not specify a load address. + To use the generic fpga loading routine, use "u-boot,fpga-legacy". Optional nodes: - hash-1 : Each hash sub-node represents separate hash or checksum -- cgit v1.2.3 From 6795c751098810c3f8489d94d5a7cba430bade6d Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Mon, 29 Mar 2021 12:05:16 -0500 Subject: doc: FIT image: Update FPGA example to make use of "loadables" The new correct way to load an FPGA image is to declare it in the list of "loadables". multi-with-fpga.its used the now deprecated "fpga" property. Since this example most likely intended to use u-boot's generic FPGA loading code, compatible = "u-boot,fpga-legacy" is also appropriate here. Signed-off-by: Alexandru Gagniuc Reviewed-by: Simon Glass --- doc/uImage.FIT/multi-with-fpga.its | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/uImage.FIT/multi-with-fpga.its b/doc/uImage.FIT/multi-with-fpga.its index 47ee5760c4..021cbc7cf4 100644 --- a/doc/uImage.FIT/multi-with-fpga.its +++ b/doc/uImage.FIT/multi-with-fpga.its @@ -29,6 +29,7 @@ arch = "arm"; compression = "none"; load = <0x30000000>; + compatible = "u-boot,fpga-legacy" hash-1 { algo = "md5"; }; @@ -61,7 +62,7 @@ description = "Linux with fpga"; kernel = "linux_kernel"; fdt = "fdt-1"; - fpga = "fpga"; + loadables = "fpga"; }; }; }; -- cgit v1.2.3