Commit graph

95 commits

Author SHA1 Message Date
bunnie
11932898ac oops, broke CI with something in *this* code
push a fix that will get CI running, but breaks this dev flow
2022-06-18 01:16:39 +08:00
bunnie
645fcf46fd refactor file locations so the structure is more scalable 2022-06-17 23:52:04 +08:00
bunnie
e5b4f4ad7f clean up a minor warning for a merge to main
let's put these GAM changes into production so others can use
them, even though the app is still coming together.
2022-06-17 21:38:45 +08:00
bunnie
f77324a4e5 add some test text 2022-06-17 21:37:39 +08:00
bunnie
37b2ee444d add basic submenu support to vault app 2022-06-17 18:51:13 +08:00
bunnie
551258b18d add a submenu entry for the vault app 2022-06-17 18:29:21 +08:00
bunnie
3d4f689ef5 lay in the groundwork for the "icontray"
this allows the predictor area to serve as hot keys to
swap between modes of operation for the vault app.
2022-06-17 12:42:22 +08:00
bunnie
7b2fbdc88b evict f64's from the kernel, and eliminate f32 parsing
turns out these routines add quite a bit of bloat to the kernel
for only cosmetic reasons.
2022-06-14 04:14:25 +08:00
bunnie
d2aff7da44 Fix #181
This is still a bogus AAGUID but at least it's less likely to
collide with other bogus AAGUIDs.
2022-06-13 17:49:14 +08:00
bunnie
cce617366f move to the release version of usbd-human-interface-device
thanks @dlkj!
2022-06-13 00:20:14 +08:00
bunnie
9ab3f71f23 modify naming of FidoInterface to RawFidoInterface
per maintainer request of usbd-human-interface-device for PR
2022-06-12 23:05:20 +08:00
bunnie
3f791f5979 sync pddb after any credential change state
help prevent data loss in case of power outage/crash
2022-06-11 03:08:23 +08:00
bunnie
e32ea4d3f5 fix #174 2022-06-10 21:36:53 +08:00
bunnie
cae1c3267e add sentinels for test automation 2022-06-10 21:16:59 +08:00
bunnie
42996a8177 fix U2F flow
accidentally broke it while debugging FIDO2. added notes about how
the flow is implemented.
2022-06-09 02:57:31 +08:00
bunnie
e68c976735 configure vault for production and add maintainer's notes 2022-06-09 00:20:36 +08:00
bunnie
3fc038cca9 add some missing translations, and add a listener to the unplug state 2022-06-08 23:48:09 +08:00
bunnie
52211f078e adjust autotest flow for UDP-based button pressing 2022-06-08 20:15:32 +08:00
bunnie
ec5d61e678 add comment on test 2022-06-08 04:35:04 +08:00
bunnie
7db4db2701 fix ECDH error
was missing the FIDO-required sha256 hash after ECDH key exchange
2022-06-08 04:33:09 +08:00
bunnie
4a12b458c9 seems like the DH key exchange is broken somehow? needs more digging.
i've extracted the key parameters from the test suite and confirmed that
that the hash value is computed correctly on their side.

i've also confirmed that the hash value is computed correctly from
the locally computed key.

so what's gone wrong is the devired secret key doesn't match what's
on the other side.

possible issues could be either a PK serialization issue, or something
wrong in the DH exchange itself.
2022-06-07 18:55:59 +08:00
bunnie
ae9c2d5b99 add authentication request UI; fix tests again.
trying to debug why PIN authentication doesn't work. looks like
Cosekey conversion is fine, the data is arriving OK...but the
dh key exchange is not generated the expected shared secret.
2022-06-07 17:36:28 +08:00
bunnie
51be4700ee improve UX for FIDO2 and try to ferret out FIDO2 test problems. 2022-06-07 03:56:52 +08:00
bunnie
d61732a3aa add note to self about not updating the hex dependency in the tests for crypto libraries 2022-06-06 22:55:19 +08:00
bunnie
6be6537194 fix dependency for tests to work 2022-06-06 22:54:48 +08:00
bunnie
b0c7895e81 add total use count to statistics stored on auth keys 2022-06-06 22:45:57 +08:00
bunnie
052c63aea3 why do these old files keep creeping in after a merge... 2022-06-06 19:05:53 +08:00
bunnie
86a1f9741e add UX flow for U2F transactions: register app name and display it
this allows users to know what exactly they are approving.
2022-06-06 19:00:43 +08:00
bunnie
73f3ef827c cleanup warnings and unused code 2022-06-06 04:39:43 +08:00
bunnie
25bbfc835e u2f is now "working" in that it passes some basic tests 2022-06-06 03:46:11 +08:00
bunnie
69b9e53986 Merge branch 'main' into u2f 2022-06-05 23:09:03 +08:00
bunnie
94b7bde983 fix spurious rebuild issue
Had two JSON entries with the same key, which meant you had
 a 50/50 chance of a rebuild being triggered depending on which
