Commit graph

10340 commits

Author SHA1 Message Date
Sean Cross
884edfb36d xous: process: specify stack, entrypoint, and base
Specify both the stack range and the process entrypoint, as well as the
load address of the text image.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-29 18:45:25 +08:00
bunnie
cbb5462895 Merge branch 'main' into u2f 2022-05-29 14:45:40 +08:00
bunnie
0c45083975 remove apps from default-members 2022-05-29 14:40:30 +08:00
bunnie
0641cad639 clean out some unused crates and test structures 2022-05-29 14:32:26 +08:00
bunnie
0b1768115a retrench and try a new strategy for porting crypto libraries 2022-05-29 13:59:06 +08:00
bunnie
a4c72cc9bb fixup merge 2022-05-29 03:35:45 +08:00
bunnie
bafa6c2d58 fix local dev depenendcy 2022-05-29 03:28:41 +08:00
bunnie
268fe63cc1 Merge branch 'main' into u2f 2022-05-29 03:25:49 +08:00
bunnie
f8ed4ff24c Merge branch 'main' of github.com:betrusted-io/xous-core into main 2022-05-29 03:02:06 +08:00
bunnie
f67eec8c6a update release notes to mark the move of the randcore APIs 2022-05-29 03:01:30 +08:00
bunnie
a9e2b15c7e fix warnings that have cropped up 2022-05-29 02:58:10 +08:00
bunnie
e2026318b6 commit the getrandom fork, which is vendored into the kernel
we have to keep all the targets around, because hosted mode
also uses rand, which won't resolve correctly unless we also
have the host's target available, unfortunately

(trust me, tried to do a version stripped down just for xous...)
2022-05-29 02:48:05 +08:00
bunnie
e14e6206ed include a getrandom implementation that allows us to use modern randcore
A lot of packages are depending on 0.6 api, which requires a crate
that has OS specific TRNG calls. This patch keeps the 0.5 calls
inside the TRNG crate as direct API calls, and migrates to support
a 0.6 api to a patched version of getrandom that supports Xous.
2022-05-29 02:47:51 +08:00
bunnie
25b068ac74 check in the getrandom stub for testing in main 2022-05-29 02:46:52 +08:00
bunnie
21edc7721a bump com_rs rev (no mangling of opcodes by rustfmt) 2022-05-29 02:46:30 +08:00
bunnie
7404fa292a
Update README.md 2022-05-29 01:47:53 +08:00
bunnie
251c84642f
Update README.md 2022-05-29 01:45:50 +08:00
bunnie
844543f72d beginning of ecdsa port...need to resolve rand_core dependency
*everoyne* is relying on rand_core, a later version, that uses
a "getrandom" thing that tries to make the call for random
number generators generic.

I mean, it's kind of cool, but, it's also sort of a libc
non-pure-rust nightmare because basically it always delegates
to a C-style API for a variety of platforms.

Next step is to see if we can't...patch...getrandom to point
to a much simplified, xous-only version that is 100% pure Rust.
2022-05-28 23:38:23 +08:00
bunnie
fe83df4e05 check in the getrandom stub for testing in main 2022-05-28 23:38:01 +08:00
Sean Cross
f4558dac9e spawn: add spawn program
Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-28 19:01:59 +08:00
Sean Cross
8c19cfb1b7 test-spawn: add program to test spawning
Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-28 19:01:24 +08:00
bunnie
f4a18401e5 expose is_efuse_secured() API via the PDDB
is_efuse_secured() comes from rootkeys, but we don't want
to expose the full rootkeys API to the world.

PDDB already has an approved capability for accessing rootkeys,
so this single API is passed through via the PDDB object here,
allowing other procesess to query it.
2022-05-28 18:21:07 +08:00
bunnie
0a795ffaf7 add some shims for the CTAP module
the shims save some rewriting of heavily used Tock APIs to be
Xous-specific.
2022-05-28 18:20:16 +08:00
bunnie
2da0f0b812 some progess porting ctap to Xous 2022-05-28 18:19:52 +08:00
bunnie
cd18aa2609 expose is_efuse_secured() API via the PDDB
is_efuse_secured() comes from rootkeys, but we don't want
to expose the full rootkeys API to the world.

PDDB already has an approved capability for accessing rootkeys,
so this single API is passed through via the PDDB object here,
allowing other procesess to query it.
2022-05-28 18:18:37 +08:00
bunnie
9e1e80f089 organize the vault app, trim some things, get a dummy build going 2022-05-28 16:12:08 +08:00
Sean Cross
2e69ae8a12 spawn: compiles, but does not work yet
Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-28 05:10:48 +08:00
bunnie
389ea55b00 add also the new files associated with the vault 2022-05-28 01:20:05 +08:00
bunnie
81f823ff34 migrate u2f to the "vault" app
The vault app is the beginning of a multi-purpose authentication vault.
It will feature:

1. FIDO2 authentication
2. TOTP authenticators
3. Password storage to PDDB with auto-typing via keyboard HID

