xous-core/services/root-keys/Cargo.toml

113 lines
3.5 KiB
TOML
Raw Permalink Normal View History

[package]
name = "root-keys"
version = "0.1.0"
authors = ["bunnie <bunnie@kosagi.com>"]
edition = "2018"
description = "Xous root keys server"
2022-06-10 13:36:53 +00:00
# Dependency versions enforced by Cargo.lock.
[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" }
log = "0.4.14"
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
trng = { path = "../trng" }
spinor = { path = "../spinor" }
llio = { path = "../llio" }
com = { path = "../com" }
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" }
2026-01-29 11:12:00 +00:00
xous-ipc = "0.10.10"
num-derive = { version = "0.4.1", default-features = false }
num-traits = { version = "0.2.14", default-features = false }
rkyv = { version = "0.8.8", default-features = false, features = [
"std",
"alloc",
] }
2024-02-08 06:02:58 +00:00
zeroize = { version = "1.7.0", features = ["zeroize_derive"] }
rand_core = "0.6.4"
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
cipher = "0.4.3"
blowfish = { version = "0.9.1", features = ["bcrypt"] }
2021-08-02 20:58:34 +00:00
# password modals - keep them in this crate to minimize plaintext password manipulations
gam = { path = "../gam" }
locales = { path = "../../locales" }
# non-password modals are outsourced to a common crate
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
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
jtag = { path = "../jtag" }
2021-08-10 12:02:29 +00:00
# for text to speech support
tts-frontend = { path = "../tts" }
# backups
aes-gcm-siv = { version = "0.11.1", default-features = false, features = [
"alloc",
"aes",
] }
#aes-gcm-siv = {git="https://github.com/RustCrypto/AEADs.git", branch="master"}
subtle = { version = "2.4.1", default-features = false }
usb-device-xous = { path = "../usb-device-xous" }
keyboard = { path = "../keyboard" }
2021-08-02 20:58:34 +00:00
# private keys
#sha2 = {version = "0.9.5", default-features = false, features = []}
2024-01-31 17:42:18 +00:00
sha2 = { version = "0.10.8" }
digest = "0.10.7"
aes = { path = "../aes" }
# 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.
hex = { version = "0.4.3", default-features = false, features = [] }
2021-08-02 20:58:34 +00:00
[dependencies.curve25519-dalek]
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
features = ["auto-release", "warn-fallback"]
2021-08-02 20:58:34 +00:00
[dependencies.ed25519-dalek]
version = "2.1.0"
2021-08-02 20:58:34 +00:00
#path = "../../../ed25519-dalek"
default-features = false
features = ["rand_core", "digest"]
2021-08-02 20:58:34 +00:00
[features]
vexii-test = ["aes/vexii-test"]
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"]
renode = ["utralib/renode", "sha2/renode", "keystore-api/renode", "aes/renode"]
policy-menu = [
2025-05-04 10:34:01 +00:00
"keystore-api/policy-menu",
] # 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
tts = []
2025-05-04 10:34:01 +00:00
efuse = ["keystore-api/efuse"]
2021-08-18 20:22:28 +00:00
default = []
[lib]
test = true
[[bin]]
name = "root-keys"
test = false