entry was picked for the build. :-/
2022-06-05 23:08:09 +08:00
bunnie
8fd94f061e fix default backend issue on configuration tool 2022-06-05 02:11:37 +08:00
bunnie
1024cebe55 add primitive UX layer to U2F application. fix numerous bugs
The OpenSK UX layer was completely gutted and re-written using
Xous-native idioms. There's a bit of ambiguity on what exactly
OpenSK meant to do with the one button and the LEDs, but for
Xous we want to show things like what you're signing for and
why.

For now, we just show the app hash during registration and signing,
but down the road that will need to be matched up against a
plaintext description of the application upon registration, so
users can have a client-side description of what they are approving.

At the moment, we're stuck at provisioning the attestation certificate
and key. The transaction goes through, but is rejected by the
test web site right now with not too much explanation of what went
wrong, but maybe the next step is to try and use the OpenSK
native tools to provision a set of keys onto the device to see
if that fixes it (instead of the current bodge of hard-coding
some manually extracted hex values into the database).
2022-06-05 01:49:11 +08:00
bunnie
272abfd157 cleanup pass on spew and warnings 2022-06-04 00:56:47 +08:00
bunnie
b2b4529c40 quiet down debug spew 2022-06-04 00:35:45 +08:00
bunnie
454ebd0b52 inital USB integration to stack 2022-06-03 01:08:08 +08:00
bunnie
5812cef8f3 add standard features to the config & fixup code paths that broke 2022-06-01 14:15:49 +08:00
bunnie
d995912a97 fix remaining crypto tests 2022-06-01 04:14:57 +08:00
bunnie
3647c38cb0 fix ecdh tests 2022-06-01 03:41:58 +08:00
bunnie
01a10ee709 fix tests so that they are runnable 2022-06-01 03:11:26 +08:00
bunnie
5a118972e4 adapt the PersistentStore object to use the PDDB 2022-06-01 00:19:04 +08:00
bunnie
376d7a713b Merge branch 'main' into u2f 2022-05-31 14:39:08 +08:00
bunnie
9d73b4732d stash to look at #171 2022-05-31 14:16:09 +08:00
Sean Cross
3ae9d8abf0 apps/services: remove xous::xous_main macro usage
This macro will be removed, since it is no longer necessary. Remove this
macro across the project and replace it with a standard `main()`
function.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-31 13:33:30 +08:00
bunnie
6f84c76b9c fixup AES key references
the implementation uses an explicitly expanded key schedule for
every AES key, with separate enc/dec keys. This does save setting
up the key scheduler every time, but, it also breaks a lot of API
assumptions. Since we have the performance to afford the key
setup/teardown for every call, this commit basically turns
the key refs into actual slices of the key itself. This creates
a weird bit of code where you have an enc key being equated to
a dec key directly; those lines are left in to make it a bit easier
to diff against the original source.

But the high bit is that the original implementation, by expanding
the key scheduler, had to have a different enc and dec key schedule
(even tho they come from the same key) but this compacted form
makes them identical.

This commit also starts working in at converting the PersistentStore
to use the PDDB.

I think I basically understand the scope of the problem, and it's
mostly just some grunt recoding of the PersistentStore calls
to refer to PDDB entries by k/v names. The main thing I've done
so far is to recode the macro that creates the partitions in
OpenSK to just create string names for every item that needs
to be stored. These string names will be used to index into a dictionary
that is dedicated to the FIDO2 function.
2022-05-31 02:24:59 +08:00
bunnie
dd9aa25516 remove unused trait 2022-05-31 02:24:35 +08:00
bunnie
d4244b28af remove custom aes256 implementation 2022-05-31 00:41:13 +08:00
bunnie
a407f7e80d remove now-defunct custom elliptic curve implementation 2022-05-31 00:35:01 +08:00
bunnie
22181422b2 add ecdsa port first cut
this one is very iffy, but once we can run tests it should
chase out all the questions about which APIs go where.
2022-05-31 00:33:11 +08:00