This is the first step on a very very long journey.
2022-05-28 01:17:54 +08:00
bunnie
7bbbc1e63a add debugging notes 2022-05-27 23:10:26 +08:00
bunnie
116015dff8 fixups and debug 2022-05-27 22:45:23 +08:00
bunnie
8553aea95e fixup a stub 2022-05-27 18:09:21 +08:00
bunnie
05f705a931 prove that we've restored ditherpunk functionality to hosted mode
this basically brings us back to the point of the original PR,
but with the code being optional.
2022-05-27 18:05:36 +08:00
bunnie
a8e7809087 fixup feature fest 2022-05-27 17:41:22 +08:00
Gianguido Sorà
9af6c7257d middle commit 2022-05-27 09:35:10 +00:00
bunnie
7d020182d4 integrate ditherpunk as a feature 2022-05-27 17:28:15 +08:00
bunnie
c8165be0fb Merge remote-tracking branch 'jb/dither' into bunnie-dev 2022-05-27 16:44:17 +08:00
bunnie
6745206303 mulling this pile of OpenSK code to see what we should cut, what we should keep
alright. the composite device problem is solved. The bigger issue I'm
mulling is if I should try to port the Google OpenSK FIDO2 stack into
Xous, or if I should just do a limited U2F implementation.

Poking around at the OpenSK stuff...porting looks possible, but, it's
going to be vendoring in all of the source from the OpenSK project. So
it'll be tough to apply patches if they happen; on the other hand, the
OpenSK implementation is FIDO2 certified, and the stable branch hasn't
moved since Nov 2021.

The main downsides of the OpenSK implementation are:

- it uses nightly. I think it can be stripped out, though; I haven't
  seen a "good reason" for it yet, it's mostly because Tock uses
  nightly. There's only one alarming use of it and it's in the crypto
  crates but those will be stripped out because....
- the crypto libraries are in fact not suitable for use. I dug into
  them and they definitely need to be gutted and replaced with the
  community-blessed crypto libraries and APIs. which is one big reason
  why once this goes into Xous land it doesn't go back easily into
  OpenSK land -- they actually have slightly different crypto
  APIs. more modern ones, to be fair, but, they haven't been reviewed.
- the implementation has "too many features"...for example, I don't
  think we'll ever realistically do authenticator attestation as it
  requires signing NDAs and provisioning secret keys that we can't
  share with users. But that code is there, and we'll either have to
  gut or bodge it.

The plusses are:

- it's FIDO2 certified. So, at least the protocol stack is probably
  complete and fully implemented, which means for features we don't
  use today I can just leave hooks or dummy values there for a fast
  migration path.
- Looks like they aren't changing things too fast in the dev
  branch...so this probably is not like riding a greased pig
- Looks like a couple of paid professionals wrote the code...better
  than what we have going on here
- I think I see a path to carve out their "persistent store" and glom
  it into the PDDB; a path to adapt their crypto traits into
  Xous-native traits; and a path to connect their CTAP protocol engine
  to the Xous HID server. So it seems feasible. But they baked in some
  bad API assumptions deeply enough that they are one-way streets I
  think to get these ports done.

I'm going to sleep on this, but I'm leaning toward trying to pull in
the OpenSK code because even tho it is a bit painful it probably gets
a bigger feature scope and so far it looks like I wouldn't be changing
any protocol-level stuff for the port, I would just be monkeying
around with the internal storage, crypto, and USB implementations, so
ideally the end result is we get a certified FIDO2 protocol engine for
the effort.

I think the main concern I have going in this direction is I don't see
a way to do this and simultaneously be able to absorb upstream patches
into this vendored code, because their API assumptions are too
different. Any bug fixes or patches would have to be manually applied
and merged. But maybe that's not such a big deal...?
2022-05-27 03:01:39 +08:00
bunnie
634f3b0e93 fix composite device description - we now have HID & U2F simultaneously! 2022-05-27 00:34:06 +08:00
Jake
ac8b3acbd7
chore: fix ypo in build.rs 2022-05-26 17:53:33 +02:00
bunnie
a8f761722a start to lay in u2f messaging infrastructure 2022-05-26 17:58:22 +08:00
bunnie
cd0b952e2a bump com_rs rev (no mangling of opcodes by rustfmt) 2022-05-25 23:54:44 +08:00
bunnie
811bd88111 improve reboot timings after root key init 2022-05-25 14:30:13 +08:00
nworbnhoj
342e8e82b1 implement shellchat test modals
remove modals feature ux_tests
2022-05-25 10:29:21 +10:00
bunnie
54947a2216 add an initdone sentinel for rootkey provisioning
simplifies script logic a bit
2022-05-25 04:09:36 +08:00
bunnie
62cbc86aeb add automation strings 2022-05-24 23:21:26 +08:00
bunnie
2f8c850cd6 fix issue #152 2022-05-24 18:10:47 +08:00
bunnie
3b6bc6aeeb suppress hosted mode warnings in usb dev crate 2022-05-24 17:08:27 +08:00
bunnie
3fccc6c314 fix hosted mode error 2022-05-24 17:06:43 +08:00
bunnie
6c1818ff97 update release notes
note the beginning of the inclusion of CI infra
2022-05-24 16:59:49 +08:00