Commit graph

148 commits

Author SHA1 Message Date
bunnie
761cffc35e strip some debug spew 2022-07-05 03:00:31 +08:00
bunnie
ae717f78af add code to make the ball app full-screen redraw affirmative on context switch
otherwise, you'll get some stale artifacts because the ball app
relies on the prior state of the screen for clean rendering
2022-07-05 02:35:38 +08:00
bunnie
62372488df fix removing keys from FIDO2
I had put the fallback operation in the wrong arm of the match branch
2022-06-28 19:59:27 +08:00
bunnie
943e45f17e remove suspend/resume awareness from app
In retrospect forcing apps to manage their suspend in resume
crosses too many abstraction barriers.

Instead, the app should specify the mode of the hardware, but
then the driver should be responsible for restoring that state
on resume, not the app.
2022-06-28 01:18:26 +08:00
bunnie
3e70dea0f8 start to lay in suspend/resume automation for vault
it doesn't work yet -- but we need to get a push into CI for
other testing now.
2022-06-27 16:03:11 +08:00
bunnie
99f58db8e9 add note about performance regression 2022-06-27 15:25:58 +08:00
bunnie
6f849af2a2 fix busy-wait in prereqs ntp updater 2022-06-27 15:13:58 +08:00
bunnie
ed4f7b2092 restrict debug access when running vault app
this removes the security message about the debug core
being unlocked
2022-06-27 02:33:23 +08:00
bunnie
0e5fb14894 add a compatibility gate on USB HID interface
If the SoC isn't compatible, don't try starting the U2F server.
2022-06-27 02:00:22 +08:00
bunnie
9cf48fcaa5 add storage limits on FIDO cred count
perfomance regression on the PDDB with the latest fixes make
the device stop passing compliance when the database grows
to about 40-ish keys. For now, we set the cred limit to 32,
until the performance issues are addressed. (note that yubico
has a limit of 25 credentials, so, 32 is not insanely low).
2022-06-27 00:04:46 +08:00
bunnie
79c20eb498 fix in-place edit of keys
The behavior with a secret basis is as follows:

- The key stays in the basis in which it was created.
- So, if you created k1 in .System basis, and k2 in Secret basis,
  if you edit k1 while Secret basis is open, k1 stays in .System
  basis. it does *not* migrate into Secret basis.

I think this is the "least surprising" behavior. There is an
argument that "maybe I want to keep secret notes in an overlay
on a key" but I feel like creating a second shadow copy of a key
with a different set of notes is not the most desired behavior
for this application (NB: it could be desired for others applications,
and that behavior can be programmed with the PDDB API; which is
why the API is a bit explicit at the moment. This flexibility goes
against the goal of "foolproof deniability", unfortunately, but
I think it is too early to know which default to set for the system).
2022-06-26 17:37:57 +08:00
bunnie
42b84ad890 adjust some of the default basis references in OpenSK storage implementation
These adjustments ideally make the system less confusing to use in
the face of secret Bases, but the spec calls for some information that
could be a leakage channel (see below).

- items that are assumed to be consistent regardless of the basis
are now forced into the System basis. This reduces potentially confusing
behavior if the system has han unlocked secret basis and things like
PIN hashes are set which appear to be global.

- There is a "global signature counter" which could leak some information
about how many credentials are in the device. However, the FIDO2 spec
enforces some plausible deniability by requiring that the counter increments
by a random value instead of by 1. In the OpenSK implementation, this increments
by a random integer from 1-8. So, if you store dozens of credentials in secret
bases, it may become less deniable due to this global signature counter.

The global signature counter seems optional, so maybe that is a feature to
be stripped out...
2022-06-26 14:25:54 +08:00
bunnie
a4c6b65b11 Merge branch 'main' of github.com:betrusted-io/xous-core into main 2022-06-26 04:06:40 +08:00
bunnie
9f409fda2d fix basis search order issues
at least, it passes some simple tests. much more testing is needed.
2022-06-26 03:52:27 +08:00
bunnie
e62c9bf3d3 add basis management functions and debug some basis issues
there's some problems with the automatic basis unionization
feature. now debugging...
2022-06-26 02:11:13 +08:00
bunnie
475fadb255 make search strings persist between modes and menus 2022-06-26 02:10:50 +08:00
bunnie
819b84954a add autotype to TOTP. why not? 2022-06-25 23:02:12 +08:00
bunnie
6aadbf3cae fix error message on edit of FIDO2 entry 2022-06-25 23:02:01 +08:00
bunnie
4319ac4f45
now changes when time is set
fix logic
2022-06-25 09:01:02 +08:00
bunnie
68db7e8c7a reduce noise from the prereqs debug loop 2022-06-25 00:23:46 +08:00
bunnie
22702cc03b add a prereqs checkpoint
this checks to make sure that the system is in a usable state
for the vault to run before allowing it to be launched.
in particular, the PDDB must be initialized, and so must the
system time.
2022-06-25 00:22:09 +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
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