Commit graph

3329 commits

Author SHA1 Message Date
bunnie
e288286bda reduce binary burden of backup SHA implementations
When the hardware engine is unavailable, the implementation
falls back to a software SHA. This code path is actually
rarely used, but it is the top object code consumer according
to our bloat analysis tool (40kiB for each instance of
the compress function alone).

This patch annotates the SHA functions with `#[inline(never)]`
to reduce the size of these rarely-used functions.

...it might actually be that on our small-cache system,
reducing the in-lining could improve performance as well
because it helps the whole routine fit inside L2 cache.

Anyways, it's a rarely-used path (I've never seen the code
used once tbh) so let's reduce its overhead and keep
Xous trim.
2022-06-10 18:02:52 +08:00
bunnie
ebc8fd90f3
Merge pull request #180 from kelas/main
Fix realloc()
2022-06-10 16:45:40 +08:00
/dev/kelas
cd62bd4552
Merge branch 'betrusted-io:main' into main 2022-06-09 23:02:41 +02:00
kelas
ab18eb0776 Fix realloc() 2022-06-09 23:01:43 +02:00
bunnie
b3ea67a2a9
Merge pull request #179 from betrusted-io/fix-forward-memory
xous: envelope: handle MemoryReturned in forward()
2022-06-09 22:32:40 +08:00
Sean Cross
f4f5418190 xous: envelope: handle MemoryReturned in forward()
Previously, we only handled messages that were forwarded. With this
patch, we also handle memory messages that were returned.

This fixes #165

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-09 17:50:21 +08:00
bunnie
ceef2b0bd6
Merge pull request #176 from Hoverbear-Consulting/fix-sha-name
`cargo xtask run` tries to execute non-existing binary.
2022-06-09 04:12:47 +08:00
bunnie
42996a8177 fix U2F flow
accidentally broke it while debugging FIDO2. added notes about how
the flow is implemented.
2022-06-09 02:57:31 +08:00
bunnie
fd9fb1cbcc fix hosted mode 2022-06-09 00:28:48 +08:00
bunnie
d56360b599 reflect status of "vault" moving toward a default app status 2022-06-09 00:25:04 +08:00
bunnie
e68c976735 configure vault for production and add maintainer's notes 2022-06-09 00:20:36 +08:00
bunnie
3fc038cca9 add some missing translations, and add a listener to the unplug state 2022-06-08 23:48:09 +08:00
bunnie
a4d0cdba80 pass unplug events down to the FIDO stack
this is necessary because unplugs actually force some
cryptographic state to rekey
2022-06-08 23:47:44 +08:00
bunnie
52211f078e adjust autotest flow for UDP-based button pressing 2022-06-08 20:15:32 +08:00
Ana Hobden
fa864ef137 Correct sha binary name
Signed-off-by: Ana Hobden <operator@hoverbear.org>
2022-06-07 23:42:01 -07:00
bunnie
01fbc1e8b7 update release notes 2022-06-08 04:42:28 +08:00
bunnie
7506b3ba30 update lock file 2022-06-08 04:37:48 +08:00
bunnie
b66f8b5303 update lock file 2022-06-08 04:37:35 +08:00
bunnie
6f8590e4e7 fixup config flags on keyboard option 2022-06-08 04:37:08 +08:00
bunnie
cb30edd8ab Merge branch 'main' into u2f 2022-06-08 04:35:37 +08:00
bunnie
ec5d61e678 add comment on test 2022-06-08 04:35:04 +08:00
bunnie
7db4db2701 fix ECDH error
was missing the FIDO-required sha256 hash after ECDH key exchange
2022-06-08 04:33:09 +08:00
bunnie
9acb8b8ac5
Merge pull request #175 from kelas/main
don't block if the queue isn't empty
2022-06-08 04:32:15 +08:00
kelas
37d3e4973e don't block if the queue isn't empty 2022-06-07 19:21:43 +02:00
bunnie
4a12b458c9 seems like the DH key exchange is broken somehow? needs more digging.
i've extracted the key parameters from the test suite and confirmed that
that the hash value is computed correctly on their side.

