Commit graph

10340 commits

Author SHA1 Message Date
bunnie
2d0af08266 bring pddbdbg up to v2 2022-04-19 15:57:51 +08:00
bunnie
b3c89e5f09 add migration of secret basis for v1->v2; fix some interior mutability issues
Probably nobody is really using secret Bases right now, but it's
probably a good idea to lay out all the infrastructure and start
testing it for when it comes time to do it with data that really
matters.
2022-04-19 04:50:15 +08:00
bunnie
d0f632965e add the old version of pddbg for debugging v1.x databases 2022-04-19 04:49:40 +08:00
bunnie
2596a35fe0 Merge branch 'main' into bunnie-dev 2022-04-19 02:05:46 +08:00
bunnie
f4f0812fb4 refactor API to use the None encoding for 0 on NonZeroUsize MemoryMessage fields
at the suggestion of @xobs, requires a new libstd to work with this.
2022-04-19 01:32:36 +08:00
bunnie
4ba34bbd58 intermediate work on v1->v2 migration, need to set aside to fix a libstd problem 2022-04-19 00:45:10 +08:00
bunnie
c8a38b4bf5 fix representation of va in pagetable so we're not burning 12 bits on 0's
this is a v2 fix, incompatible with v1
2022-04-19 00:44:45 +08:00
bunnie
ba3639b00a prepare for v2 migration. more edits coming 2022-04-19 00:44:30 +08:00
bunnie
811b8cff3a Merge branch 'main' into bunnie-dev 2022-04-18 16:23:04 +08:00
bunnie
5c40908244 absorb SoC fix to reduce boot.bin size with latest rustc
just a shift in the optimizer settings.
2022-04-18 16:22:30 +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
c85f853e08 clean up use statements 2022-04-17 23:03:31 +08:00
bunnie
53186dd5e8 update release notes 2022-04-17 19:49:20 +08:00
bunnie
2fbb522c06 modify the web server to use mpsc, multiple workers
This is basically the Rust example for the web server, with
some tweaks. Add a command to make the device buzz when
a particular URL is hit, and to wait before responding when
another one is hit.
2022-04-17 18:50:10 +08:00
bunnie
89ceba9674 tweak some parameters and debug infos
total threads in the net crate are around 10 right now, 32 max, so
increasing the sleeping thread limit to 16, since every now and then
we get exhaustion notes.
2022-04-17 18:49:27 +08:00
bunnie
ecd875e64f remove the legacy files 2022-04-17 05:00:51 +08:00
bunnie
12190b9184 strip out the legacy xous Tcp stack implementation 2022-04-17 04:59:10 +08:00
bunnie
f2bd4a6193 fix listener address and also remove the forced timeout on read 2022-04-17 04:58:55 +08:00
bunnie
a97b548f94 implement Shutdown for TcpStream 2022-04-17 04:07:54 +08:00
bunnie
b3d83c8494 migrate to std::TcpListener in tests 2022-04-17 04:07:13 +08:00
bunnie
806b09ec0d apply TcpStream fixes
- allow for zero-length tx/rx returns
- implement "shutdown" function, which is different from close:
shutdown requires any pending connections to return Ok(0) immediately,
but the socket is not dropped.
2022-04-17 04:06:05 +08:00
bunnie
9eb35ddd49 Merge remote-tracking branch 'origin/main' into bunnie-dev 2022-04-16 06:28:29 +08:00
bunnie
e025d3e2f7 add offline option to cargo config (requires uncommenting the offline option) 2022-04-16 06:27:05 +08:00
bunnie
a555f0380e initial tcplistener draft 2022-04-16 06:26:08 +08:00
Gianguido Sorà
d06c6dcb32 modals: refuse to build modal if no fields have been provided 2022-04-13 16:59:17 +02:00
Gianguido Sorà
0c17bb6e34 modals: get rid of fields_amt value in alert modal builder, can be inferred 2022-04-13 16:57:36 +02:00
Gianguido Sorà
63cbe0e26f shellchat: style change in demo modals command 2022-04-13 15:52:14 +02:00
Gianguido Sorà
c2e619949c status: use new multi-text modals to take time 2022-04-13 15:50:07 +02:00
Gianguido Sorà
8375fdf801 shellchat: update demo modals command to new interface 2022-04-13 15:49:51 +02:00
Gianguido Sorà
89c768625d modals: add builder-based interface to present alerts with text fields inside 2022-04-13 15:49:31 +02:00
Gianguido Sorà
08bbce93f6 modal: add method to return a vec of payloads
content() automatically filters out non-dirty items
2022-04-13 15:48:46 +02:00
Gianguido Sorà
c702025283 gam: add dirty bool to TextEntryPayloads
Useful to filter out unused entries.
2022-04-13 15:47:26 +02:00
bunnie
5d2c65cb6c fix missing update to display in panic handler 2022-04-10 16:57:04 +08:00
bunnie
46624addd0 clean up comments and review panic handler before push 2022-04-10 15:52:57 +08:00
bunnie
cb9ef127ce add an off-line config reminder option in .config 2022-04-10 15:52:31 +08:00
bunnie
9254d6830a your host desires not your guru meditations
ommmmmmmmm
2022-04-10 04:47:34 +08:00
bunnie
7353c3ab9c add guru meditations 2022-04-10 04:42:02 +08:00
bunnie
3f962b6bb0 make progress updates fail gracefully on server queue full
Progress updates can come at a right too high for the renderer
to keep up, so instead of deadlocking, we discard update messages
that are too frequent.
2022-04-08 18:55:56 +08:00
bunnie
3ef2dae2f0 revert test config and make chinese text also render qr code 2022-04-08 16:05:42 +08:00
bunnie
b4dad54315 fix missing unlock() statement at end of modals 2022-04-08 15:58:59 +08:00
bunnie
fb4ce334c4 missed an instance in a demo app 2022-04-08 15:27:40 +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
679fde33a7
Merge pull request #137 from nworbnhoj/qrcode
add as_qrcode to Notification modal
2022-04-08 14:28:26 +08:00
nworbnhoj
8c5c2228d2 Merge branch 'main' into qrcode 2022-04-08 16:22:19 +10:00
nworbnhoj
2a957e55cd add as_qrcode to Notification modal 2022-04-08 14:16:15 +10:00
bunnie
bc53668018 Merge branch 'main' of github.com:betrusted-io/xous-core into main 2022-04-08 01:43:58 +08:00
bunnie
a85d9ad18b Merge branch 'bunnie-dev' into main 2022-04-08 01:34:02 +08:00
bunnie
54ce057f09 update doc links 2022-04-08 01:33:48 +08:00
bunnie
bc55e7db5f update the skeleton to the more recent practices 2022-04-08 01:33:31 +08:00
Gianguido Sorà
ec9fdb0e42 make text entry work
pro tip: make sure your types are synchronized between Buffer calls!
2022-04-07 17:05:19 +02:00