Commit graph

205 commits

Author SHA1 Message Date
bunnie
5129b42dd9 remove shellchat services that conflict with the pddb 2022-01-04 21:56:50 +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
7208a86fdb rename aes-xous to aes, and change version number
this allows us to patch AES for external crates, too,
such as aes_gcm_siv
2021-11-07 05:17:34 +08:00
bunnie
65bad96f52 fix killbounce & formatting
sleep killbounce wouldn't work because we started limiting the
number of connections to the LLIO.

This change makes connections to the LLIO unlimited, but perhaps later
on we should split out the I2C bus into a separate security domain,
so that the LLIO's unlimited connection policy doesn't introduce a
risk into a rogue process being able to overwrite the RTC contents.
2021-10-30 02:14:31 +08:00
bunnie
2962d4ffc3 add a wifi retry to the oqc test 2021-10-29 05:25:40 +08:00
bunnie
81edf6a9c0 fix net ping description and help info 2021-10-28 18:37:48 +08:00
bunnie
72ffee7f13 cleanup of debug chatter, clarify some comments 2021-10-28 05:12:03 +08:00
bunnie
765519ff32 major refactor of ping implementation
- moved most ping state into the Net crate proper, since the smoltcp
implementation assumes a tightly bound set of objects and lifetimes
in its icmp abstraction

- created various convenience abstractions for handling single and
multiple pings, blocking and non-blocking.

- refactored the "net" command to use the new form

Initial testing indicates there are still some bugs (seems to be
with the way we are handling timestamping and doing pong retirement)
but at least we're not getting tons of async callback errors like
we were before, and we're not shuttling obscene amounts of state
using Arc-Mutex between the input and output of the ping operations.
2021-10-27 04:38:09 +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
ab3e05764e add some status and help message embellishments 2021-10-19 04:43:55 +08:00
bunnie
40771fbba7 flesh out UDP API...as much as we can
Multicast/Broadcast is not supported by smoltcp it seems, so those
calls are just unimplemented. But we are able to clone UdpSocket,
for the sick puppies who like to do that sort of thing.
2021-10-19 04:42:06 +08:00
bunnie
0cbca7fbe1 add UDP send and test routines 2021-10-19 01:41:22 +08:00
bunnie
98bbe848fc cleanup Udp Bind API
version for Xous internal use, and a version for integration into libstd.
2021-10-18 17:04:16 +08:00
bunnie
a8c6e8047f simple end-to-end demo of receiving UDP packets asynchronously 2021-10-18 05:55:42 +08:00
bunnie
23edeb9b5a add wlan dhcp to oqc test 2021-10-07 00:57:22 +08:00
bunnie
81653ec94b wot. how are these changes not being saved. 2021-10-04 17:37:17 +08:00
bunnie
f0c33bc99c tighten up operator flow for factory tests 2021-10-04 17:25:49 +08:00
bunnie
4a57adac3d add battery check, version print to oqc test 2021-09-20 00:05:21 +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
029c845359 add ssid, suspend/resume test to the OQC test routine; comment out keyboard
keyboard routine still pending fixing a possible bug in xous allocator
2021-09-16 03:54:35 +08:00
bunnie
ce026e661d clear warning from previous mux fix 2021-09-16 03:54:19 +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
8edb02ba40 try a version using scalars, still crashes 2021-09-15 18:29:27 +08:00
bunnie
8ce0e8c789 intermediate checkpoint of failing memory-passing for keyrawstates 2021-09-15 17:59:13 +08:00
bunnie
dfc6444d78 add killkey test to the self test suite 2021-09-14 20:15:03 +08:00
bunnie
3f1ba5e279 add com trng seed, uptime on EC; EC reset test commands 2021-09-13 23:28:54 +08:00
bunnie
d0a83b6865 add backlight test 2021-09-11 22:53:20 +08:00
bunnie
49919c6123 fix typo in check clause 2021-09-11 18:02:26 +08:00
bunnie
5bff7433a5 add internal vcc measeruments to self test 2021-09-11 18:00:22 +08:00
bunnie
e06188c5fa add trng module to self-test 2021-09-11 00:16:55 +08:00
bunnie
6eed8deb4c improve audio testing integration for automation framework 2021-09-10 22:54:23 +08:00
bunnie
3be7204ce6 audio test frameworks initial working cut 2021-09-10 02:56:27 +08:00
bunnie
bd89146967 commit latest formatting changes for test output 2021-09-09 22:32:08 +08:00
bunnie
549912c9d5 add rtc test 2021-09-09 16:55:56 +08:00
bunnie
7ac8b9100d create a test case for cosine intrinsics 2021-09-08 15:10:54 +08:00
bunnie
0e94725d23 add wycheproof help message 2021-09-06 14:43:19 +08:00
bunnie
01bfc375b2 Merge branch 'main' into bunnie-dev 2021-09-06 14:40:16 +08:00
bunnie
1a55973346 adjustments to self test routines 2021-09-06 14:39:44 +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
858a1ed019 beginnings of a factory self-test routine; expand COM functionality 2021-09-05 23:26:07 +08:00
bunnie
c2afa2b09f fix runs index length that was not pulled in after gateware optimization 2021-08-30 00:30:44 +08:00
bunnie
c3fc3ff23f add bbram provisioning sequence 2021-08-19 04:22:28 +08:00
bunnie
498f530165 the base layer of the AES oracle is in place for the rootkeys 2021-08-17 04:15:24 +08:00
bunnie
8a82caf2fc intermediate check-in on rootkeys enclave 2021-08-16 23:35:36 +08:00
Sam Blenny
af25697a6f Merge remote-tracking branch 'upstream/main' into com-wlan 2021-08-13 23:01:12 +00:00
bunnie
1c447fabef Merge branch 'jtag-premerge' into main 2021-08-12 01:55:48 +08:00