1279 Commits

Author SHA1 Message Date
kaczmarczyck
8733d6585f Version string for CTAP 2.1 (#590)
* new version string for 2.1

* fixes new Python linter problems
2023-02-08 09:20:59 +01:00
浅香ジュン
684d37fa03 error-message: fix the incorrect output of low nrfutil version. (#581) 2023-01-25 15:32:37 +01:00
kaczmarczyck
0db393bd1e adds style fix and updates Cargo.lock (#576) 2023-01-04 15:19:26 +01:00
kaczmarczyck
6b5f6e53eb upgrades linked_list_allocator (#574) 2022-12-12 16:42:49 +01:00
Julien Cretin
f6e9e00b87 Add linear view into a storage (#571) 2022-12-07 13:00:41 +01:00
Julien Cretin
0d0460f016 Fix pylint versions (#572) 2022-12-07 09:53:31 +01:00
L0g4n
9ab3bc977c Respect CARGO_TARGET_DIR env var (#564)
* Respect `CARGO_TARGET_DIR` env var

This change resolves `CARGO_TARGET_DIR` when set instead of hardcoding
Cargos `target/` dir.

* Fix pylint offenses

* Simplify env query

* Fix yapf offenses
2022-10-24 06:30:32 +02:00
kaczmarczyck
44cafb9566 introduces customization for PIN protcol v1 (#559) 2022-10-13 16:13:07 +02:00
kaczmarczyck
3c28ff49ee Simplifies Env upgrade API (#551)
* removes read_partition and partition_length from upgrade API

* renames partition to bundle, also data type change from slice to Vec

* removes hash from Env API

* fixes comment
2022-10-03 16:33:34 +02:00
kaczmarczyck
6610a29a67 Fixed proc-macro2 version (#550)
* fixes proc-macro2 in dependencies

* adds missing locked versions, and a verbose print for cargo check

* commits Cargo.lock files

* removes unnecessary Cargo.lock entries

* adds missing Cargo.lock
2022-09-27 10:12:45 +02:00
kaczmarczyck
f2fac83124 Fix once_cell dependency (#548)
* fixed version of once_cell

* fixes comments

* removes unnecessary fuzz dependency
2022-09-21 19:32:09 +02:00
kaczmarczyck
d6994e3bc3 New Upgrade Interface (#543)
* includes metadata inside partition, introduces the partition helper

* style improvements
2022-09-13 10:06:58 +02:00
kaczmarczyck
8288bb0860 Firmware version for upgrades (#542)
* shows and checks the firmware version

* merges metadata ranges in boards

* simplifies locations loop
2022-09-01 18:28:03 +02:00
kaczmarczyck
771ce7635b moves metadata parsing to Env (#541) 2022-08-31 16:58:49 +02:00
kaczmarczyck
1b360662ee Public Key plain byte encoding (#540)
* public key is encoded in bytes

* ECDSA pubkey in uncompressed format
2022-08-31 15:51:40 +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
kaczmarczyck
932924ea85 removes metadata storage type (#538) 2022-08-29 12:05:58 +02:00
kaczmarczyck
01cc8333e5 Tool fixes (#537)
* private key type is str, some fixes

* catches file exceptions for private key

* adds exception type

* adds exception message
2022-08-29 11:00:31 +02:00
Julien Cretin
2dc44984ed Merge pull request #534 from ia0/bumpalo
Fix bumpalo issue
2022-08-23 11:11:34 +02:00
Julien Cretin
a44d961e7e Fix bumpalo issue 2022-08-23 10:43:44 +02:00
Julien Cretin
5509e3f072 Merge pull request #531 from ia0/concat
Add support for concatenated values
2022-08-22 17:09:08 +02:00
kaczmarczyck
d2037a4bbe Merge branch 'develop' into concat 2022-08-22 15:55:29 +02:00
kaczmarczyck
6bb12252f8 Set bumpalo version for fuzzing (#532)
* maximum working bumpalo version

* explicit comment to explain version locking

* removes incorrect comment

* moves serde version lock to dev dependencies

* removes serde dependencies

* reverts serde removal in crypto library
2022-08-22 15:53:50 +02:00
Julien Cretin
e52adf04c7 Add support for concatenated values 2022-08-19 12:47:29 +02:00
kaczmarczyck
4442998b64 Vendor HID for upgrades (#529)
* vendor-hid for upgrades

* empty argument fix

* same vendor-hid usage in both deploys

* forgot one board

* aaand also forgot the quotes
2022-08-17 10:29:26 +02:00
hcyang
87839af572 Support credBlob for non-resident credentials (#518)
* Support credBlob for non-resident credentials

- Add a upper limit of max_cred_blob_length
- Add test cases for cred_blob in non-resident flows
- Modify the test helper functions in ctap/mod.rs a bit

* Fix some styles in credential_id.rs

Co-authored-by: kaczmarczyck <43844792+kaczmarczyck@users.noreply.github.com>
2022-08-16 22:23:49 +08:00
kaczmarczyck
5daf5f81d1 uses latest in workflows (#528) 2022-08-15 10:44:05 +02:00
Julien Cretin
d3e01d22fb Duplicate the credential management command as a vendor command (#527)
* Duplicate the credential management command as a vendor command

This permits to work with libfido2 and thus ssh-add. Fix #526.

* fix deploy_partition script
2022-08-13 06:27:31 +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
f07be7f2ac Tweak: use the Usage page const, not an immediate (#525)
Co-authored-by: kaczmarczyck <43844792+kaczmarczyck@users.noreply.github.com>
2022-08-08 16:23:19 +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
Liam Murphy
4a2217f025 Interleave sending and receiving of packets to reduce rx latency (#515)
* Interleave sending and receiving of packets to reduce latency in receiving of packets

* Add patch to CtapUsbSyscallDriver

* Minor tweaks from review

* Log when overwritting an existing reply

* Only log when 'debug_ctap' is enabled

* Make ctap mod public, as per review

* Rename send_or_recv to send_and_maybe_recv

* fix typo

* Don't process packets on other transport while doing keepalive

* Don't process packets on other transport while doing keepalive

* More accurately determine if reply has finished

* Move comment closer to appropriate location

* Add tests for canceling keepalive packets

* Added a TODO for kaczmarczyck re ctap module being public

* remove the unnecessary sleep()s

* undo messed up commit

* address pylint warnings

* Fix merge mess up, and patch fido2 Usage Page

* Fix up completely borked merge

* Remove patch to FIDO usage, after #523.

* remove obsolete aspects to diff

Co-authored-by: kaczmarczyck <43844792+kaczmarczyck@users.noreply.github.com>
2022-08-04 14:54:22 +02:00
Liam Murphy
0dad7b19ff Set the Vendor HID Usage to 1 (#523) 2022-08-04 13:32:34 +02:00
Liam Murphy
6276904a42 Fix user presence by not overwriting error with OK() (#521)
* Fix user presence by not overwriting error with OK()

* revert debugging change to TOUCH_TIMEOUT_MS

* fix up incomplete merge

* rename variable to more understandable name

* Add tests to test user_presence
2022-08-02 11:38:02 +02:00
Liam Murphy
253d27d612 Add tests to demonstrate broken user presence timeouts (#520)
* Add tests to demonstrate broken user presence timeouts

* fix up some formatting

* apply auto-formatting
2022-08-01 09:13:14 +02:00
Liam Murphy
2bc405165e Process incoming packets on different interfaces in a round robin fashion. (#514)
* Round-robin order for receiving packets

* Update next packet after sending packet

* fix up some formatted raised during review

* remove the whitespace noise from last commit
2022-07-26 13:07:26 +02:00
hcyang
8ef813cf76 Move out check credProtectPolicy logic (#516)
* Move out check credProtectPolicy logic

Move the credProtectPolicy check outside credential ID decryption &
discoverable credential finding. Modify the unit tests, and add unit
tests for credProtectPolicy checking in non resident flows that were
originally missing.
2022-07-23 11:10:10 +08:00
hcyang
9bb1a2f7ac Fix ctap1 clippy warning (#517)
And improve clippy workflows.
2022-07-22 13:23:29 +08:00
Liam Murphy
168de290de Add test script to verify Vendor HID interface (#503)
* Add test script to verify Vendor HID interface

* fix formatting

* fix formatting

* fix formatting

* fix formatting

* duplicate tests to test both interfaces first and second

* simplifiy using unique byte val

* more tests

* fix up tings from review

* reset rx packets after reading.

* fix formatting.
2022-07-20 12:27:07 +02:00
Liam Murphy
fbe00d57f9 Fix USB deadlock handling pending packets (#513) 2022-07-15 08:23:27 +02:00
Julien Cretin
d2377740ab Merge pull request #511 from ia0/attestation_store
Abstract attestation support
2022-07-14 13:27:48 +02:00
Julien Cretin
07a28fe611 Inline Helper 2022-07-14 12:50:39 +02:00
Julien Cretin
b28f8f6d33 Merge branch 'develop' into attestation_store 2022-07-14 12:37:11 +02:00
hcyang
4736cc63c4 Add CBOR credential ID type (#512)
* Add CBOR credential ID type

Update the format of the credential ID we generated to extend the
encrypted portion from only private_key + rp_id_hash to a flexible CBOR
map. This way we can persist more data into the key handle in the future
without need of a new version.

We add credProtectPolicy to the persisted data in this commit too, so we
can correctly check the credProtectPolicy for non-discoverable
credentials in follow-up commits.

* Fixed some style problems.

* Fix cargo clippy warning

* Check credProtectPolicy for non-discoverable credentials.

* Remove support of old v1, v2 key handles

- And changed some style problems

* Style changes

* Add missing `alloc` use
2022-07-14 14:17:12 +08:00
Julien Cretin
f528567ce1 Expose the get and set helper implementation 2022-07-12 16:58:29 +02:00
Julien Cretin
bc354d8abb Fix attestation priority 2022-07-11 11:16:58 +02:00
Julien Cretin
0bbc8663c2 Remove unused variable 2022-07-07 17:28:33 +02:00
Julien Cretin
25c884c070 Address comments 2022-07-07 17:23:24 +02:00
Julien Cretin
80a6b82ed7 Abstract attestation support 2022-07-05 16:26:07 +02:00
Julien Cretin
aee7d7c9b3 Merge pull request #509 from ia0/keystore
Add a key store to avoid storing secrets in the store
2022-07-01 14:31:10 +02:00