Commit graph

112 commits

Author SHA1 Message Date
bunnie
ad22618c8d add some debug around deserialization errors 2022-06-23 04:17:37 +08:00
bunnie
8c986035b8 add trailing newline to serializations
the final entry can accrue cruft after it if there is no newline
2022-06-23 04:11:58 +08:00
bunnie
57f9e1a5f9 fix font setting 2022-06-23 03:01:44 +08:00
bunnie
304c865bb3 fix count on password access; make USB HID selected when vault is active 2022-06-23 02:27:05 +08:00
bunnie
09046854db add password edit/delete functions 2022-06-23 01:32:06 +08:00
bunnie
9671ef65f5 add password deserialization framework and UX routines 2022-06-22 21:20:19 +08:00
bunnie
f7f2868802 refactor to put blocking modals into its own thread
UX interaction via blocking modals are put into its own thread
so that the background UX can update while menus and modals are
popped up.

Still some bugs to work out to make this fully implemented,
but this is the major work fleshed out.
2022-06-22 04:52:40 +08:00
bunnie
ad92cbe1cb add customized menu contexts per sub-app 2022-06-21 02:41:03 +08:00
bunnie
8d4cdb3284 fix indexing bugs 2022-06-21 01:14:37 +08:00
bunnie
82e9c57ed4 add dirty rectangle flags to improve drawing performance 2022-06-20 22:20:28 +08:00
bunnie
b310967cf2 strip out excess redraws 2022-06-20 03:09:24 +08:00
bunnie
5a72076768 add dynamic search as text is typed 2022-06-19 19:04:25 +08:00
bunnie
72e6be8679 add some initial selectable list framework 2022-06-19 17:33:26 +08:00
bunnie
b945a085b0 more prototyping of the list browser UI 2022-06-19 03:17:12 +08:00
bunnie
b7453b627e add API tokens to prediction API
The prediction API now takes an API token. This is a 128-bit
number that gets passed to the prediction engine, and it's meant
to be unique for every context that requires a predictor.

It's up to the prediction engine to do anything with the token.
For the "null" engines (such as the icontray for `vault` and
`tts`) the token is just ignored. But for example, in `shellchat`,
the API token is used to store a history record in a HashMap on
a per-token basis. This means that every app that uses the
`shellchat` history function gets their own history that can only
be read out by that app.

The actual token itself is mostly passed through the API. The
token storage is in the Context layer (each Context has a record
for a token, that starts as `None`), and is passed down to
the predictor every time the context swaps, and the predictor
receives the token and passes it back if the token was `Some`,
or allocates a new random token if it was `None`.

Note that everything is a Context, including, for example, menus and
modal dialog boxes, but not all contexts have predictors. Only
Contexts that ask for a predictor have them. This mechanism
works smoothly in this model (as opposed to other hacks and work-arounds
previously tried getting to this solution).
2022-06-19 01:01:25 +08:00
bunnie
d874e50030 stash the latest changes 2022-06-18 13:59:26 +08:00
bunnie
c46579117b add the "trusted init" check to hosted mode
need to debug a problem with the IMEF connecting/disconnecting
causing trusted init to fail when there is more than one
plugin in the system.
2022-06-18 01:30:49 +08:00
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