We shouldn't compare private keys in prod for side-channel resilience. Ideally
we shouldn't clone too. We currently do for storage. Fixing this would probably
require to serialize the private key in the credential struct.
ed25519-dalek does not implement Clone and Eq for secret keys, and
relevant PR in its repository wait for merge from long time ago, leading
to potential problems with maintainability
* adds PrivateKey to handle different algorithms
* fixes input check problem of decrypt_credential_source
* addresses comments
* version number not encrypted
* version number test
* adds a credential size test
* removes the algorithm from credential encoding
* Add set_enterprise_attestation in TestEnv
* Add test_helpers for Test Unification
* Used it in structured fuzzer and enterprise attestation unittests
* Restructure test_helpers
* Rename setup_enterprise_attestation to enable_
* Add USB interface for Vendor HID.
This new interface is enumerated by the host, but the device transmits
all packets on the existing interface, so the device won't function
correct in this mode until this this fixed.
The changes are in tock, and so appear as a patch here. These are:
* supporting multiple HIDs in the USB configuration
* adding the HID descriptors for the new inteface
* supporting the vendor_hid feature in relevant Cargo.toml files.
NOTE: only boards/nordic/nrf52840dk_opensk has been updated.
As the changes are in tockos, deploy script needed to pass vendor_hid
feature to tockos build stage.
Demo of output:
lsusb -v -d 1915:521f | grep "NumInterfaces"
bNumInterfaces 2
* fix some whitespace from review
* Add vendor_hid feature in all boards in this repo, not via a patch in tock.
The boards directories are copied to tockos as part of
setup-submodules.sh
* Remove nesting from HID config in create_descriptor_buffers()
* update comments about HID descriptor use.
* Move enterprise mode related customizations to new file
* Fix cargo clippy error
* Add is_enterpris_rp_id API to avoid cloning
* Only expose enterprise_rp_id_list API in std