Commit Graph

98 Commits

Author SHA1 Message Date
Fabian Kaczmarczyck
93357524d9 dilithium, hybrid, ctap implementation, experiments 2022-10-20 23:19:15 +02:00
kaczmarczyck
598c21071e New metadata format (#539)
* new metadata format is used

* Update bootloader/src/main.rs

Co-authored-by: ztoked <zhalvorsen@google.com>

* splits the metadata signed and unsigned parts evenly

* fixes pylint

Co-authored-by: ztoked <zhalvorsen@google.com>
2022-08-31 14:35:45 +02:00
Liam Murphy
c6d3f51b5f Add configure-only mode to deploy.py script (#471)
* Add configure-only mode to deploy.py script

* Default configure flag to true
2022-08-09 08:12:37 +02:00
Liam Murphy
262e505ef7 Support configure via the Vendor interface (#524)
* Support configure via the Vendor interface

* Adjust tests now that GetInfo is supported on vendor_hid

* Add test for vendor_hid not supporting FIDO command
2022-08-08 13:54:46 +02:00
foopub
a9a67ae0d7 Provide openocd_cmd and add some documentation (#492)
* Provide openocd_cmd

* Add openocd instructions for dongle
2022-06-29 01:40:02 +02:00
Julien Cretin
d7b24424e5 Disable patches check on github 2022-06-21 19:58:43 +02:00
Julien Cretin
90322cf5ed Fix pylint 2022-06-21 19:52:10 +02:00
Julien Cretin
b14ed0e742 Add check command to patches script 2022-06-21 19:42:37 +02:00
Liam Murphy
2544afbfee Connect Vendor HID interface between USB driver and CTAP app (#490)
* Connect Vendor HID endpoint to Ctap app

* tweaks from review

* formatting nit

* revert tock submodule revision

* fix formatting of deploy.py for yapf error

* Changes based on review

* Track state for each USB endpoint separately

* Rename patch file to ensure correct patching order

* Adjust patch from changes #494 and #500

* rustfmt

* rustfmt

* Deprecate patch 11 in favor of this full working code
2022-06-20 07:31:31 +02:00
Egor Duda
9d36da16c7 More detailed description for "ed25519" option 2022-05-19 12:00:28 +03:00
Egor Duda
c7116b1c21 Return strict warning checking
llvm_asm! don't cause warnings in older edition of Rust
2022-05-17 17:16:01 +03:00
Egor Duda
f24445b325 with_ed25519 -> ed25519 ("with_*" naming is discouraged) 2022-05-13 20:43:09 +03:00
Egor Duda
983bc5c5b2 Add support for ed25519 keys (#335) 2022-05-12 22:56:33 +03:00
Liam Murphy
2b541d853b Create a 2nd USB interface for the Vendor HID (#472)
* 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.
2022-05-03 10:35:35 +02:00
kaczmarczyck
0b564d4a8a Vendor HID (#446)
* introduces vendor HID

* updates workflows with new feature

* feature renaming and variant covering
2022-03-15 14:41:48 +01:00
kaczmarczyck
187111f9c5 Bootloader infrastructure and main logic (#404)
* adds bootloader code without a SHA256 implementation

* small fixes and typos
2022-03-03 22:01:42 +01:00
kaczmarczyck
5cf988c7fa allows silent certificate checks (#410) 2021-11-18 17:09:40 +01:00
kaczmarczyck
32da73772f Upgrade tooling (#400)
* upgrade tooling

* adds condition on nrfjprog
2021-11-04 16:31:37 +01:00
kaczmarczyck
330fa12d1a erase unused flash pages so hashes matches (#392)
* erase unused flash pages so hashes matches

* always pad the kernel, adds docstrings

* added type hints

* fix typos
2021-11-01 10:34:13 +01:00
kaczmarczyck
9b780ef7d7 New boards with layouts for dual partition setups (#387)
* upgradable boards

* updates the install manual for proper SSL config

* storage locations from build script

* deploy script improvements

* UTC time
2021-10-06 18:33:40 +02:00
Fabian Kaczmarczyck
31df2ca45e use f-strings and test with 3.9 2021-09-17 14:12:58 +02:00
Julien Cretin
2d5fdd1034 Configure the number of pages in the board
This permits to have portable apps.
2021-09-13 18:50:13 +02:00
Jean-Michel Picod
c1f2551d0d Bump Tock kernel version (#374)
* 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>
2021-09-10 08:32:34 +02:00
Julien Cretin
7418196814 Specificy encoding when opening rust-toolchain file
This probably is just ASCII.
2021-08-30 11:41:14 +02:00
kaczmarczyck
ce0ee6c054 Kernel minimization (#334)
* adds patch to remove unused kernel components

* new boards, rebase patches to match

* rename boards for deployment
2021-06-28 14:55:20 +02:00
Fabian Kaczmarczyck
9ca17b17e1 configuration changes to reduce binary size 2021-06-18 16:57:23 +02:00
Jean-Michel Picod
fe0a9f208e Fix broken parsing. (#317) (#323)
* Fix broken parsing.

By setting the default value before pre-parsing we ensure that the item
can't be None. As an extra safety the custom action also checks for
None.

Co-authored-by: kaczmarczyck <43844792+kaczmarczyck@users.noreply.github.com>
2021-06-09 22:52:52 +02:00
kaczmarczyck
f11a838cc7 Improved documentation for customization (#287)
* move constants to new file, and update documentation

* documentation improvements, deploy checks tests

* fix pylint

* improved code style

* swap build and check
2021-02-19 14:20:23 +01:00
Fabian Kaczmarczyck
c873d3b614 removes all occurences of CTAP 2.1 flags 2021-01-08 12:40:37 +01:00
Julien Cretin
f67fdbc451 Add erase_storage application example 2020-12-22 16:17:02 +01:00
Jean-Michel Picod
e35c41578e Add configuration tool 2020-12-16 18:22:15 +01:00
Julien Cretin
ece546a03b Merge branch 'master' into v2_lib 2020-12-10 17:08:00 +01:00
Julien Cretin
ae08221cdb Add latency example 2020-12-10 13:31:25 +01:00
Julien Cretin
4253854cf1 Remove ram_storage feature
We don't need to build a production key without persistent storage. Tests and
fuzzing continue to use the std feature to use the RAM implementation (that does
sanity checks).
2020-12-10 13:06:05 +01:00
Mirna
f9705d7c26 example app 2020-11-02 11:13:58 +02:00
Mirna
b95b0682f9 Added NFC compile flag 2020-10-23 19:25:36 +02:00
Mirna
7e0a48ae1c Resolved Review Comments 2020-10-21 10:39:17 +02:00
Mirna
929aaf3ba2 Update in libtock-drivers/ and nfct_test.rs application 2020-10-16 08:06:42 +02:00
Mirna
d36cac1a33 Add NFC example application 2020-10-16 08:06:42 +02:00
Guillaume Endignoux
70482a2f21 Install elf2tab in its own directory. 2020-09-29 12:56:21 +02:00
coelner
ef40657c27 install a local elf2tab binary within the repo itself 2020-09-24 12:36:11 +02:00
Guillaume Endignoux
a3b9724165 Add console_test example to stress-test Tock's console driver. 2020-09-22 16:33:52 +02:00
Jean-Michel Picod
4b4f3ccbfb Fix pylint error 2020-09-15 11:29:03 +02:00
Jean-Michel Picod
62c9cebb3e Fix logic error with ctap2.1 2020-09-01 17:23:43 +02:00
Jean-Michel Picod
728401b00f Bump elf2tab to 0.6.0 2020-09-01 17:23:26 +02:00
Jean-Michel Picod
d4bb0dd7ef Fix parsing logic of deploy.py script 2020-08-12 11:20:37 +02:00
Jean-Michel Picod
8f358b7d81 Move to tockloader 1.5 2020-08-07 16:28:39 +02:00
Guillaume Endignoux
e60e10e777 Add examples for panic_test and oom_test. 2020-08-07 15:09:07 +02:00
Guillaume Endignoux
58e2f1211c Update deploy.py to the new libtock. 2020-08-07 15:09:07 +02:00
Guillaume Endignoux
3124735cf1 Use argparse.FileType as suggested in review. 2020-06-09 16:54:44 +02:00