Commit graph

3570 commits

Author SHA1 Message Date
bunnie
b9e1e69adb update a commment so we know not to change a particular constant 2022-06-25 00:21:46 +08:00
bunnie
c1c0729f39 add some indicator if keyboard LEDs were set by host 2022-06-24 18:58:27 +08:00
bunnie
7deb6fd4a1 add notes about how to clear test entries 2022-06-24 18:58:07 +08:00
bunnie
4771f04451 update progress while making test entries 2022-06-24 18:57:44 +08:00
bunnie
c6aecc08dc fix bug where entries don't redraw scrolling up/down to new page 2022-06-24 18:57:24 +08:00
bunnie
3c82898780 fix some minor bugs
- test entries for passwords at 100 entries. it's...pretty slow
at 300 passwords, about 8 seconds to scan/read-in the database.
once the database is read-in, sorting and viewing is fast. good
news is that heap usage is about 300k for that many entries,
no OOM crashes found. just slow.

- fix an unimplemented()! error

- strip out some debug
2022-06-24 17:23:00 +08:00
bunnie
847e64c46a add totp record add/edit rough draft UX flows 2022-06-24 15:53:57 +08:00
bunnie
024b9d9ce1 make it so that attempts to list empty dictionaries don't fail
this might point at a larger error of empty dictionaries not
being recorded, but this is a work-around for now...?
2022-06-24 15:53:23 +08:00
bunnie
9a5c04cc73 add a time progress bar in TOTP mode 2022-06-24 03:40:21 +08:00
bunnie
7765f3dec3 add other hash support; notch back the hmac dependencies
our engine is a version older in API rev, so notch back the
dependencies so we're all at the same rev
2022-06-24 01:46:09 +08:00
bunnie
5d8b85c0bf totp demo working 2022-06-24 01:18:37 +08:00
bunnie
57845b6fb6 clean up warnings in ctap 2022-06-24 01:18:32 +08:00
bunnie
729a6ad186 add the beginning of the TOTP functions 2022-06-24 00:31:25 +08:00
bunnie
ce461a06fe add routines to populate test entries, and use less synthetic data 2022-06-24 00:30:45 +08:00
bunnie
e998e96323 change visibility of some routines so we can access storage in the UX 2022-06-24 00:30:29 +08:00
bunnie
512f435b2a move the FIDO random secret into the FIDO_DICT
originally we stuck it in the CRED_DICT because it forces its
creation -- but there's no reason to *really* do that. We just
set the dictionary to be created if it's not existent in the later
API calls.

By moving this to FIDO_DICT instead of FIDO_CRED_DICT it makes
key access & sorting much cleaner in the UX, because you don't
have this odd key hanging out, and it also means that you can't
have an attack on the system where you try to name a key with
the name held in FIDO_CRED_DICT to try and read it out.
2022-06-24 00:28:58 +08:00
bunnie
5e08941950 change display order for passwords
sort by description not username
2022-06-23 04:22:11 +08:00
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
e6e44d3dfb add an ensure usb connection
ensure connection will not reset the core if it's already connected,
unlike the switch version which always resets the core even if it is
connected.
2022-06-23 02:26:12 +08:00
bunnie
e2f335ec3a make missed input forwarding non-fatal 2022-06-23 02:26:02 +08:00
bunnie
09046854db add password edit/delete functions 2022-06-23 01:32:06 +08:00
bunnie
0624dee629 fix default entry population on multiple fields 2022-06-23 01:27:24 +08:00
bunnie
44b15c7262 modify text entry behavior to recover default
if the field is empty and you're not in password mode,
pressing left or right will populate the autocomplete field
2022-06-22 21:41:07 +08:00
bunnie
64a2c2d6ff bump cargo.lock 2022-06-22 21:20:50 +08:00
bunnie
9671ef65f5 add password deserialization framework and UX routines 2022-06-22 21:20:19 +08:00
bunnie
7e65f3db66 add a breadcrumb 2022-06-22 18:16:28 +08:00
bunnie
5e450235e3 improve debug output for raise/lower; add a nonblocking relinquish 2022-06-22 18:14:00 +08:00
bunnie
ebd636d324 improve debug output on modals 2022-06-22 18:13:29 +08:00
bunnie
e33c7b9ecc add raise/lower debug info 2022-06-22 18:12:04 +08:00
bunnie
f041dfb9b4 fix warning message on nonblocking redraw 2022-06-22 18:11:23 +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
b777714435 modify textentry behavior: default text changes
at the moment, default text will always come back if you
remove the text so there is no text in the field (for example,
you start typing, and then you decide you want to start over,
the suggested text re-appears).

this change makes it so that once you start typing, the suggested
text does not return. Furthermore, it counts the initial backspace
as a key that's hit, so you can clear the suggested text by just
hitting backspace.
2022-06-22 04:42:05 +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
91530a16e7 Merge branch 'main' into vault 2022-06-20 14:16:33 +08:00
bunnie
8bf36f98a4 partial progress on #168
at least we're off a fork and back onto the main repo.
2022-06-20 14:15:53 +08:00
bunnie
8544961cb1 fix backspace during dynamic list updates 2022-06-20 04:10:34 +08:00
bunnie
b310967cf2 strip out excess redraws 2022-06-20 03:09:24 +08:00
bunnie
5f4678ca6a fix concurrency issue in predictor/redraw loop
So there's a bit of a nasty bug that arises from the GAM
both handling drawing primitives and context swaps.

In particular, because the GAM handles both of these in a
single thread, context swaps can't block, because the redraws
triggered by the context swap would be blocked, causing a deadlock.

When the API token for the predictor was introduced, this added
a blocking operation inside the context swap. This would cause
a deadlock under certain conditions.

This patch refactors the API token so that it's not a return
result of swapping the predictors. Instead, the predictors
return the API token as a non-blocking message to the GAM. This
API token is correlated with the *GAM* token (not the app token).
Present me thanks past me for adding the GAM token, which was
as of yet unused, but now, there is a very sensible role for it--
exactly what it was made for, e.g. handling GAM-local API calls
without disclosing the application token.

Anyways, hopefully this patch puts the race condition to
rest, while allowing us to have per-context prediction histories.
2022-06-20 03:05:16 +08:00
bunnie
78ea80f809 remove main() thread-wrapping for non-ditherpunk configs
saves a bit of memory
2022-06-19 21:39:29 +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
2d40c3f1dc fix xtask rebuild issue
the inclusion of a custom rustflags in the .cargo/config
causes rust-analyzer in vscode to always trigger a rebuild of
xtask.

add a custom "check" directory for vscode. This grows the
size of the target directory :( but at least we're not
constantly rebuilding xtask.
2022-06-19 02:53:37 +08:00
bunnie
6c28ee9642 strip some debug messages 2022-06-19 02:04:08 +08:00
bunnie
9acab60018 strip out some debug statements 2022-06-19 01:56:58 +08:00