Commit graph

349 commits

Author SHA1 Message Date
bunnie
fda782663a bump version pins for xous change 2023-12-26 00:13:10 +08:00
bunnie
fa3f349a0a bump pins as xous-rs has changed 2023-12-01 21:20:01 +08:00
bunnie
367ede62b1 convert usbd-human-interface-device to xous-usb-hid 2023-11-16 17:27:00 +08:00
bunnie
4d949d153b Add option to generat number-only passwords (#446)
This commit adds explicit selection knobs for all possible
types of characters and symbols.

A side effect is there is also now an error loop to handle the
case that none of the knobs are selected. The user cannot
proceed with generation until at least one type is selected.

When no alphabetic characters are selected, "exclude similar" is
now false, which allows all of the numbers to be picked from.
Normally, 1, 0, etc. are avoided to make it easier for humans
to read/copy the passwords without ambiguity. This does reduce
the total entropy slightly, but ideally you are using the
password generator with a long setting (20 or so characters)
so you're well beyond the worry of losing entropy due to dropping
the few similar characters.
2023-11-15 19:14:08 +08:00
bunnie
419e547641 bump usbd-hid-device crate to latest
API changes to see if we want to absorb this prior to forking.
2023-11-12 00:02:07 +08:00
bunnie
6ab88117f6 bump xous-api-log version & fix version pins 2023-10-31 20:07:28 +08:00
bunnie
d63b5912b1 absorb new xous-rs version 2023-10-10 16:50:00 +08:00
bunnie
83256257e1 bump xous-rs crate to absorb Send derives on Messages
this is necessary for the smoltcp port
2023-10-03 20:54:14 +08:00
bunnie
000d6606ce helps to actually have the line uncommented for the fix to work... 2023-09-19 01:59:38 +08:00
bunnie
43b0beecd4 add work-around to keep ct_eq from being optimized out
See #416 for details
2023-09-19 00:58:50 +08:00
bunnie
bdf70ab0e4 refactor API to upgrade subtle API in attempt to fix ct_eq problem
this didn't work, but, it's probably worth leaving the change in
place because this might fix other stuff we don't know about.
2023-09-18 23:55:33 +08:00
bunnie
478a612c02 commit version bump 2023-09-12 16:25:10 +08:00
bunnie
a40663bd63 refresh item cache after leaving host readout mode 2023-08-14 14:21:53 +08:00
bunnie
53469a68d0 publish package updates, sync to release tag 2023-08-08 14:35:49 +08:00
bunnie
93a2dc0515 add option to type usernames as well as passwords
passwords is the "quick default", you have to pop down by
one on the menu to type a username.

This should address #401.
2023-08-08 01:19:51 +08:00
spoelstraethan
338cbea495
Add backup tips and caveats 2023-08-06 22:51:11 -05:00
bunnie
b127cd093f bump version pins for change to xous-rs 2023-08-03 13:29:39 +08:00
bunnie
51278451a0 update version pins to pull in cramium target 2023-07-19 21:07:56 +08:00
bunnie
9932d971c4 clean up the warnings that are deemed safe to clean up
one warning remains, will address this in a future PR.
2023-07-16 17:55:28 +08:00
bunnie
cae402fad0 fix case where an idle font selection menu can crash the system while in TOTP mode
when the font menu is raised while in TOTP mode, the "pump"
thread continues to prompt for redraws, which can eventually lead to
an overflow of the server queue on the main thread that leads to
deadlock and eventually a crash.

This patch does two things:

- splits the allow_host variable and the allow_totp_rendering variable
so that the two flags have distinct meanings

- use the allow_totp_rendering variable to control when the
totp thread is allowed to pump the main thread to animate the
timer bar.

Previously the allow_host variable was introduced to control access
to sensitive data, and it incidentally was also used to control
TOTP rendering because when host readout is activated this can
freeze the UI for extended periods of time.

By splitting the flag we can now control both independently of
each other. Rendering still stops when host readout is enabled,
but it also stops when any other blocking dialog boxes are popped up,
hopefully preventing future crashes if a user is distracted in
the middle of a UX flow that can block the main loop.
2023-07-06 16:36:10 +08:00
bunnie
2f54ae39d4 Merge branch 'fonts' into main 2023-07-05 13:47:26 +08:00
bunnie
dfffa48715 move default system font to gam/src/lib.rs SYSTEM_STYLE
default system font can be statically changed by modifying
the SYSTEM_STYLE constant.

This of course will lead to a request for a dynamically
configurable preference for font size. However, early
on it was decided this is a bad idea. Here's why.

We don't provide for dynamic system-wide font selection
because this adds a lot of complexity to what would otherwise
be static code: this is a deliberate choice to improve code
density and performance. If the system font were dynamically
adjustable, then every character rendered we would potentially
have to query the PDDB for the current system font setting.

The impact of this could be mitigated by caching values but
then what happens when you actually change the font? now
you need a registry to fire messages off to all dependent
crates with cached values to flush their caches and redraw
(or you punt and force a reboot if you change font sizes,
but still, you're creating a dependency on a lot of plumbing
for even the simplest crates).

Plus, with a static font selection, the compiler can take constants
like the font height and compose them with other fitting
parameters into optimized load/stores of borders and spacings
for the static case; if you make it dynamic, all those multiplies,
adds and divides now get pulled into the main rendering loop
and are recomputed all the time. For example, if you have a static
const list of items that need to be rendered, even if the code to
compute the height of the list is written as a for loop, the compiler
will know the list is constant, and the font height is constant,
and it can condense that all into a single number at compile time,
eliminating all the code for the for loop.

If you leave the option open to change that, that entire piece
of code has to be generated and executed even though in practice
nobody changes the parameter.
2023-07-05 13:39:11 +08:00
bunnie
4ac979f0ab update pins, again 2023-07-04 11:20:12 +08:00
bunnie
c9f8f2681b update version pins 2023-07-04 11:09:13 +08:00
bunnie
952ba18fba commit vesrion pin bumps 2023-06-16 01:30:18 +08:00
Jean-Pierre De Jesus DIAZ
2af737b57e
xous-rs: move LANG variable to locales
This change is made with the intention of making the xous-rs crate a bit
more freestanding without depending on the xtask build system.

Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2023-06-15 18:23:12 +02:00
bunnie
08aac2c285 limit loading screen to password transitions
it interferes with the ctap2 tests
2023-06-07 01:41:14 +08:00
bunnie
5f5d926462 comment out the filter performance profiling
it's fast enough now that probably the performance profiling
accounts for a non-trivial portion of the runtime
2023-06-06 20:13:45 +08:00
bunnie
93d07e3cb8 cleanup debug crumbs 2023-06-06 20:07:47 +08:00
bunnie
63299c7ca6 bump release notes and comments 2023-06-06 19:52:45 +08:00
bunnie
6bb5569c9f add a screen to indicate when databases are reloading
since the operation can take quite a while
2023-06-06 19:31:26 +08:00
bunnie
567d9db2cd optimize the ui cache routines
rely more on the cache retaining consistency with the disk
versus always reloading from the disk to speed up performance.

might be useful to make a routine that can also check coherency
periodically, because with the new format the cache could
co-exist along side the database for a very long time without
any checking.
2023-06-06 19:17:24 +08:00
bunnie
4c180810a5 fixup sorting so that it only goes by lowercase values 2023-06-06 16:54:08 +08:00
bunnie
bd5b482cb0 rework list filtering to use an unsorted vec instead of btreemap
also eliminates references, copying and locking of items in the
sorted btreemap.

turns out that ... sorting is much cheaper than copying or maintaining
references, because copies to heap items require allocs which are
under the hoood several sorts to find the place to stick the alloc
memory, and shared references require locks.
2023-06-06 15:33:55 +08:00
bunnie
fa436c0845 fix bugs so that the implementation is working
as suspected, the shared lock is killer on performance.
2023-06-05 22:50:59 +08:00
bunnie
9bb3ac0db7 first stab at refactoring filter to be faster 2023-06-05 04:57:26 +08:00
bunnie
fbe3cb2a3d bump package numbers to absorb PR #388 2023-05-28 15:58:11 +08:00
bunnie
5a2df4432c technical debt: cleanup UTRA package
- make the "base" field no longer public. It is accessible, but only
through an `unsafe` method, because, it is unsafe.
- add accessors to offest/mask fields. Because, it's not at all
unsafe to access these, and it can be useful for bit-ops that are
not part of the generic set of UTRA.
- add Arc to AtomicCSR, and require `std` for AtomicCSR types.
This should not break anything, I checked inside @foundation-devices
keyOS and they don't seem to be using AtomicCSR anywhere.

The Arc makes it a bit safer to clone the AtomicCSR base pointer
and share it between threads, but it will have an impact on performance.
The USB stack (which requires AtomicCSR) was regression testing and the
impact seems minimal.

Recall that the main purpose of AtomicCSR is to provide a CSR accessor
that does not require a mutable reference to the base object. This
can make certain Rust idioms a bit cleaner. We wrap the base accessor
in Arc+Atomic to try and improve the safety of throwing the borrow
checker under the bus, but it's still not perfect because hardware
mutable state can have side-effects within hardware itself that cannot
be modeled or checked by Rust's borrow checker.
2023-05-23 18:11:24 +08:00
bunnie
08602773b9 tweak the test case generator for vault 2023-05-23 02:13:33 +08:00
bunnie
99f9278568 cleanup bitrot in testing routines 2023-05-23 00:14:35 +08:00
bunnie
6e16ef163f WIP #325
This hopefully resolves #325 but I'm unable to test it because
the U2F demo site I use for testing seems to have been disabled.
2023-05-22 18:36:22 +08:00
bunnie
2aa51736f5 fix #353 and possibly also #333
this adds a configurable autotype delay, and also adds a
left-handed mode option to the `vault` ui.

more testing is needed for #333, I think.
2023-05-22 17:22:17 +08:00
bunnie
6ec99fa7da add multi-line text editing support to TextEntry, and insertion points
TextEntry boxes can now specify "growable" as an option; if this
is set true, then, the fields within are considered to be multi-line
fields that can grow to fill the screen (even pushing lower ui
elements off the screen...); however a text line is limited to
256 characters so generally the overflow issue is hopefully rare-ish.

Left/right arrow keys conjure up an insertion point to allow for
deleting and inserting text in the middle of a field.

The main quirk is that if you enter text that causes a field to grow in
size, the overall dialog box can't grow any larger, so the text simply
overflows into the UI element above the current line, without limit.

Need to check for interactions with other elements that should
not be affected but it passes some simple test cases in `vault`.
2023-05-17 23:27:07 +08:00
bunnie
d6a87666ab add bip39 password entry prompt 2023-05-17 04:12:25 +08:00
bunnie
f93d9de3f1 add BIP-39 entry for passwords in vault
If the "notes" field starts with the characters
"bip39" (case insensitive), then, the password field is
interpreted as a hexadecimal encoding of BIP39 entropy.

To create a BIP-39 entry, leave the password field blank,
and then start the Notes field with the characters 'bip39',
and this will trigger a dialog box that will only allow
valid bip39 entry and check the checksum etc.

To view the BIP-39, after opening up the entry for "edit",
close it, and it will pop up a second dialog box that interprets
the hex data as BIP-39 words.

You could also in theory enter the hex digits yourself into
the password field, if you're masochist.
2023-05-17 03:53:55 +08:00
bunnie
697d44de3d bump version pins to absorb changes to svd2utra etc. 2023-05-03 23:11:12 +08:00
bunnie
7513f237e4 cleanup rev/revision manifest error 2023-05-03 22:53:54 +08:00
Jean-Pierre De Jesus DIAZ
3e2eb63663
imports: remove com_rs-ref
The crate just re-exports the com_rs crate. This patch changes usages of
com_rs-ref to use com_rs directly.

Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2023-05-02 14:33:17 +02:00
bunnie
8a574f937f bump for xous-rs version pin update 2023-04-27 22:18:30 +08:00
bunnie
1392fdcf33 bump pins for updated log API 2023-04-16 02:27:37 +08:00