From f5fdcf7d5badeee9ee673392feae19f6386c228a Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 11 Mar 2024 18:18:37 +0800 Subject: [PATCH] lock rootkeys into a particular version of the dalek crates + cooperative release of hw accelerator the cooperative release is THE problem that we need to discuss. --- services/root-keys/Cargo.toml | 6 +++--- services/root-keys/src/main.rs | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/services/root-keys/Cargo.toml b/services/root-keys/Cargo.toml index 95a08319e..2c96e9812 100644 --- a/services/root-keys/Cargo.toml +++ b/services/root-keys/Cargo.toml @@ -65,13 +65,13 @@ keyboard = { path = "../keyboard" } sha2 = { version = "0.10.8" } digest = "0.10.7" aes = { path = "../aes" } -engine-25519 = { path = "../engine-25519" } -byteorder = "1.4.3" # used by keywrap +# engine-25519 = { path = "../engine-25519" } +byteorder = "1.4.3" # used by keywrap # hardware acceleration adaptations are inserted into a fork of the main branch. hex = { version = "0.4.3", default-features = false, features = [] } [dependencies.curve25519-dalek] -version = "=4.1.1" # note this is patched to our fork in ./Cargo.toml +version = "=4.1.1" # note this is patched to our fork in ./Cargo.toml default-features = false [dependencies.ed25519-dalek] diff --git a/services/root-keys/src/main.rs b/services/root-keys/src/main.rs index 933b48378..f8826ff47 100644 --- a/services/root-keys/src/main.rs +++ b/services/root-keys/src/main.rs @@ -2382,6 +2382,8 @@ fn main() -> ! { log::error!("couldn't convert opcode"); } } + // de-allocate the engine at the end of root-keys, so other crates can use it. + curve25519_dalek::backend::serial::u32e::free_engine(); } // clean up our program log::trace!("main loop exit, destroying servers");