i've also confirmed that the hash value is computed correctly from
the locally computed key.

so what's gone wrong is the devired secret key doesn't match what's
on the other side.

possible issues could be either a PK serialization issue, or something
wrong in the DH exchange itself.
2022-06-07 18:55:59 +08:00
bunnie
ae9c2d5b99 add authentication request UI; fix tests again.
trying to debug why PIN authentication doesn't work. looks like
Cosekey conversion is fine, the data is arriving OK...but the
dh key exchange is not generated the expected shared secret.
2022-06-07 17:36:28 +08:00
bunnie
0830513ef1 debugging for dynamic resize issue 2022-06-07 16:42:10 +08:00
bunnie
64f008b4fa add debugging facilities to gam 2022-06-07 16:28:26 +08:00
bunnie
741a6ab45e fix dynamic resize redraw bug
for some reason I was setting the state of a canvas to not drawable
when the clip rectangle was being reset, causing dynamic dialog boxes
to become static if the content inside changes size.

I think this is an artifact of a previous generation of this code,
so commenting that out, but left a breadcrumb is case I'm wrong.
2022-06-07 16:27:16 +08:00
bunnie
4f915cd4df Merge branch 'main' into u2f 2022-06-07 14:56:42 +08:00
bunnie
2f096c1435 remove kernel Cargo.lock file
This is no longer  used since we moved to a monorepo. This also
removes some stale dependencies.
2022-06-07 14:10:54 +08:00
bunnie
f614b70cda remove stale version of regex from cargo.lock
this version has a security vulnerability, but is not used
anywhere in the build. removing.
2022-06-07 14:08:13 +08:00
bunnie
aad8391a3e remove stale crossbeam-utils entry from Cargo.lock
unused lock dependency refers to a vulnerable version of
crossbeam-utils.
2022-06-07 14:06:01 +08:00
bunnie
09a968ef09 remove debug-here dependency
this contains a dependency to `failure` two levels down that has a critical
vulnerability. Unfortunately no new versions of debug-here have been
published in a while. It's no longer used, so just stripping it out
altogether.
2022-06-07 14:00:25 +08:00
bunnie
ba874a653e make the rawserial path queue up to 128 characters if getchar() isn't live 2022-06-07 13:03:49 +08:00
bunnie
51be4700ee improve UX for FIDO2 and try to ferret out FIDO2 test problems. 2022-06-07 03:56:52 +08:00
bunnie
d92974df5a reduce binary size. turns out debug symbols aren't free. 2022-06-06 23:49:42 +08:00
bunnie
d61732a3aa add note to self about not updating the hex dependency in the tests for crypto libraries 2022-06-06 22:55:19 +08:00
bunnie
6be6537194 fix dependency for tests to work 2022-06-06 22:54:48 +08:00
bunnie
b0c7895e81 add total use count to statistics stored on auth keys 2022-06-06 22:45:57 +08:00
bunnie
5877509a28 fix change to buildpush, it wasn't supposed to be committed 2022-06-06 19:10:34 +08:00
bunnie
cc6382df10 revert rawserial feature on keyboard 2022-06-06 19:09:10 +08:00
bunnie
052c63aea3 why do these old files keep creeping in after a merge... 2022-06-06 19:05:53 +08:00
bunnie
848df39d72 Merge branch 'u2f' into main 2022-06-06 19:04:58 +08:00
bunnie
90e0ed4b13 bump release notes 2022-06-06 19:04:30 +08:00
bunnie
509a16399a revert opt-level in Cargo.toml 2022-06-06 19:02:09 +08:00
bunnie
a78cb670ba update lockfile 2022-06-06 19:01:08 +08:00
bunnie
86a1f9741e add UX flow for U2F transactions: register app name and display it
this allows users to know what exactly they are approving.
2022-06-06 19:00:43 +08:00
bunnie
6c94e61ab6 make hosted mode "happy" when running with HID calls 2022-06-06 19:00:19 +08:00
bunnie
66dc39c2a8 pddb sync does not require the handle to be mutable 2022-06-06 18:25:33 +08:00