Commit Graph

27 Commits

Author SHA1 Message Date
kaczmarczyck
f95ae1f5ab Make private keys extensible (#476)
* 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
2022-05-10 14:31:29 +02:00
kaczmarczyck
4782d7e186 Separate RNG library (#470)
* seperates the RNG library

* fixes crypto tests

* adds rng256 workflow

* fixes formatting
2022-04-28 11:36:43 +02:00
hcyang
aca1f35170 Make rng in TestEnv deterministic and seedable (#461)
* Move three dependent customizations into new file

* default_min_pin_length(_rp_ids) and max_rp_ids_length

* Did some backing store tricks to make the list configurable in
  TestCustomization.

* Add testing for TestCustomization

* Change assert comparison to assert_eq

* Separate tests

* Move 3 pure constants to new file

* Return Vec<String> for rp_ids()

* Make rng in TestEnv deterministic and seedable

* Move seed method to TestRng256

* Change some constant name in comments to snake case

* Move seed rng of env to the start

* Fix unused warning

* Make rng in TestEnv deterministic and seedable

* Move seed method to TestRng256

* Move seed rng of env to the start

* Fix unused warning

* Seed rng in all fuzz targets

* Fix error introduced when merging

Co-authored-by: Julien Cretin <cretin@google.com>
2022-04-20 15:49:17 +08:00
Fabian Kaczmarczyck
d6a2080cd5 adds channels to CTAP logic 2022-03-16 17:03:00 +01:00
Shiling Wang
2050f9f272 Replaced Libtock driver clock with embedded_time::Clock (#422)
* Replaced Libtock driver clock with embedded_time::Clock

* Add unittest and address some comments

* Add unittest and address some comments
2022-03-10 16:18:47 +01:00
Julien Cretin
732523d380 Use Store instead of Storage in Env 2022-03-07 12:48:33 +01:00
Julien Cretin
c4a27bf935 Add Storage and UpgradeStorage to Env 2022-03-03 17:37:28 +01:00
Julien Cretin
18faf9f38f Introduce a trait to abstract the CTAP environment
The end goal is to provide users with:
- the Env trait that they should implement
- the Ctap struct that they can use
2022-03-03 17:32:48 +01:00
David Drysdale
0287a09573 cbor: allow user to control nesting (#329)
* cbor: allow user to control nesting

 - Make the default read/write entrypoints allow infinite nesting.
 - Add {read,write}_nested() entrypoints that allow the crate user to
   control the depth of nesting that's allowed.
 - Along the way, convert the write[_nested] variants to return a
   `Result<(), EncoderError>` rather than a bool.  This exposes
   more failure information (and forces the caller to take notice
   of those tailures), and allows use of the ? operator.

* fixup: transmute error

Co-authored-by: kaczmarczyck <43844792+kaczmarczyck@users.noreply.github.com>
2021-06-18 19:39:54 +02:00
David Drysdale
7719078d46 cbor: rename crate to sk-cbor
In anticipation of publishing to crates.io, which already has a `cbor`
crate.
2021-06-16 17:16:05 +02:00
kaczmarczyck
aec1e0a409 adds PIN protocol V2 to all commands (#295) 2021-03-18 17:29:32 +01:00
kaczmarczyck
e5313057f9 PIN protocol V2 in ClientPin (#293)
* PIN protocol V2 in ClientPin

* the test ClientPin has a random second private key
2021-03-15 13:36:28 +01:00
kaczmarczyck
eb0a0770dd adds the PIN protocol trait (#292)
* adds the PIN protocol trait

* improved documentation

* SharedSecret not mutable
2021-03-10 13:20:29 +01:00
kaczmarczyck
351e6c12c6 renames PIN protocol related variables to prepare PIN protocol v2 (#291) 2021-03-04 10:37:19 +01:00
kaczmarczyck
a54b217116 Merge branch 'develop' into resolve-permission 2021-02-05 11:24:48 +01:00
Fabian Kaczmarczyck
e3148319c5 allow RP ID permissions for some subcommands 2021-02-04 16:06:25 +01:00
Fabian Kaczmarczyck
db7ed10f5f changes the handling of 0 credentials 2021-02-02 18:04:29 +01:00
Fabian Kaczmarczyck
5741595e57 new extension entry for largeBlobKey 2021-01-27 16:47:27 +01:00
Fabian Kaczmarczyck
b2c8c5a128 adds the new command AuthenticatorLargeBlobs 2021-01-22 13:55:32 +01:00
Fabian Kaczmarczyck
14189a398a implements the credBlob extensions 2021-01-20 19:13:05 +01:00
Fabian Kaczmarczyck
9296f51e19 stricter API for StatefulCommandPermission 2021-01-20 12:08:07 +01:00
Fabian Kaczmarczyck
134c880212 reworks command state to its own struct 2021-01-19 15:07:15 +01:00
Fabian Kaczmarczyck
e3353cb232 only stores the RP ID index as state 2021-01-19 12:42:41 +01:00
Fabian Kaczmarczyck
3702b61ce7 implements Default for Response type 2021-01-15 17:41:16 +01:00
Fabian Kaczmarczyck
0bb6ee32fc removes unused duplicate PIN protocol check helper 2021-01-14 16:45:38 +01:00
Fabian Kaczmarczyck
1f37ae50c5 Merge develop into command-cred-mgmt 2021-01-14 16:14:10 +01:00
Fabian Kaczmarczyck
c6726660ac adds the command logic for credential management 2021-01-13 15:02:46 +01:00