bunnie
d06d58b132
harmonize rand crate to 0.7.4 (version used by ed25519-dalek)
2022-01-10 15:03:23 +08:00
bunnie
7aa2c7b054
a very basic e2e pddb application that tries to restore a network connection
...
lots of problems to solve still, but let's pick that up on the refactor
stage -- for now we want to get some evidence that the pddb API is
workable.
2022-01-09 01:29:28 +08:00
bunnie
233a7cb7d3
getting started on dict management, but just realized we did strings in a dumb way
...
we really should have coded a length field in all the name string
stored in the PDDB (derp, old C habits die hard).
let's fix that before we move on.
2022-01-06 17:12:30 +08:00
bunnie
0844b3e961
add formatting check and UX flow for formatting; redo salt (again)
...
probably should have split this into two commits. oh well.
first part introduces a check to see if root keys are initialized,
and if so, tries to mount the PDDB. If it can't mount, it asks
the user if they want to format it. It also updates the progress
of the fromatting.
the second part redoes the salt once again. After some discussion
SHA512/256 is also resistant to length extension attacsk so we
don't need to use the HMAC technique suggested. Would prefer to
reduce the number of algos to analyze, so we're going to a simple
SHA512/256 hash of the salt/basis name/plaintext password to generate
the salt that goes into the bcrypt routine that ultimately generates
the final key used by the system.
2022-01-03 16:51:51 +08:00
bunnie
6d655c8085
convert salt to use an HMAC instead of SHA to harden against length extension attacks
...
(as reccommended by reviewer)
2022-01-02 19:37:30 +08:00
bunnie
66606ed3e0
initial attempt to make hosted mode more deterministic
...
replace all threadRng with a seeded Rng
2021-12-25 15:58:27 +08:00
bunnie
8c66e04bc3
refactor RTC module to use modals server
2021-12-17 02:49:38 +08:00
bunnie
725d943198
add interlocking so multiple threads don't interfere with each other
2021-12-17 01:55:36 +08:00
bunnie
60d6d08933
basic framework for modal API wrapping in place
2021-12-15 13:46:24 +08:00
bunnie
de4e84abf5
starting in on the larger system integration of the PDDB
...
Trying to find a new approach to making dialog boxes that
are cleaner and don't require as much code repetition. Probably
about to go on a long tangent.
2021-12-13 14:24:14 +08:00
bunnie
5a12e83ff2
add first cut at basis key derivation function
2021-11-28 20:42:26 +08:00
bunnie
151e054314
clean up a whole bunch of warnings
2021-11-22 16:04:31 +08:00
bunnie
ce51205155
checkpoint with memory placement and disk storage
...
this probably isn't new to most other people but this has been
a very visceral exercise of how tricky it is to use Repr(c)
for data layouts in anything but the most trivial data structures.
Unfortunately the Basis root data structure needs to be fairly rich,
so we're playing around with using rkyv to help with the serialization
to disk but I'm also not convinced this is a good idea yet. This
checkpoints commits a "working" rkyv implementation, but I'm not
entirely happy with the notion that rkyv can shuffle around data
bits based on its particular version or decisions in the serializer
crate. I'd like deterministic, repeatable serialization that will
be solid through lots of revs...
2021-11-15 16:00:01 +08:00
bunnie
a4a2d12d57
refactoring the order of format events; consolidate fscb init op
...
try to condense ops that we anticipate calling in other places
into helper functions.
add AAD to the fscb.
2021-11-09 04:57:12 +08:00
bunnie
ca3c1c7de4
remodeled Cargo.lock after the aes-xous -> aes name change
2021-11-07 05:18:19 +08:00
bunnie
778fa8d271
just journaling intermediate work
2021-11-06 04:22:34 +08:00
bunnie
56e82f37d3
more thoughts on the pddb.
...
this is definitely a rough-draft implementation and is going to
need a v2 or v3 to plug all the serious holes.
2021-11-05 03:58:58 +08:00
bunnie
edb43a17a3
some structure on a more refined version of the pddb api.
...
doesn't compile tho, need to figure out what the status of
Path is on Xous.
2021-11-01 04:30:19 +08:00
bunnie
ec538025a8
changes to bring us up to date with rust 1.56. still not building.
2021-10-23 17:08:48 +08:00
bunnie
f53c57ba3f
fix up a number of issues in ping
...
Now that I understand how smoltcp does ping better I have regrets.
The demo example in smoltcp uses a funky macro that was a bit
misleading. I have gotten rid of that but I probably would have made
different decisions in implementing this had I understood the API better.
Anyways. It works, but has some trouble handling the cases of timeouts
sometimes.
2021-10-22 04:08:43 +08:00
bunnie
f1fe850820
ping was surprisingly hard.
...
not fully working yet, but the architecture is there and it builds.
smoltcp's ping implementation (or at least its demo code) was not
very amenable to splitting into modules, had to recode most of it.
the ipv6 is still a hack.
2021-10-21 06:28:11 +08:00
bunnie
643e9a7d62
dns. needs more work, but it is at least minimally functional.
2021-10-20 05:18:54 +08:00
bunnie
a8c6e8047f
simple end-to-end demo of receiving UDP packets asynchronously
2021-10-18 05:55:42 +08:00
bunnie
e6643e725d
implement UDP rx
2021-10-18 04:02:55 +08:00
bunnie
ec34b01bd9
pings working with smoltcp (can originate and respond)
2021-10-13 01:57:00 +08:00
bunnie
26069c023a
intermediate commit trying to trace down how this receive process works.
2021-10-10 21:12:09 +08:00
bunnie
74a3c6df44
disastrous first draft of figuring out how to integrate smoltcp using a ping example.
2021-10-10 01:57:31 +08:00
bunnie
560c6e4197
something packet-oid is coming out of the serial port now?
2021-10-09 02:12:12 +08:00
bunnie
b43eb56346
add some skeleton for a net crate; testing COM interrupts
2021-10-08 20:01:13 +08:00
bunnie
e4c79a5f47
start to lay out skeleton for pddb
2021-10-04 14:50:30 +08:00
bunnie
011466ceb5
start on a minimal test stub for the heap allocation problem
2021-09-26 00:01:59 +08:00
bunnie
87228ad747
basically working OQC test
2021-09-19 01:06:21 +08:00
bunnie
c2c919ba81
add oqc test service
...
this works around the problem with stdlib allocator not
working quite correctly in spawned threads.
2021-09-18 02:22:35 +08:00
bunnie
4882016d08
add a graphics test routine for OQC
...
invoked via the GAM, callable exactly once per boot for up
to 60 seconds.
2021-09-16 01:00:22 +08:00
bunnie
f0dd512d7d
bump sha2 version number so it matches what's on crates.io (for clean patching)
2021-09-15 18:53:11 +08:00
bunnie
3f1ba5e279
add com trng seed, uptime on EC; EC reset test commands
2021-09-13 23:28:54 +08:00
bunnie
7ac8b9100d
create a test case for cosine intrinsics
2021-09-08 15:10:54 +08:00
bunnie
e510525a0a
move wycheproof-import to tools
2021-09-06 14:42:19 +08:00
Fabian Weißberg
4bb454ef10
Import x25519 vectors from Project Wycheproof
...
Closes #76
The test vectors in wycheproof-import/x25519_test.json correspond to the upstream commit 4672ff74d6 .
For details see wycheproof-import/README.md.
Signed-off-by: Fabian Weißberg <fabian.weissberg@tu-dortmund.de>
2021-09-05 22:27:16 +02:00
bunnie
c8b15a3c81
pull in the latest blitstr
2021-08-29 23:17:13 +08:00
Sean Cross
1e2f31a753
Cargo: add lockfile settings for xtask
...
xtask now includes libcurl and unzip in order to be able to extract the
toolchain.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-19 11:58:55 +08:00
bunnie
944a506f7a
aes ops are there but we need to wrap it in a UX...
2021-08-17 00:02:24 +08:00
bunnie
20a6244687
cargo.lock updated after the merge
2021-08-15 00:20:23 +08:00
bunnie
1c447fabef
Merge branch 'jtag-premerge' into main
2021-08-12 01:55:48 +08:00
Sean Cross
45ae45a218
cargo: remove rkyv from log-server lockfile
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-11 11:00:56 +08:00
bunnie
799bb6050e
add jtag commands, reboot after burn
2021-08-11 06:15:04 +08:00
bunnie
bdd70f9502
stash to figure out build issue
2021-08-10 22:41:22 +08:00
bunnie
04dc6a4c2b
refactor engine-sha512 to be named sha2
...
this makes patch.crates-io much easier to debug, we now
have the hardware hasher working in all the places i expect it to.
2021-08-09 04:40:33 +08:00
bunnie
ec6a3fd1a3
self-signing working, but the patch to use the SHA hash engine seems to be disregarded...
2021-08-09 03:27:43 +08:00
bunnie
82aaeb072f
gateware HMAC verification now working!
2021-08-06 02:33:52 +08:00
Sean Cross
acf9e2924d
cargo: check in lockfile with locales changes
...
Locales now has build dependencies.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-04 12:47:47 +08:00
bunnie
ef671dd6a3
fix up xous-names and resolve issue #26 thanks to stdlib
...
also frees up about 24k of unused RAM, i'll take it!
2021-08-04 01:59:17 +08:00
bunnie
8b83fb7c65
remove heapless, go to libstd for all collections!!!!
...
*fistpump*
2021-08-04 01:25:32 +08:00
bunnie
34d44ee9e7
start to remove heapless and commit to libstd flow
2021-08-04 00:07:47 +08:00
bunnie
68ea69c2ed
Merge branch 'bunnie-dev' into main
2021-08-03 17:22:10 +08:00
bunnie
01d6c61bb6
commit before merging main stuff
...
want to capture in the libstd improvements before we get too much
version drift
2021-08-03 16:54:42 +08:00
bunnie
d86c78eea8
partial progress on self-signing
2021-08-03 04:58:34 +08:00
Sean Cross
ff23ba7eb0
cargo.lock: use new blitstr hash
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-02 18:16:41 +08:00
bunnie
41843db988
intermediate progress on the main UX flow again
...
does not build clean because still deciding on how to handle
UX feedback.
2021-07-30 19:04:02 +08:00
bunnie
919e9e87ff
add bcrypt for password hashing, take care of life cycle of plaintext
2021-07-30 04:07:10 +08:00
bunnie
78c0b30382
refactor menu
...
- move it to the status thread, out of the GAM
- this allows us to refactor the menu code into its own module
2021-07-29 01:04:22 +08:00
bunnie
9f3615fd3d
extend RTC setting with UX
...
not because this is so important, but because it's a simple
test case that exercises a lot of features.
2021-07-28 04:27:14 +08:00
bunnie
b6c443145c
extend modal functions; refactor status into its own server
2021-07-28 01:01:39 +08:00
bunnie
1a65cd3389
password dialog box basic layout is kind of there
...
a little ugly, but...this has already taken too long.
2021-07-27 04:40:12 +08:00
bunnie
53f35f9928
intermediate work toward getting the password box going
...
lots of changes, maybe finally getting out of the UX rathole now
that basic localization is in place
2021-07-26 00:51:22 +08:00
bunnie
556f0aaea5
beginnings of a password dialog system
2021-07-22 03:04:16 +08:00
bunnie
5280d232e5
figuring out which way is up on the RootKeys implementation
2021-07-21 19:47:09 +08:00
bunnie
ce18716b88
add the boilerplate for the keys server
2021-07-20 01:59:52 +08:00
bunnie
01d3455a16
Merge branch 'main' into bunnie-dev
2021-07-18 12:33:16 +08:00
bunnie
91fe69ca27
add some real-hardware tests for spinor writes
...
definitely still bugs.
need to sleep on it.
2021-07-18 02:36:31 +08:00
bunnie
168d0fc2cb
start of some basic tests
2021-07-17 17:12:23 +08:00
bunnie
7e7ae82156
pivot spinor implementation
...
realizing some core assumptions were wrong, so, scrapping and
restarting
2021-07-15 23:00:50 +08:00
Sean Cross
fcbc901df8
Cargo: update latest versions of dependencies
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-15 15:58:13 +08:00
bunnie
ef93196cfc
stash commit to fix a bootloader issue
2021-07-13 22:28:46 +08:00
bunnie
84a2e9f768
fix status bar so that it redraws out of suspend/resume
...
the bootloader modifies the screen, so all elements must
be redrawn regardless of the pervious state change!
2021-07-11 18:47:19 +08:00
bunnie
2c6ba2f127
fix brokenness with ptr_meta crate
2021-07-05 17:17:33 +08:00
bunnie
1b5d4bd79b
push of spinor changes to validate l2cache
2021-07-05 00:08:58 +08:00
bunnie
674faa46d9
button up after debugging the ed25519 issue
2021-06-29 23:46:15 +08:00
bunnie
0bad1ad755
isolate a potential compiler bug
2021-06-29 00:10:46 +08:00
bunnie
8da62390ad
add RFC7748 test vectors for diffie hellman
2021-06-28 19:01:22 +08:00
bunnie
e01676d563
move the montgomery multiply code into the engine server
...
this saves a fairly substantial amount of time marshalling
re-used bits of microcode around on the benchmarks.
2021-06-28 18:41:34 +08:00
bunnie
ee87fd35a8
add hw acceleration for the affine transform on curve25519
2021-06-28 04:43:56 +08:00
bunnie
89b3875bfc
commit before working on acceleration code
2021-06-28 02:33:32 +08:00
bunnie
d791548b9d
straggler.
2021-06-28 01:32:42 +08:00
bunnie
e2ada8f8fe
attempt to fix up some build system warts
2021-06-28 01:31:43 +08:00
bunnie
5ab0c0b426
commit a version that should be able to build in CI now
2021-06-27 03:14:50 +08:00
bunnie
e39c2200cd
fix up the build system warts & integration with dalek crates
...
we are at least now only requiring users to use our patched
curve25519-dalek crate, which now builds cleanly in both
xous and std environments, but the higher-level crates can be
directly used from crates.io
2021-06-27 03:07:39 +08:00
bunnie
6efdb7e0db
stash a version with XousEngine25519 traits in case we want it back later
2021-06-27 00:31:15 +08:00
bunnie
75dca6bd4c
checkin for a rollback to sanity check some things
2021-06-25 02:09:42 +08:00
bunnie
ae25142acb
engine25519 doesn't crash on boot, at least.
...
ManagedMemory structure for susres has some issues with large
blocks, so use "heap-allocated" structures
2021-06-24 03:17:32 +08:00
bunnie
5d21ef0c76
beginnings of the curve25519 accelerator engine core driver
...
the engine-25519 server just takes microcode jobs and runs them
on the curve25519 accelerator engine.
all the fancy crypto stuff comes from other crates, which will
be filled in later.
2021-06-22 01:48:51 +08:00
bunnie
69a22adee9
menus basically working
2021-06-19 00:25:18 +08:00
bunnie
03bcf18348
clean up enum-based dispatch for Layouts, pulling in enum_dispatch crate.
2021-06-16 17:41:47 +08:00
bunnie
5301f4af20
major refactor of the Ux -- can create, redirect I/O contexts
...
getting ready for Precursor to do more than just one thing.
2021-06-16 04:50:26 +08:00
bunnie
0db9ad9e6f
add status bar extension to inform of security states
...
- inverted text indicates a trusted message. policy is enforced in the GAM.
- we don't have a way to lock the USB port yet; but at least now it's communicated.
2021-06-13 04:40:50 +08:00
bunnie
2174ab7677
upgrade TRNG with health tests and reporting facilities
2021-06-08 01:22:07 +08:00
bunnie
b1d027bc52
adding AES native instruction support
2021-06-04 00:49:34 +08:00
bunnie
77ed8972f6
Merge branch 'aes' into bunnie-dev
2021-06-02 04:08:00 +08:00
bunnie
fadc9c29ab
Merge remote-tracking branch 'origin/master' into bunnie-dev
2021-06-02 03:59:25 +08:00
Sean Cross
9638c67aae
aes-test: add test program
...
This is a basic program that exercises the AES core
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-01 20:01:23 +08:00