2021-07-19 17:59:52 +00:00
[ package ]
2021-07-21 11:47:09 +00:00
name = "root-keys"
2021-07-19 17:59:52 +00:00
version = "0.1.0"
authors = [ "bunnie <bunnie@kosagi.com>" ]
edition = "2018"
2021-07-21 11:47:09 +00:00
description = "Xous root keys server"
2021-07-19 17:59:52 +00:00
2022-06-10 13:36:53 +00:00
# Dependency versions enforced by Cargo.lock.
2021-07-19 17:59:52 +00:00
[ dependencies ]
2026-01-29 11:12:00 +00:00
xous = "0.9.70"
log-server = { package = "xous-api-log" , version = "0.1.69" }
ticktimer-server = { package = "xous-api-ticktimer" , version = "0.9.70" }
xous-names = { package = "xous-api-names" , version = "0.9.71" }
2022-01-10 07:39:55 +00:00
log = "0.4.14"
2026-01-27 16:36:05 +00:00
susres = { path = "../../api/xous-api-susres" , package = "xous-api-susres" }
2024-01-14 16:14:39 +00:00
trng = { path = "../trng" }
spinor = { path = "../spinor" }
llio = { path = "../llio" }
com = { path = "../com" }
2025-10-06 05:17:21 +00:00
xous-semver = "0.1.5"
2026-01-29 11:12:00 +00:00
utralib = { version = "0.1.27" , optional = true , default-features = false }
2025-02-17 10:25:40 +00:00
blitstr2 = { path = "../../libs/blitstr2" }
2025-05-04 10:34:01 +00:00
keystore-api = { path = "../../libs/keystore-api" }
2025-05-11 04:34:17 +00:00
precursor-hal = { path = "../../libs/precursor-hal" }
2021-07-21 11:47:09 +00:00
2026-01-29 11:12:00 +00:00
xous-ipc = "0.10.10"
2024-02-04 20:12:36 +00:00
num-derive = { version = "0.4.1" , default-features = false }
2024-01-14 16:14:39 +00:00
num-traits = { version = "0.2.14" , default-features = false }
2024-09-22 06:19:32 +00:00
rkyv = { version = "0.8.8" , default-features = false , features = [
"std" ,
"alloc" ,
2024-01-14 16:14:39 +00:00
] }
2024-02-08 06:02:58 +00:00
zeroize = { version = "1.7.0" , features = [ "zeroize_derive" ] }
2024-02-04 20:12:36 +00:00
rand_core = "0.6.4"
2021-07-21 11:47:09 +00:00
2024-01-14 16:14:39 +00:00
aes-kw = { version = "0.2.1" , features = [ "alloc" ] }
hotfix for incorrect AES-KWP implementation
The crate we originally grabbed for AES-KWP seems to be non-compliant
(or I'm an idiot and I can't figure out how to call it in a way
that is compliant).
See https://github.com/jedisct1/rust-aes-keywrap/issues/9
Turns out that `aes_kw` *is* compliant, but unfortunately, it didn't
exist back when the PDDB was being written. The PDDB started in October
2021, and `aes_kw` was pushed in Jan 2022. *just* barely missed it.
Anyways, caught this error while trying to implement some CI for
backups. Hurray for testing!
This patch removes the encryption path using the incorrect version
of the algorithm, but leaves the decryption path in place. The
system will try to decrypt initially with the correct version,
but if that fails, it will fall back and try the incorrect version.
If that succeeds, it returns an error code with the correct key and
an updated wrapped key, which the caller can store so that future
calls do not fail. Thus, we have a seamless migration from the
incorrect version to the correct version.
Have verified that the aes_kw version *does* work with the CI
script, insofar as it has been written (we just got to that point
and got stuck). So, full speed ahead. Users shouldn't notice this
change.
Also, fwiw, I did take a look at the "incorrect" implementation,
and it doesn't look obviously insecure. Printing out the various
rounds of the wrapping function looks like the first couple rounds
match, but it diverges somewhere probably due to an off-by-one
in a counter or something like that. I didn't chase it out -- just
wanted to make sure that nothing looked like a huge data compromise.
Good news is this comes right on the heels of v0.9.9 release, so
this will be pushed as a hotfix right away.
2022-07-24 18:56:20 +00:00
2021-08-02 20:58:34 +00:00
# bcrypt
2022-05-29 20:33:16 +00:00
cipher = "0.4.3"
2024-02-08 05:59:26 +00:00
blowfish = { version = "0.9.1" , features = [ "bcrypt" ] }
2021-07-19 17:59:52 +00:00
2021-08-02 20:58:34 +00:00
# password modals - keep them in this crate to minimize plaintext password manipulations
2024-01-14 16:14:39 +00:00
gam = { path = "../gam" }
locales = { path = "../../locales" }
2022-01-16 19:30:09 +00:00
# non-password modals are outsourced to a common crate
2024-01-14 16:14:39 +00:00
modals = { path = "../modals" }
2021-07-21 19:04:16 +00:00
2021-08-02 20:58:34 +00:00
# to access font maps for signing verification
2025-02-21 09:48:48 +00:00
ux-api = { path = "../../libs/ux-api" }
2021-08-02 20:58:34 +00:00
2021-08-10 12:02:29 +00:00
# for reboots and fuse operations
2024-01-14 16:14:39 +00:00
jtag = { path = "../jtag" }
2021-08-10 12:02:29 +00:00
2022-03-10 10:05:33 +00:00
# for text to speech support
2024-01-14 16:14:39 +00:00
tts-frontend = { path = "../tts" }
2022-03-10 10:05:33 +00:00
2022-07-11 19:32:33 +00:00
# backups
2024-01-14 16:14:39 +00:00
aes-gcm-siv = { version = "0.11.1" , default-features = false , features = [
"alloc" ,
"aes" ,
] }
2022-08-01 07:44:16 +00:00
#aes-gcm-siv = {git="https://github.com/RustCrypto/AEADs.git", branch="master"}
2024-01-14 16:14:39 +00:00
subtle = { version = "2.4.1" , default-features = false }
usb-device-xous = { path = "../usb-device-xous" }
keyboard = { path = "../keyboard" }
2022-07-11 19:32:33 +00:00
2021-08-02 20:58:34 +00:00
# private keys
2021-08-08 20:40:33 +00:00
#sha2 = {version = "0.9.5", default-features = false, features = []}
2024-01-31 17:42:18 +00:00
sha2 = { version = "0.10.8" }
2024-02-04 20:12:36 +00:00
digest = "0.10.7"
2024-01-14 16:14:39 +00:00
aes = { path = "../aes" }
2024-03-11 10:18:37 +00:00
# engine-25519 = { path = "../engine-25519" }
byteorder = "1.4.3" # used by keywrap
2021-08-02 20:58:34 +00:00
# hardware acceleration adaptations are inserted into a fork of the main branch.
2024-01-14 16:14:39 +00:00
hex = { version = "0.4.3" , default-features = false , features = [ ] }
2023-02-25 17:01:30 +00:00
2021-08-02 20:58:34 +00:00
[ dependencies . curve25519-dalek ]
2024-03-28 08:15:29 +00:00
version = "=4.1.2" # note this is patched to our fork in ./Cargo.toml
2021-08-02 20:58:34 +00:00
default-features = false
2025-05-11 04:45:29 +00:00
features = [ "auto-release" , "warn-fallback" ]
2021-08-02 20:58:34 +00:00
[ dependencies . ed25519-dalek ]
2024-02-04 20:12:36 +00:00
version = "2.1.0"
2021-08-02 20:58:34 +00:00
#path = "../../../ed25519-dalek"
default-features = false
2024-02-07 14:41:57 +00:00
features = [ "rand_core" , "digest" ]
2021-08-02 20:58:34 +00:00
2021-07-19 17:59:52 +00:00
[ features ]
2025-07-21 11:02:21 +00:00
vexii-test = [ "aes/vexii-test" ]
2025-09-07 03:50:12 +00:00
precursor = [
"utralib/precursor" ,
"sha2/precursor" ,
"keystore-api/precursor" ,
"aes/precursor" ,
]
2025-05-04 10:34:01 +00:00
hosted = [ "utralib/hosted" , "sha2/hosted" , "keystore-api/hosted" ]
2025-09-07 03:50:12 +00:00
renode = [ "utralib/renode" , "sha2/renode" , "keystore-api/renode" , "aes/renode" ]
2024-01-14 16:14:39 +00:00
policy-menu = [
2025-05-04 10:34:01 +00:00
"keystore-api/policy-menu" ,
2024-01-14 16:14:39 +00:00
] # provisions for users to set their password retention policies (on the block for deprecation) (note: to re-enable you need to add "rootkeys menu" to the tokens.rs in the GAM)
hazardous-debug = [
] # this feature enables the printing of secret materials for debug purposes
2022-03-10 10:05:33 +00:00
tts = [ ]
2025-05-04 10:34:01 +00:00
efuse = [ "keystore-api/efuse" ]
2021-08-18 20:22:28 +00:00
default = [ ]
2021-07-30 07:28:47 +00:00
[ lib ]
test = true
[ [ bin ] ]
name = "root-keys"
2024-01-14 16:14:39 +00:00
test = false