This move changes the Env trait: It removes all functionality that is
used only in vendor commands (`FirmwareProtection`, `UpgradeStorage`)
and adds a function to call when parsing CBOR commands.
The abstraction necessary to test these commands is instead realized
through compile flags. The mock upgrade storage is active when compiled
for std for example.
* Replaces the Rng256 with RngCore from rand_core
The old trait was designed with our software crypto in mind. We should
use a more standard API going forward.
- Removes libraries/rng256/
- Ports libraries/crypto/ to rand_core
- Moves the used RNG trait to api/
* Use StdRng directy in TestEnv
They assume blocks are encrypted/decrypted one at a time. To avoid one syscall
per block, it is preferable to encrypt/decrypt the data at once.
Change-Id: I795c8f5b7901a1b55fa3b06fa45fe57ab19d06ea
* Bump Tock kernel version
* Update boards to new kernel
* Update patches to new kernel
* Update PR template
* Bump libtock-rs
* Use new layout from libtock-rs
* Fix clippy warnings due to updated toolchain
* Fix new toolchain file format
* Bump elf2tab to v0.7.0
* Fix worklow and setup.sh script to use the TOML rust-toolchain file
* New libtock-rs style of declaring the stack.
* Fix padding in layout file.
The layout from libtock-rs generates invalid flash padding.
The value is 32-bit and therefore setting padding to 0xff yields
0xff000000 instead of 0xffffffff that we want.
* adds tock patch for app break hard fault
* sets in deploy, removed patch 04-mpu-fix
* fixed the if deploy
* fixes indentation
* updates board names in install.md
* fix docs and deploy style
Co-authored-by: Fabian Kaczmarczyck <kaczmarczyck@google.com>
Co-authored-by: kaczmarczyck <43844792+kaczmarczyck@users.noreply.github.com>
The main difference comes from c03605aa0c where we
started using -Oz instead of -O. A similar difference in latency is probably
expected in crypto and cbor too.
This way all users of storage can share the logic to choose between flash or RAM
storage depending on the "std" feature. This is needed because the store_latency
example assumes flash storage but is built when running `cargo test
--features=std`.