Commit graph

27 commits

Author SHA1 Message Date
bunnie
4d118e72b8 fix 355
The resolution is to close the previously open basis if one with
the smae name is opened. This is in part because there isn't
a universally sensible/deterministic way of resolving behavior
in this case, and partially because the structure of the basis
map is a hash map keyed by name ... to differentiate basis with
same name/different password would require...leaking some information
about the password? i guess we could go strictly by opening order
by adding an opening parameter but basis management is already
confusing enough.

A message is popped up to indicate when the previous basis is
being unmounted.
2023-04-07 14:51:37 +08:00
bunnie
de231cae54 explain to users that they will need to create a PIN code for logins
Users are confused when they are prompted to enter a PIN code for
the first time with no preparation. Update the format request message
to prime users for the task.
2023-01-05 16:42:12 +08:00
bunnie
7eecf2b1ce remove the initial wait from PDDB; move the pop-up modal location
The initial wait message is now rendered by the first app
that owns the screen (currently shellchat).

The location where the pop-up modal is rendered is also now bracketed
directly around the mount call to avoid interference with other
edge cases that may pop up modals.
2022-11-06 03:07:35 +08:00
Tom Marble
006a69105c
Completes the i18n_helper.py tool
Added 'fr' translation
Added *.json to .gitattributes

Signed-off-by: Tom Marble <tmarble@info9.net>
2022-10-27 16:07:05 -05:00
bunnie
de41e5ecff rework password login to have a count and reboot/suspend after N retries
The implementation is a bit clumsy because the original
premise of the login loop is that it should be infalliable, and
because of the isolation of the password mechanism there isn't
a great way to pass number of failures back and forth across
that firewall (and I don't think there should be).

The application calling the password routine tracks failures
but the mounting routine has to kick that up to the main loop.
However, the PDDB main loop can't get stuck on the mount attempt
if you want to suspend, because it has to respond to the suspend
request.

So the failure message has to get kicked all the way back to the
status thread, which is what kicks off the mount, and then handled
there.
2022-10-17 02:40:51 +08:00
bunnie
2ff9163789 add checksums to PDDB backup
every 1MiB block is checksummed with a sha512/256 truncated to
128 bits. This is used to confirm the media and transport integrity
only. It is not intended to be a cryptographic check, it just confirms
that the backup data was transferred correctly assuming no intentionally
malicious actors in the middle.
2022-10-09 01:10:42 +08:00
bunnie
4ae3308fbe add PIN change to the PDDB 2022-08-12 23:10:18 +08:00
bunnie
e40a109f6c add UX flow dedicated to the 'churn' operation 2022-07-19 16:57:47 +08:00
bunnie
0a4702d6c3 clean up dialog messages to conform to the latest lexicon 2022-07-19 16:30:00 +08:00
bunnie
e8188309cf add rekey operation for PDDB migrations to new devices 2022-07-19 03:16:37 +08:00
bunnie
8c5a475f49 some whitespace auto-changes 2022-07-03 01:13:31 +08:00
bunnie
95055c30d7 add some whitespace formatting to improve readability of basis listing 2022-07-03 00:43:27 +08:00
bunnie
5008c7afac first draft of all basis unlock
This has worked in testing, but:

- There seems to be a new error unrelated to this with allocating
very large blocks of memory, which needs to be traced down.
- Because this operation will typically fully block the caller,
UX redraws can't happen (unless the caller has a fully multithreaded
redraw routine). This needs some thought because:

1. If you have several basis you're trying to unlock, eventually,
you'll overflow the application incoming queue with redraw requests,
and the system will crash.

2. It's cosmetically disturbing to have the dialog boxes piling up
on top of each other during a critical operation like this.

I *think* the right thing to do is to refactor the GAM a bit
to handle pop-up modals that block a bit more gracefully. But
I think it's more urgent to trace down the problem with large blocks
of memory being allocated, since it is a functional issue and not
a cosmetic one.
2022-07-01 17:09:51 +08:00
bunnie
6ac4ef292b add basis mount/unmount to pddb shell commands, fix some UX formatting 2022-04-07 15:32:47 +08:00
bunnie
21ad8d9283 change en-audio to en-tts 2022-03-10 15:38:55 +08:00
bunnie
5c91645ede Merge branch 'i18n-jp' into bunnie-dev 2022-02-01 01:04:43 +08:00
Jeanie
58e8120526 ja translations added 2022-01-30 19:23:49 +09:00
bunnie
177ad38db2 derive SSID scan on shellchat from the connection manager
The connection manager keeps track of all our SSIDs, not the COM.
2022-01-30 16:53:15 +08:00
bunnie
2642e6c075 various UX fixes that take advantage of the new font rendering engine 2022-01-22 00:10:31 +08:00
bunnie
2c711036a9 add a submenu for PDDB operations 2022-01-17 01:59:38 +08:00
bunnie
b7b0bdc852 convert menu infrastructure to the "menumatic" API call
hopefully this makes menus a bit easier
2022-01-16 17:30:32 +08:00
bunnie
c046422746 tighten up the on-boarding password flow
- check the password with a double-entry on the first boot
- if we see a blank disk, bypass the usual checks and allow the mount
to fail, then, enter the setup routine.
2022-01-06 22:13:00 +08:00
bunnie
489a26dd11 fix an issue where we don't decrement the connection counter on drop 2022-01-05 20:01:54 +08:00
bunnie
8b37303b06 add a check on correct password entry
The rootkey enclave actually doesn't check if your password is
correct -- it has no way of knowing because it doesn't know how
the keys will be used. Password checking is delegated to the
requesting process because also the password retry method and
policy depends upon the application, and is a significant amount
of UX plumbing (in fact the rootkeys should have less UX plumbing
than it has right now - this is something to do in the near future).

Add a mechanism in the PDDB to check if a password was entered
correctly, and retry if it isn't. Without this, an incorrect
password would actually trigger a reformat of the PDDB, since
it can't find the system basis structure with a bad password.
2022-01-05 11:17:13 +08:00
bunnie
c6bba1b13e increase PDDB size to the full disk size; test on real hardware
takes about 15 minutes to fully initialize a 100MiB PDDB.

time is dominated by the sector erase time (which is fundamental
to the device) and data write rate (also fundamental to the device).
2022-01-04 21:59:26 +08:00
bunnie
0844b3e961 add formatting check and UX flow for formatting; redo salt (again)
probably should have split this into two commits. oh well.

first part introduces a check to see if root keys are initialized,
and if so, tries to mount the PDDB. If it can't mount, it asks
the user if they want to format it. It also updates the progress
of the fromatting.

the second part redoes the salt once again. After some discussion
SHA512/256 is also resistant to length extension attacsk so we
don't need to use the HMAC technique suggested. Would prefer to
reduce the number of algos to analyze, so we're going to a simple
SHA512/256 hash of the salt/basis name/plaintext password to generate
the salt that goes into the bcrypt routine that ultimately generates
the final key used by the system.
2022-01-03 16:51:51 +08:00
bunnie
de4e84abf5 starting in on the larger system integration of the PDDB
Trying to find a new approach to making dialog boxes that
are cleaner and don't require as much code repetition. Probably
about to go on a long tangent.
2021-12-13 14:24:14 +08:00