Commit Graph

300 Commits (0fd34f23c744a5944e22f816f04158c1d851d4be)

Author SHA1 Message Date
Daniele Lacamera 7b4054ab2c Adjusted after review 2022-02-11 12:51:55 +01:00
Daniele Lacamera 561312c8cc Added firmware update tests on nRF52 2022-02-11 10:48:47 +01:00
Daniele Lacamera d2482d97fa Added script renode-test-all 2022-02-11 10:48:47 +01:00
Daniele Lacamera 7eb63a93e4 Restored quiet test 2022-02-11 10:48:47 +01:00
Daniele Lacamera f2280f5575 Added renode board: nrf52840 2022-02-11 10:48:47 +01:00
Daniele Lacamera 11d7a67498 Fixed fail case with version mismatch. Quiet test. 2022-02-11 10:48:47 +01:00
Daniele Lacamera 539cc97e73 Added renode board: sifive-hifive-fe310.
+Quicker test
2022-02-11 10:48:47 +01:00
Daniele Lacamera 402d7b412c Added new renode board: stm32F746 2022-02-11 10:48:47 +01:00
Daniele Lacamera 123587de0f Removed unused targets 2022-02-11 10:48:47 +01:00
Daniele Lacamera ce8d01864c Added basic test cases with renode 2022-02-11 10:48:47 +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
David Garske 5463105eab Adds STM32U5 support. Thank you ST. 2022-01-24 00:07:03 -08:00
elms 0d8d18a4aa
Merge pull request #173 from danielinux/stm32f4_orig 2022-01-20 15:14:27 -08:00
Daniele Lacamera 34341f96f7 Change FLASH origin for stm32f4 to 0x08000000 2022-01-21 00:07:19 +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
Daniele Lacamera 1886ad395e Fixed buffer size in delta tools 2022-01-03 13:44:48 +01:00
Daniele Lacamera a32f8d68aa Added missing test cases for Ed448; fix case 34,44 2021-12-16 17:26:00 +01:00
elms 0eea9f4080
Merge pull request #163 from danielinux/delta-update-fix 2021-12-15 09:06:18 -08: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 d027ccbc8a Minor fixes in integration tests 2021-12-15 14:58:14 +01:00
Daniele Lacamera 71cb839a07 uart-flash-server: build own libwolfboot.o 2021-12-15 14:57:57 +01: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
Marco Oliverio a187442455 support booting EFI application on x86_64 architecture
Co-authored-by: Daniele Lacamera <daniele@wolfssl.com>
2021-11-30 18:43:50 +01:00
David Garske 2526dbb40a Fix to use flash base address on STM32G0. 2021-11-29 23:17:43 -08:00
David Garske 8a3714b524
Merge pull request #150 from danielinux/ext_delta
Fixed delta updates from external devices
2021-10-07 09:27:35 -07:00
Daniele Lacamera f26dd61e23 Fixed delta updates from external devices (+ test) 2021-10-07 14:32:51 +02:00
Daniele Lacamera aaf780fae9 Added test for delta-update-ext 2021-10-07 14:32:51 +02:00
Daniele Lacamera dbc8ea9589 Minor fixes 2021-10-07 14:32:51 +02:00
Daniele Lacamera 8ffdf1997b Fixed scripts by adding explicit "--ecc256" argument 2021-10-07 12:25:20 +02: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 aba428b243 Changed bitrate for uart_flash tests 2021-08-24 10:00:04 +02:00
Daniele Lacamera 84034d5583 Fixed variable definitions in autotest 2021-08-23 19:48:32 +02:00
Daniele Lacamera 012bba3ce3 Fixed after review comments 2021-08-20 10:10:51 +02:00
Daniele Lacamera 7e93921396 Added missing bmdiff.c file 2021-08-19 19:04:04 +02:00
Daniele Lacamera 25eb2b963e Added header tags for inverse update, fixed sign.c 2021-08-19 19:04:04 +02:00
Daniele Lacamera 51ad005976 CL bmpatch/bmdiff tool moved to separate module 2021-08-17 16:01:16 +02:00
Daniele Lacamera 39ee01a948 Added roll-back feature via inverse patch 2021-08-17 15:44:34 +02:00
Daniele Lacamera b21f0f93b7 Using fixed delta blocks of 256B to save memory 2021-08-16 16:38:06 +02:00
Daniele Lacamera 7f74f3a1ae Fixed 'test-delta-update' target using test-delta.mk 2021-08-16 12:27:56 +02:00
Daniele Lacamera 092783b0ea Refactoring of sign.c to add delta updates 2021-08-16 12:04:06 +02:00
Daniele Lacamera 301bc3e0b6 Test through 'test-delta' target
- changed syntax for test-expect-version to accept a UART_DEV
2021-08-16 12:00:39 +02:00
Daniele Lacamera 38e9cd17f6 Fixed diff/patch.
- Added test
- Removed debug printfs
2021-08-16 11:59:46 +02:00
Daniele Lacamera c35c9bb34e Improved diff algorithm to match update.
- Added in-place image patching to ./bmpatch tool
- Temporarily added debug prints
2021-08-16 11:59:46 +02:00
Daniele Lacamera 68bd170b6c Added delta tool 2021-08-16 11:59:46 +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
Daniele Lacamera 13541ec046 Delta updates, draft update mechanism with hdr replacement 2021-08-16 11:56:13 +02:00
Daniele Lacamera fa5ea3c133 Fixed self-update test 2021-07-22 12:25:55 +02:00
David Garske d38de3b432 Update copyright year 2021-07-19 07:50:02 -07:00
Daniele Lacamera c6aadd149b Fixed test-all target 2021-07-15 20:03:50 +02:00
Daniele Lacamera 8cf83627d4 Added test group. Excluded tests exceeding resource limit 2021-07-14 18:46:24 +02:00
Daniele Lacamera fa87250e27 Test groups 2021-07-13 18:55:00 +02:00
Daniele Lacamera 7a3ae1dfcf Fixed RSA4096+NO_ASM+SMALLSTACK. Added more tests. 2021-07-13 18:41:51 +02:00
Daniele Lacamera 45570e6c21 Fixes for USE_FAST_MATH 2021-07-13 18:09:20 +02:00
Daniele Lacamera 330cbac7e2 Fixed case NO_SIGN + SMALL_STACK, added test 2021-07-09 11:40:31 +02:00
Daniele Lacamera e722f2fb00 Fixed typos in test cases 2021-07-09 11:34:54 +02:00
Daniele Lacamera 4c4d7d69f8 Add support for WOLFBOOT_SMALL_STACK 2021-07-09 10:15:37 +02:00
Daniele Lacamera 0ceecc0c82 Fix for Jenkins test-enc-update 2021-06-30 16:38:43 +02: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
Elms c1e000faa0 make: clean up and check_config update
Also add emacs backup files to ignore
2021-06-08 18:14:41 +02:00
Elms 7766613532 test: self-update cleanup
remove clean and distclean from test 34 and 44
remove wolfboot-align
2021-05-14 09:38:31 +02:00
Elms 489071a77e test-expected-version: add debug and optional trigger 2021-05-14 09:38:31 +02:00
Elms 4c63cfd974 cleanup makefiles 2021-05-14 09:38:31 +02:00
Elms 36c50a7e4a tools: Add bin-assemble for pasting together binary blobs 2021-05-14 09:38:31 +02:00
Daniele Lacamera 98fa5e707e Added missing config entry in config.mk (see #93) 2021-02-05 10:52:16 +01:00
Daniele Lacamera 4468e6afb7 Updated test with encryption+uart to run on Jenkins 2021-02-01 16:54:57 +01:00
David Garske ecfc4b5008 Support for overriding the wolfBoot root (`WOLFBOOT_ROOT`) to allow proper detection of the signing/keygen tools. 2021-02-01 12:44:17 +01:00
Dimitar Tomov a2ff8f1d8e Make sure wolfTPM support is included when measured boot is enabled
Signed-off-by: Dimitar Tomov <dimi@wolfssl.com>
2020-12-10 17:46:51 +02:00
Daniele Lacamera 4e27d9197f Added compile-time option to invert FLAGS logic (FLAGS_INVERT=1) 2020-11-03 11:05:14 +01:00
David Garske 9d3f763354 Fix for scripts to detect and use C version of signing tool if available. Updated instructions to use correct address. Minor cleanups. 2020-09-30 11:45:53 -07:00
Daniele Lacamera cbe002fad7 Merge branch 'update-flags-in-boot-partition' into stm32l5 2020-09-28 17:10:28 +02:00
Daniele Lacamera b0fbafe014 Added DISABLE_BACKUP option 2020-09-14 16:31:07 +02:00
Daniele Lacamera 75898806eb Added option FLAGS_HOME to store UPDATE flags in the BOOT partition 2020-09-11 11:25:51 +02:00
Daniele Lacamera fd0b13079a Added support for dual bank swap in stm32l5 2020-09-09 14:26:30 -07:00
Daniele Lacamera 5614c75f1e Fixed address alignment, TZEN=0 mode not yet working 2020-09-09 14:26:30 -07:00
Daniele Lacamera d642231344 Disable TZEN by default on all platforms 2020-09-09 14:26:30 -07:00
Daniele Lacamera 61890b0bdb Fixed stm32l5 artifacts 2020-09-09 14:26:30 -07:00
David Garske 43c2e3dd79 Experimental support for STM32L5 2020-09-09 14:26:30 -07:00
David Garske c30d675e38 Fix for building on Mac. Added README.md. 2020-08-13 13:02:59 -07:00
Daniele Lacamera 5ad13dbac0 unit-parser.c: Added (c) and short description 2020-08-13 14:01:18 +02:00
Daniele Lacamera 4d93c68542 Added unit test for wolfBoot_find_header 2020-08-13 13:57:32 +02:00
Daniele Lacamera 24538d19d9 Relocate temporary key slot to the end of the partition 2020-08-11 15:32:47 +02:00
David Garske a11a3a3bc1 Fix for building C tools with Visual Studio. 2020-07-24 10:59:26 -07:00
Daniele Lacamera b2beb49370 Fixed bug in encrypted update, removed swap_counter. 2020-07-15 17:36:38 +02:00
Daniele Lacamera 26ebbc53c5 [Jenkins] fixed SPI CS pin config on test-bench 2020-06-29 17:55:43 +02:00
David Garske c473a53ebe Improvements to the key tools documentation. 2020-06-24 09:04:24 -07:00
Daniele Lacamera e303c282c7 Added TPM+RSA automated tests for jenkins 2020-06-24 16:56:32 +02: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
Daniele Lacamera 5c2e44a417 Fix broken test configuration 2020-06-22 12:07:15 +02:00
Daniele Lacamera 2523d2cd19 Removed enforced .config breaking jenkins set-up 2020-06-22 11:50:21 +02:00
David Garske 50456e27cc Fix for arg count on C sign tool. 2020-06-18 12:22:17 -07:00
Daniele Lacamera 64134ded1f Minor fixes from code review 2020-06-18 18:43:50 +02:00
Daniele Lacamera 8af26f6fe6 s/echo -n/printf in test-enc.mk 2020-06-18 18:28:26 +02:00
Daniele Lacamera 9971b8b893 USBTTY, TIMEOUT command line parameters for test-enc.mk 2020-06-18 16:51:01 +02: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 7d7ca4299b Added test for encrypted update over UART on STM32WB55 2020-06-17 10:36:14 +02:00
Daniele Lacamera b3fad42f05 Added helper scripts to create test update images, config for enc-uart
use case
2020-06-16 17:52:50 +02:00
Daniele Lacamera ceb07ec315 Fixed encryption alignment and signing tool IV 2020-06-16 17:52:50 +02:00
Daniele Lacamera c9f8f6a12e Added uart driver for stm32wb 2020-06-16 17:52:50 +02:00
Daniele Lacamera 53bf4d04db Encrypt: API design 2020-06-16 17:50:55 +02:00
Daniele Lacamera d21dfc2778 Merge branch 'master' into psoc6_hwcrypto 2020-06-16 09:36:54 +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
Daniele Lacamera 17707b7a37 Support for PSOC6 crypto support: added compile option 2020-06-05 11:49:57 +02:00
Daniele Lacamera c4c786d254
Merge pull request #49 from dgarske/winfixes
Fixes for building C signing tools on Windows (Cygwin/MinGW).
2020-06-01 21:54:14 +02:00
David Garske 93d62112e9
Merge pull request #52 from danielinux/mpu
Added support for memory protection on ARM using MPU
2020-05-26 06:42:01 -07:00
David Garske 782d4b685c Fix to allow .config to define WOLFTPM variable (and others). 2020-05-25 07:01:05 -07:00
Daniele Lacamera 7ade0ee2c0 Added support for memory protection on ARM using MPU 2020-05-25 15:14:41 +02:00
David Garske 5a8032d619 Add detection for `tools/keytools/sign.exe` and `tools/keytools/keygen.exe`. Show more commands with `make V=1`. 2020-05-23 11:08:30 -07: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 f3d0d8fc83 PSoC6 support: updated configuration, docs added to Targets.md, revert
custom NVM_CACHE_SIZE
2020-05-20 06:53:00 -07:00
Daniele Lacamera 3db37a6b5c Updated NVM_CACHE_SIZE to match different configurations.
Progress on psoc6 HAL, fixed memory mapping and test app
2020-05-20 06:53:00 -07:00
Daniele Lacamera 75638394b1 Initial draft for psoc6 support 2020-05-20 06:53:00 -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 fbf4f727a6 Re-added missing includes in ufserver when compiling on linux 2020-04-07 16:41:38 +02:00
Daniele Lacamera aaa5f962e6 minor changes after code review 2020-04-07 16:39:37 +02:00
David Garske ec1b4b4d95 allow the ufserver to build on Mac 2020-04-07 16:35:20 +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 92e1f632c1 Removed magic numbers for bitrate 2020-04-03 20:24:13 +02:00
Daniele Lacamera 7ffcdca098 External, emulated non-volatile memory over UART 2020-04-03 14:27:42 +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