Commit graph

3225 commits

Author SHA1 Message Date
bunnie
9ee306315e fix warnings that result from the PDDB mutability change 2022-05-31 23:55:12 +08:00
bunnie
bf535bd0e1 use interior mutability to handle callbacks
this eases a mutability requirement for the PDDB object
2022-05-31 23:54:16 +08:00
bunnie
b20514e87d cleanup hosted mode warnings 2022-05-31 14:48:09 +08:00
bunnie
376d7a713b Merge branch 'main' into u2f 2022-05-31 14:39:08 +08:00
bunnie
98289b1405 fix warnings that have cropped up for transition to 2021 edition 2022-05-31 14:38:41 +08:00
bunnie
52207b641c
Merge pull request #171 from betrusted-io/xous-rs-remove-deps
Remove dependencies from `xous-rs`
2022-05-30 23:27:37 -07:00
bunnie
9d73b4732d stash to look at #171 2022-05-31 14:16:09 +08:00
Sean Cross
2e516abd64 xous: bump to rust-2021 and version to 0.9.8
Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-31 13:45:14 +08:00
Sean Cross
ff3083bbbf macros: remove unused proc-macros crate
This crate held the `xous_main` proc_macro that was previously used when
we were in `no_std` land. Since we now have a libstd, we can remove this
crate and improve build times while having a standard `main()` function.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-31 13:42:33 +08:00
Sean Cross
4ed3b201d0 xous: remove xous::xous_main macro
This macro is now unused, and does not serve a purpose. Remove it to
improve build times.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-31 13:41:48 +08:00
Sean Cross
3ae9d8abf0 apps/services: remove xous::xous_main macro usage
This macro will be removed, since it is no longer necessary. Remove this
macro across the project and replace it with a standard `main()`
function.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-31 13:33:30 +08:00
Sean Cross
dd02fce340 xous: remove nearly all dependencies
This removes nearly all of the dependencies from `xous-rs`, making it
mostly self-contained.

There is one remaining dependency tree which is `xous-macros`. This is a
legacy feature from before a time we had main(). Attempts will be made
to remove it as well.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-31 12:29:23 +08:00
Sean Cross
58dd02c282 xous-rs: remove log, hex, and debug-here deps
The `xous-rs` library is used in many places, and should have as few
dependencies as possible. Remove these as dependencies.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-31 11:20:08 +08:00
Sean Cross
8edf03a243 kernel: fix warning in hosted mode
Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-31 11:18:43 +08:00
bunnie
6f84c76b9c fixup AES key references
the implementation uses an explicitly expanded key schedule for
every AES key, with separate enc/dec keys. This does save setting
up the key scheduler every time, but, it also breaks a lot of API
assumptions. Since we have the performance to afford the key
setup/teardown for every call, this commit basically turns
the key refs into actual slices of the key itself. This creates
a weird bit of code where you have an enc key being equated to
a dec key directly; those lines are left in to make it a bit easier
to diff against the original source.

But the high bit is that the original implementation, by expanding
the key scheduler, had to have a different enc and dec key schedule
(even tho they come from the same key) but this compacted form
makes them identical.

This commit also starts working in at converting the PersistentStore
to use the PDDB.

I think I basically understand the scope of the problem, and it's
mostly just some grunt recoding of the PersistentStore calls
to refer to PDDB entries by k/v names. The main thing I've done
so far is to recode the macro that creates the partitions in
OpenSK to just create string names for every item that needs
to be stored. These string names will be used to index into a dictionary
that is dedicated to the FIDO2 function.
2022-05-31 02:24:59 +08:00
bunnie
dd9aa25516 remove unused trait 2022-05-31 02:24:35 +08:00
bunnie
d4244b28af remove custom aes256 implementation 2022-05-31 00:41:13 +08:00
bunnie
a407f7e80d remove now-defunct custom elliptic curve implementation 2022-05-31 00:35:01 +08:00
bunnie
22181422b2 add ecdsa port first cut
this one is very iffy, but once we can run tests it should
chase out all the questions about which APIs go where.
2022-05-31 00:33:11 +08:00
bunnie
cd02df7148 lockfile updates from ecdh 2022-05-30 18:52:35 +08:00
bunnie
58ab2a059e add ecdh calls to "official" p256 crate 2022-05-30 18:52:12 +08:00
bunnie
647a3a26dd port to composite format 2022-05-30 18:52:03 +08:00
bunnie
372c2cb680 Merge branch 'main' into u2f 2022-05-30 17:41:27 +08:00
bunnie
7e07c69b71 fix reset timing on USB PHY 2022-05-30 17:39:24 +08:00
bunnie
c046e0bb16 initialize the keyboard interface with a clean report on boot 2022-05-30 17:39:09 +08:00
bunnie
3b1cc97d52 commit lock file 2022-05-30 16:05:41 +08:00
bunnie
11e8ce39e8 fix missing import 2022-05-30 16:05:17 +08:00
bunnie
f2ebfd88f4 patch sha2 to Xous implementation 2022-05-30 16:04:54 +08:00
bunnie
723b230a39 that was a long walk for a drink of water: cbc encryption
Woo? we have CBC encryption using Rust's most favored AES library
now.

