diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2014-09-26 15:20:42 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-10-02 23:18:25 +0000 |
commit | beaddbf1a365463cdef3ed9dd1d093ff6ff80d70 (patch) | |
tree | 2f6f7aeda02e320b0962da0a901bb67b3bbf753e /core | |
parent | 0330d9adf2602c44201d5e1b842747caf7dd83b1 (diff) | |
download | chrome-ec-beaddbf1a365463cdef3ed9dd1d093ff6ff80d70.tar.gz |
zinger: check RW firmware signature
The Zinger RW is now signed with 2048-bit RSA key (using SHA-256 as
digest).
This CL implements the verification mechanism.
note: the RSA key used for signing must be provided as a .pem file.
The path to .pem file must be provided in the PEM environment variable.
By default, it's using the dev key stored in zinger_dev_key.pem.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=samus
BUG=chrome-os-partner:28336
TEST=on Zinger, run with properly signed RW firmware and corrupted
firmware and check the serial traces.
Change-Id: Ia58482458904a3ed72d6b0e95996cae86a0ead83
Reviewed-on: https://chromium-review.googlesource.com/220178
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/cortex-m/ec.lds.S | 7 | ||||
-rw-r--r-- | core/cortex-m0/ec.lds.S | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S index dcadd43a6a..ad0de62289 100644 --- a/core/cortex-m/ec.lds.S +++ b/core/cortex-m/ec.lds.S @@ -209,6 +209,13 @@ SECTIONS /* NOTHING MAY GO AFTER THIS! */ } > IRAM + .flash_suffix : AT(LOADADDR(.data) + SIZEOF(.data)) { + FILL(0xff); + /* Put the public key coefficients at the end of the partition */ + . = ORIGIN(FLASH) + LENGTH(FLASH) - 528; + *(.rsa_pubkey) + } > FLASH + /* The linker won't notice if the .data section is too big to fit, * apparently because we're sending it into IRAM, not FLASH. The following * symbol isn't used by the code, but running "objdump -t *.elf | grep hey" diff --git a/core/cortex-m0/ec.lds.S b/core/cortex-m0/ec.lds.S index 0eb80252e1..a2e372ad8a 100644 --- a/core/cortex-m0/ec.lds.S +++ b/core/cortex-m0/ec.lds.S @@ -197,6 +197,13 @@ SECTIONS /* NOTHING MAY GO AFTER THIS! */ } > IRAM + .flash_suffix : AT(LOADADDR(.data) + SIZEOF(.data)) { + FILL(0xff); + /* Put the public key coefficients at the end of the partition */ + . = ORIGIN(FLASH) + LENGTH(FLASH) - 528; + *(.rsa_pubkey) + } > FLASH + /* The linker won't notice if the .data section is too big to fit, * apparently because we're sending it into IRAM, not FLASH. The following * symbol isn't used by the code, but running "objdump -t *.elf | grep hey" |