Commit graph

329 commits

Author SHA1 Message Date
bunnie
ed8e73764a add Cargo.lock 2022-04-24 21:41:18 +08:00
bunnie
6a4d79dfe1 update Cargo.lock to reflect the latest PR 2022-04-21 02:43:54 +08:00
bunnie
7553053f29 v0.0.2.1 initial implementation - still needs migration code
Previous version was v0.0.1.1
New version is v0.0.2.1 (don't ask me why I skipped v0.0.2.0)

The most significant change is that the key derivation for the basis
is now split into two keys. One key is used for the page table ECB
encoding, and a different key is used for the data AES-GCM-SIV encoding.

This is because someone much smarter than me looked at my scheme
and said it is very dangerous to use the same key for two different
types of ciphers. This person is correct, so it had to be rectified.

For the System Basis, the keys are encrypted using the root keys
wrapper API. In this case, we simply create two random keys, one for
the page table, and one for the data region, and wrap them using
the root keys API.

For user secret Basis, the derived keys are sent through HKDF
with two different "info" strings to derive a pair of keys from
a common password.

In case the cryptographer who looked at this is reading along,
note that the basis name is encoded as a fixed-length, 0-padded
record, so, we don't encode the length of the basis in the hash
used to derive the keys. When I explained the scheme I thought
I was using a variable-length basis name to derive the key, but
when I checked the code, it's always 64 bytes long, and bytes
that are not used are 0-padded, so, I think we don't need the
length encoding field.
2022-04-18 15:59:15 +08:00
bunnie
cd8c762c55 patch up QR code PR, change method signature as discussed
now any modal notification can also render as a QR code
2022-04-08 15:19:56 +08:00
bunnie
5b8e53aacb remove "log" feature from NTP crate, trims off some executable size 2022-04-05 13:32:23 +08:00
bunnie
532c4a4f1f add NTP to time setting via SNTP library 2022-04-05 04:19:53 +08:00
Sean Cross
e6209302e7 xtask: use assets api for determining URL
Now that we have full JSON parsing inside xtask, actually parse the
assets API endpoint to determine the correct URL.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-03-29 21:47:32 +08:00
Sean Cross
35857ab543 xtask: replace curl with ureq
The `ureq` package is much smaller, and may be more reliable on Linux.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-03-29 20:47:37 +08:00
bunnie
874a5ac20e bump to latest version of minifb 2022-03-28 17:48:38 +08:00
bunnie
2751aa03d3 add a localtime server plus other annotations
std::time::SystemTime returns time in UTC.

That's great, but a lot of times we want local time.

Unfortunately, we can't use `chrono` to do that, because
chrono figures out what your time zone is usind `libc`, which
is a thing Xous doesn't have.

the `LocalTime` server is Xous' solution to that problem. it
returns the corret time offset based on the time zone.

You can still use `chrono` to convert the returned time into
strings and to compute durations.
2022-03-27 04:08:36 +08:00
bunnie
cda15a1bb3 add a routine to convert hw RTC to a seconds count. 2022-03-24 18:44:06 +08:00
bunnie
2cc8a1b24a silence a warning in the loader module about an unused macro 2022-03-22 22:17:27 +08:00
Sean Cross
a70aee7bad loader: move loader into main workspace
Add the loader into the main workspace, removing it from its own
sub-workspace. We can do this now that we can specify the linker script
in `build.rs`.

This improves IDE support, and should shrink disk storage requirements.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-03-22 02:09:18 +08:00
bunnie
b4d20a643c add tts locale to hello example 2022-03-21 00:22:54 +08:00
Blake Smith
3fb30dc619 Add a basic 'hello world' app example 2022-03-18 12:43:54 -05:00
bunnie
b246a369d4 lay in another layer of tts functionality
now shellchat can talk, and password entries are a thing.

next up: debug oom issues in STT when we start doing really big
strings.
2022-03-11 02:37:48 +08:00
bunnie
e8b13fcb44 integrate TTS into more dialog boxes and modals
also tighten up the `blocking` method for TTS for prompts that
absolutely should not be truncated or overriden.
2022-03-10 23:40:35 +08:00
bunnie
ac059eae48 retrofit more tts in various corner cases 2022-03-10 18:05:33 +08:00
bunnie
dc2c393c5c update scripts to accept a locale argument 2022-03-10 16:22:48 +08:00
bunnie
80a835ba83 fix up warnings and latest cargo.toml 2022-03-10 15:33:14 +08:00
bunnie
446317bdd4 add speech rate library call and default setting
350 wpm was the requested default!
2022-03-09 03:48:12 +08:00
bunnie
1227ee06ab final integration with on-line binary download of TTS exec 2022-03-09 00:25:30 +08:00
bunnie
9c696af96f refer tts backend to the crates.io published version 2022-03-08 19:27:09 +08:00
bunnie
c763ede830 tts integration working 2022-03-08 04:41:45 +08:00
bunnie
1d6fbbe5bb add the basic text to speech infrastructure.
also creates a method for isolating incompatibly licensed repos
2022-03-08 03:08:12 +08:00
bunnie
eb7d35e484 Merge branch 'ffi' into main
this add some routines and test stubs that are helpful for debugging
C FFI integrations. In particular it provides some harnessing that adapts
a minimal selection of libc functions by copypasta of various bsd/mit
licensed libc implementations. It also provides a cheesy malloc using
a Rust Vec...only suitable for simple, single-threaded work, but enough
to unlock a reasonable range of middleware.
2022-03-08 00:20:50 +08:00
bunnie
6fa3b5d358 bump lock file 2022-03-07 23:35:52 +08:00
bunnie
54e491840d stash to work on an aes api bug 2022-03-07 13:17:58 +08:00
bunnie
9d1aa10a50 add join command to libstd-test 2022-03-02 21:20:20 +08:00
bunnie
526bc959af add some facilities for testing net in libstd 2022-03-02 20:43:01 +08:00
bunnie
06e391e541 fix key commitment check to be constant time
thanks again to Michael Rosenberg for catching this bug and
teaching about about how to use the Subtle/.ct_eq() traits to
implement constant time equality checks.
2022-03-02 19:00:52 +08:00
bunnie
d0ecd54435 remove stray espeak artifacts from this dev branch 2022-02-27 18:20:43 +08:00
bunnie
a9a5e5c9a9 integrate app name in sec notes patch, make app name update retriggered on change 2022-02-24 19:44:24 +08:00
Sean Cross
b86f1bcf3f cargo.lock: update xous-rs and xous-ipc versions 2022-02-07 13:51:35 +08:00
bunnie
b498669003 use NIST SP800-38F (AES-KWP) to wrap the system key for the PDDB
this is instead of our lolfail ECB-based method with a check block.
2022-02-03 18:24:06 +08:00
bunnie
30910dbd4f add keyboard layout setting and retention
Keyboard setting is "the one and only" exception to user settings
that are saved without encryption. This is because you need your
keyboard layout to be set in order for you to type your password.
Thus, this needed a bit of a special-case to handle its storage record.

We decided to lop off 1 page from the loader and have it store
the keyboard layout code.

Let's hope we can have the discipline to really just store that
one word of information and not later be like "gee wally, you have
a whoooole 4092 unused bytes of space we can cram unencrypted
user settings in, sure would be a waste to not put those use those".
2022-02-03 02:46:37 +08:00
bunnie
a4752dbb59 app manifest and auto-gen infrastructure 2022-02-02 16:18:06 +08:00
bunnie
3d7ee0663c improve the link sync-up for the EC after a WF200 reset 2022-01-31 23:32:59 +08:00
bunnie
faa51908d7 maybe, just maybe...we finally have version info baked into the kernel correctly. 2022-01-31 23:02:32 +08:00
bunnie
5ef7126ede add better handling for wfx HIF err condition 2022-01-27 14:02:28 +08:00
bunnie
4c4ca1577f fix connection manager state machine
seems to work a lot better, but needs a lot more testing
2022-01-27 03:56:39 +08:00
bunnie
2909115e3d move mini-fb's home into the betrusted-io repo
this will let more people maintain it while @xobs moves to merge
his contributions into the mainline...
2022-01-25 22:51:45 +08:00
bunnie
11f726223b update to @gsora's patch to improve hosted mode performance
We run a branch of minifb because we need the `set_key_state`
function, which is not available on the main branch. This
function is necessary to extract raw scan keycodes from the
keyboard so we can respond to e.g. menu and prediction emulation
keys (Home and Fn keys). The mainline minifb crate eats all
of those key events and does not pass them on.
2022-01-25 22:36:38 +08:00
bunnie
e55154be69 add version info for ~~xous~~ to the shellchat command
this took...way too long to figure out. Latest versions
of `vergen` for whatever reason seem totally broken for
my build hosts.
2022-01-25 16:37:50 +08:00
bunnie
583c2e172b add a demo REPL app to help users get started with something more interactive 2022-01-24 19:06:58 +08:00
bunnie
6089672960 add localization to the demo app 2022-01-24 04:42:35 +08:00
bunnie
35fd307dbf major refactoring around how initializations are done for canvases
trust levels now default to a mid-level, with the password
modals explicitly tested for by the Context logic (the idea
being to deny any untrusted canvases the ability to render
inverted text).

ball bounce app also basically works, and context
switching between the bounce app and the main menu
is working too.
2022-01-24 01:58:48 +08:00
bunnie
d2a054ec33 laying in some framework for user applications
The first "app" is just going to be a whole-framebuffer
demo that gets raw keys and does some stuff on the screen.
It's the starting point if you wanted to eg. write a simple
video game or something for the device, but you didn't care
about much of the other UX sugar.
2022-01-23 15:52:17 +08:00
bunnie
2b46f21ae8 remove dependency on blitstr v1 entirely 2022-01-23 04:08:32 +08:00
bunnie
0cafd10e28 refactor status bar to take advantage of the new fonts 2022-01-22 18:25:39 +08:00