I have a feeling I'm going to be re-doing all of this once they
decide to finally take GenericArray out back and shoot it....
2022-05-30 15:36:00 +08:00
bunnie
798eafeb75 Merge branch 'main' into u2f 2022-05-30 13:50:57 +08:00
bunnie
764a8ad195 partial progress on CBC porting.
man this GenericArray shit is so annoying.
2022-05-30 13:46:09 +08:00
Sean Cross
57e58ff499 Merge branch 'spawn' 2022-05-30 13:42:46 +08:00
Sean Cross
75e855cc4d hosted: fix hosted mode after CreateProcess addition
Hosted mode spawns processes very differently, and this difference was
not reflected after changes were made to native mode.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-30 13:41:05 +08:00
bunnie
4dfd4d974e Merge branch 'main' of github.com:betrusted-io/xous-core into main 2022-05-30 13:08:20 +08:00
bunnie
d3c87cefda
Merge pull request #169 from betrusted-io/spawn
Add `CreateProcess` support for RISC-V
2022-05-29 22:06:59 -07:00
Sean Cross
1d3cf25518 xous: remove hardcoded addresses from create_process_pre
These addresses were hardcoded, even after they became available from
the process args.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-30 11:27:17 +08:00
Sean Cross
93b6d9f2c5 Merge branch 'main' into spawn
Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-30 08:13:59 +08:00
bunnie
82a7ddddc7 Merge branch 'main' into u2f 2022-05-30 04:58:52 +08:00
bunnie
3f8bfcb85f update release notes 2022-05-30 04:58:40 +08:00
bunnie
e30a2a17d3 Merge branch 'main' into u2f 2022-05-30 04:50:58 +08:00
bunnie
001653f1bf update Cargo.lock that now no longer has aes 0.7 references 2022-05-30 04:40:24 +08:00
bunnie
1946d38a69 work around https://github.com/RustCrypto/AEADs/issues/410
We're trying to bring the AES version up so we can do CBC
(required for FIDO2) but unfortunately the aes-gcm-siv crate
is locked to an outdated version of AES, and this is blocking
on a type that is missing in the `block-ciphers` crate.

For now, we're using a patched version of aes-gcm-siv from
rozbb's repo, which allows us to move forward, but this needs
to be reverted once a new version of the official crate is patched.
2022-05-30 04:36:33 +08:00
bunnie
596cebc9c9 add ParBlocks type to our AES implementation
see https://github.com/RustCrypto/AEADs/issues/410
2022-05-30 04:33:46 +08:00
bunnie
a54e8c79c2 bump root-keys cipher version compat to 0.4+ 2022-05-30 04:33:16 +08:00
bunnie
ce3f6623ac update Lockfile for AES 0.8 compat 2022-05-30 03:09:52 +08:00
bunnie
c11d5fe52b bring shellchat to AES 0.8 compatibility
Also note here that we have:

- Run all the AES test vectors and confirmed the pass for both
  hw and sw
- Updated the benchmark numbers for the new AES implementation
2022-05-30 03:09:05 +08:00
bunnie
684c92ca0f bring root keys to AES 0.8 compatibility 2022-05-30 03:08:54 +08:00
bunnie
2cd4e80d9c bring PDDB to AES 0.8 compatibility 2022-05-30 03:08:41 +08:00
bunnie
9bf431a232 move AES API to version 0.8.2 compatibility
This is in a bid to gain CBC crate compatibility which requires
at least an AES 0.8 API level.

It breaks a lot of stuff, which is fixed in the next commit.
2022-05-30 03:06:34 +08:00
bunnie
e84e378ef2 partial progress on aes integration
need to retrench and update AES crate to support some APIs
that allow for CBC modes
2022-05-29 20:35:11 +08:00