Commit Graph

148 Commits (02bfe8a6a1c9f12e89a8293aa668a04d1e10c68c)

Author SHA1 Message Date
John Bland 6a21c02e6c add a simulator test for using encryption and delta updates
increase argument count max since the tools duplicate the sig and hash args
2023-05-17 19:39:00 +02:00
Hideki Miyazaki 170bb9a585 Support Renesas RA6M4 with SCE use 2023-05-17 14:15:18 +02:00
John Bland 1e93b3d042 add policy signed header to sign.c 2023-04-12 13:36:03 -04:00
Daniele Lacamera ab6cd52e7c keygen.c: fixed size of exported binary keystore 2023-03-20 09:10:53 +01:00
John Bland 20621a68ce
Fix issues with keygen tool (#269)
* Fix issues with keygen tool import `-i` feature.
* Fix issue with key import incorrectly assuming key size.
* Add support for importing an ECC key with header.
* Fix for missing ECC key free.
* Refactor keygen tool to use utility function to get key size
* Fix to handle encoded ECC public keys when using `--sha-only` or manual sign
2023-01-09 15:59:00 -08:00
Lealem Amedie 18bfcecd6b wolfBoot cmake support 2022-12-07 13:00:10 -08:00
David Garske 2fc899254f Cleanups for NXP T2080 DEOS support:
* Expanded the NXP QorIQ T2080 documentation in `docs/Targets.md`.
* T2080 fixes for boot code placement and generation of .bin.
* T2080 UART driver cleanup.
* Improve bin-assemble fill speed and report items added.
* Make portability fixes to enable building in `mingw32-make`.
* Cleanup the `docs/Targets.md` sections and links.
* Cleanup execute bits on code files.
2022-12-06 06:20:48 +01:00
David Garske 3c2c26bf3a Fixes for IAR. Switch to new `src/keystore.c` for keys. Fixes for building keytools in Visual Studio. 2022-07-26 09:34:53 +02:00
Daniele Lacamera 1275219a7b Sign.py: fixed output file name when encrypt=1 2022-07-25 10:38:39 +02:00
Daniele Lacamera 30b9d5b6f8 Fixed keygen.py case with no '-g' arguments 2022-07-20 20:17:55 +02:00
Daniele Lacamera dd9c19a1f3 Fixed typo in argument parsing 2022-07-20 20:17:39 +02:00
Daniele Lacamera 5ec00f9565 [sign.py] Fixed image path in delta + encrypt 2022-07-20 11:51:18 +02:00
Daniele Lacamera 9605dd283f Fixes for test cases using keystore 2022-07-19 15:33:29 +02:00
Daniele Lacamera 1e11f3081b keygen.c : exporting keystore also in binary format 2022-07-19 15:32:28 +02:00
Daniele Lacamera 8cc0735237 Fix namefile parser in sign.py 2022-07-19 15:32:28 +02:00
Daniele Lacamera 1542a15c90 Keystore: array of public keys generated by keygen 2022-07-19 15:32:28 +02:00
Daniele Lacamera acfdd1f676 Added support for RSA3072 2022-05-31 12:13:34 +02:00
Daniele Lacamera a9ffb3c98a Fixed typos. Removed verbose command line help. 2022-05-24 17:24:31 +02:00
Daniele Lacamera 063c21430c Added partition ID. Extended sign manual 2022-05-24 13:31:50 +02:00
Daniele Lacamera b47b9cef9b Corrected style (indentation, line wrap) 2022-05-23 20:39:57 +02:00
Daniele Lacamera 3731157efe Sign tool: improved output (version, algorithms) 2022-05-23 15:27:22 +02:00
Daniele Lacamera 6d7d8646c6 Encrypted delta: support in C keytools + fixed test 2022-05-23 14:10:13 +02:00
Daniele Lacamera 957b9d3c8c Initial support for delta-encrypted updates 2022-05-23 12:00:57 +02:00
David Garske 6068a8047c wolfBoot improvements (from elms):
* Add `WOLFBOOT_DUALBOOT` for dynamic fallback
* Refactor header field parsing
* Cleanup compiler warnings and logic extra check
* Option to leave out partition based functions
* Add `WOLFBOOT_FIXED_PARTITIONS` enable using partition enum and related functions
* Wrap all delta update references
* Update raspberry documentation
* EFI refactoring
* Add `keytools_check` target
* Add "library" target
2022-05-20 08:06:07 +02:00
Daniele Lacamera 3815067fa0 Fixed SIGN=NONE. Improved tests 2022-04-08 13:04:26 +02:00
Daniele Lacamera f04889ee29 Added SHA2-384 support for integrity checks 2022-04-06 09:41:37 +02:00
Daniele Lacamera d06178c3a8 Added new signature algo: ECC384 2022-04-01 12:21:42 -07:00
Daniele Lacamera 7b51eef290 Fixed comparison of RSA4096 header size in sign.py 2022-03-02 17:46:35 +01:00
David Garske 262a5b0a78
Merge pull request #167 from danielinux/aes-encryption
Add AES encryption support
2022-02-09 10:55:51 -08:00
Daniele Lacamera 67912790de Fixed Chacha in C keytools 2022-02-07 16:39:56 +01:00
Daniele Lacamera 61275ec9dd Update Chacha ENCRYPT_BLOCK_SIZE to match IV ctr 2022-02-07 16:35:25 +01:00
Daniele Lacamera 92e9a443fb Updated key tools to use complete IV range for AES 2022-02-07 10:51:18 +01:00
Daniele Lacamera bd69326e0f Propagate the selected IMAGE_HEADER_SIZE to sign.c 2022-02-02 12:23:32 +01:00
Daniele Lacamera daff2a04a8 Fixed STM32L4 HAL, added IMAGE_HEADER_SIZE option 2022-02-02 12:05:14 +01:00
Daniele Lacamera a9cbb91892 Added support for --aes128/--aes256 in sign.c 2022-01-31 18:16:19 +01:00
Daniele Lacamera 43a5a38629 Fixes to AES-CTR encryption after testing 2022-01-31 16:46:09 +01:00
Daniele Lacamera b656e4abef Support for --aes128 and --aes256 in sign.py 2022-01-28 20:26:59 +01:00
Daniele Lacamera b7406994c0 Fix alignment of delta fields in sign.c 2022-01-20 17:52:59 +01:00
Daniele Lacamera 5be0b42c8d Fixed delta manifest header alignment 2022-01-17 13:34:54 +01:00
Elms e42094e23c tools: windows solution using windows slashes for includes 2021-12-15 08:46:06 -08:00
Elms 8726c1cc42 tools: Add ed448 for windows solutions 2021-12-15 08:46:06 -08:00
Elms fa8284e448 tools: update sign tool solution for windows 2021-12-15 08:46:06 -08:00
Daniele Lacamera 845fd02edf Added tests for ed448, fixed sign.py 2021-12-14 16:55:10 +01:00
Daniele Lacamera 241099eebf Added Ed448 support for python keytools
Depends on https://github.com/wolfSSL/wolfcrypt-py/pull/25/
2021-12-13 13:52:06 +01:00
Daniele Lacamera 2e7b63eae5 Adding support for ED448 verification 2021-12-13 12:05:37 +01:00
Daniele Lacamera 157a03edd3 Fixed key import ranges in ecc sign.py
Same fix as wolfcrypt-py/b79527f876385ecfc23ff47696c32eaf74ff792c

The array slicing in ecc.decode_key_raw() call wrongly assumed array as
inclusive (i.e. [0:31] to include from 0 to 31, instead of the correct
form [0:32]).
2021-09-27 19:19:31 +02:00
Daniele Lacamera b29aea4422 Fixed keytools error handling. Removed inclusion of target.h. 2021-09-06 17:45:41 +02:00
David Garske cabbb5e556 Fix for building key tools to make sure target.h exists. Fix key tool warnings. 2021-08-31 07:06:34 -07:00
Daniele Lacamera 012bba3ce3 Fixed after review comments 2021-08-20 10:10:51 +02:00
Daniele Lacamera 25eb2b963e Added header tags for inverse update, fixed sign.c 2021-08-19 19:04:04 +02:00
Daniele Lacamera 39ee01a948 Added roll-back feature via inverse patch 2021-08-17 15:44:34 +02:00
Daniele Lacamera 092783b0ea Refactoring of sign.c to add delta updates 2021-08-16 12:04:06 +02:00
Daniele Lacamera 11959dac9f Fixed sign.py, delta offset. Simplest case update works. 2021-08-16 11:59:46 +02:00
Daniele Lacamera b74a4f69e2 Changed delta mechanism + added key tool diff function 2021-08-16 11:59:45 +02:00
David Garske d38de3b432 Update copyright year 2021-07-19 07:50:02 -07:00
Daniele Lacamera d763d63e65 Fixed/unified keytool sign warning on NO_SIGN 2021-06-28 13:52:00 +02:00
Daniele Lacamera f2bab09777 Added support for SIGN=NONE 2021-06-28 13:52:00 +02:00
David Garske a11a3a3bc1 Fix for building C tools with Visual Studio. 2020-07-24 10:59:26 -07:00
David Garske c473a53ebe Improvements to the key tools documentation. 2020-06-24 09:04:24 -07:00
David Garske 0c5b66c39e Fixes for TPM with RSA.
* Requires PR https://github.com/wolfSSL/wolfTPM/pull/101
* Cleanup of software vs. TPM code `wolfBoot_verify_signature` functions (ECC and RSA)
* Adjusted the stack size checks with TPM.
* Added STM32F4 programming/debugging instructions.
* In V=1 mode show the keygen command.
2020-06-23 11:57:09 -07:00
David Garske e910380889 Add support for using an RSA signature that includes ASN.1 encoded header. On by default, can be disabled using `NO_RSA_SIG_ENCODING`. Added support for signing with encoding using `--rsa2048enc` or `--rsa4096enc`. 2020-06-23 11:39:30 -07:00
David Garske 50456e27cc Fix for arg count on C sign tool. 2020-06-18 12:22:17 -07:00
Daniele Lacamera a9755de446 Fixed output image size in sign.c 2020-06-18 16:41:40 +02:00
Daniele Lacamera 9d83b2f277 Added --encrypt option to sign.c 2020-06-18 15:32:16 +02:00
Daniele Lacamera f3f27ae2cb Fixed ChaCha20 IV usage/setting. Test/docs updated. 2020-06-18 11:12:01 +02:00
Daniele Lacamera ceb07ec315 Fixed encryption alignment and signing tool IV 2020-06-16 17:52:50 +02:00
Daniele Lacamera 53bf4d04db Encrypt: API design 2020-06-16 17:50:55 +02:00
Daniele Lacamera e367cd17e0 keygen.c: replace gets with scanf 2020-06-11 17:14:27 +02:00
Daniele Lacamera 151a35e3b0 sign.c: Fixed parsing size of public key when in 'manual-sign' or 'sha-only'
mode.
2020-06-11 17:14:05 +02:00
Daniele Lacamera 2b6d093469 sign.py: Fixed parsing size of public key when in 'manual-sign' or 'sha-only'
mode.
2020-06-11 17:03:47 +02:00
David Garske 088f168062 Fixes for building C signing tools on Windows (Cygwin/MinGW). 2020-05-22 12:26:19 -07:00
David Garske 1adb2bcae0 Fix for C keygen tool RSA len variable and the ED25519 generated key. Added description to C sign defaults. Added template Cypress PSoC6 configuration file. 2020-05-20 08:28:06 -07:00
Daniele Lacamera e0d4764fcc Fixed bug in keygen.c append missing public key to ed25519.der 2020-05-19 17:10:28 +02:00
Daniele Lacamera 09909bbc84 Fix importing Ed25519 key in C sign tool 2020-05-18 12:36:01 +02:00
David Garske c6f6ce83c2
Merge pull request #40 from wolfSSL/iar
Example workspace/project to build under IAR
2020-04-07 10:53:35 -07:00
David Garske 3f1a18f8a9 Fixed unused warning fixes and missing errno.h in keygen.c. Update tools/keytools Makefile to build keygen. Cleanup to support using C version of "sign" and "keygen" after "make keytools". 2020-04-07 18:27:05 +02:00
David Garske 5c6649244c Fix for intermediate directory naming conflict between two projects. 2020-04-07 18:12:56 +02:00
Daniele Lacamera 963e25a4cc keygen: added conditional compile for algorithms 2020-04-07 09:54:47 +02:00
Daniele Lacamera 6020b4efdf keygen.c: fixed indentation 2020-04-07 09:07:34 +02:00
Daniele Lacamera 3a763ac19a Removed debug in keygen tool 2020-04-07 09:06:27 +02:00
Daniele Lacamera 8c6272df4a Completed Windows/IAR example, removed extra files 2020-03-31 11:54:58 +02:00
Daniele Lacamera 7e6452467b Added keygen C tool + vcproj for windows 2020-03-30 14:12:39 +02:00
David Garske 94af71e9e9 Fix for signing tool and SHA3 padding at 8-bytes. 2020-03-25 08:19:11 -07:00
Daniele Lacamera cd209e9d3a Added --force option to keygen 2020-03-23 13:32:59 +01:00
Daniele Lacamera 5d80dcf512 Added 6 bytes to padding in manifest
(fixes SHA-3 misaligned access)
Spotted via test-81
2020-03-19 17:06:05 +01:00
Daniele Lacamera f72e48f1f1 Reverted modification to keygen.py (fixes regression in test-51) 2020-03-19 15:13:05 +01:00
David Garske 99cf42b9a3 Added missing items from signing tool Visual Studio project. Updated signing documentation. 2020-03-11 12:25:51 -07:00
David Garske 2f3da0220c Visual Studio project for standalone C signing tool. 2020-03-11 11:47:53 -07:00
David Garske c0b534edd7 wolfBoot Aarch64 support (Xilinx Zynq and Raspberry Pi):
* Added Aarch64 boot/startup support
* Added configuration templates for Raspberry Pi 3 and Xilinx ZynqMP UltraScale+
* Added Xilinx Zynq QSPI bare-metal Driver
* Added `NO_XIP` option for full `ext_flash_*` API on all partitions
* Added Xilinx SDK Project Template
* Added support for DTS image partitions
* Added wolfBoot signing tool in Native C (`tools/keytools/sign.c`).
* Added libwolfboot functions `int wolfBoot_fallback_is_possible(void);` and `int wolfBoot_dualboot_candidate(void);`
* Performance improvement to only hash application firmware image once
2020-03-04 12:04:46 -08:00
Daniele Lacamera f57a27d57c Fixed sign tool to accommodate all the options. Fixed tests. 2020-01-09 15:09:07 +01:00
Daniele Lacamera d33c5acac8 Added support for SHA3 2020-01-07 20:35:31 +01:00
Daniele Lacamera c847529698 Added RSA-4096 bit support 2020-01-07 11:32:09 +01:00
Chris Conlon 1f57ad9f39 update copyright to 2020 2020-01-03 15:36:00 -08:00
David Garske fae6a974c8 Adds RSA support to wolfBoot using "SIGN=RSA2048". Includes RSA signing script tool in Python and instructions. 2019-12-17 09:44:02 -08:00
Daniele Lacamera fc547e4a25 wolfBoot can update itself when compiled with RAM_CODE=1
- Added wolfBoot version
- Added extra 16bit header tag to identify the image type and authentication
- Implemented optional in-ram self-update of the bootloader, with version control
and authentication mechanism (not fail-safe)
2019-04-29 20:32:04 +02:00
Daniele Lacamera 75fc9cc59a C Host key tools rewritten in python (fix for #4) 2019-04-17 07:15:59 +02:00
Daniele Lacamera 17f382b995 Fixed ECC in keygen.py (requires latest wolfcrypt-py) 2019-04-17 07:05:48 +02:00
Daniele Lacamera 91cacce82a Added python keygen tool 2019-04-17 07:05:48 +02:00