From bfc7e7acbc8615cc7702804bf6cde1123bf92022 Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 11 Mar 2024 18:16:51 +0800 Subject: [PATCH 1/8] point dalek backend --- .cargo/config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.cargo/config b/.cargo/config index afa361c65..58625288e 100644 --- a/.cargo/config +++ b/.cargo/config @@ -15,3 +15,6 @@ rustflags = ["--cfg", "crossbeam_no_atomic_64"] # "-C", "link-arg=-shared", # "--cfg", "crossbeam_no_atomic_64" # ] + +[target.riscv32imac-unknown-xous-elf] +rustflags = ["--cfg", 'curve25519_dalek_backend="u32e_backend"'] \ No newline at end of file From 04abd3f33181dde7d2b787472a07f7d5082ec15a Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 11 Mar 2024 18:17:07 +0800 Subject: [PATCH 2/8] remove engine25519 from list of crates to be built --- xtask/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xtask/src/main.rs b/xtask/src/main.rs index f812cad08..67ad6b920 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -99,7 +99,7 @@ fn main() -> Result<(), Box> { "root-keys", "trng", "sha2@0.10.8", - "engine-25519", + // "engine-25519", "jtag", // GUI front end "status", From 3bcc0dcd88828edfe99aba6f13ae0973567e0bfd Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 11 Mar 2024 18:17:42 +0800 Subject: [PATCH 3/8] split low-level engine verification routines into a feature flag to use these, one must include engine-25519 and also not use the curve25519-dalek native primitives. Probably what we *should* do is create some backend calls that allow us to queue up local jobs only for this sort of testing. --- services/shellchat/Cargo.toml | 9 +++++---- services/shellchat/src/cmds/engine.rs | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/services/shellchat/Cargo.toml b/services/shellchat/Cargo.toml index a6db1cfc8..d4f49f655 100644 --- a/services/shellchat/Cargo.toml +++ b/services/shellchat/Cargo.toml @@ -28,7 +28,7 @@ sha2 = { version = "0.10.8" } digest = "0.10.7" aes = { path = "../aes" } cipher = "0.4.4" -engine-25519 = { path = "../engine-25519" } +engine-25519 = { path = "../engine-25519", optional = true } spinor = { path = "../spinor" } root-keys = { path = "../root-keys" } jtag = { path = "../jtag" } @@ -105,13 +105,13 @@ version = "=4.1.1" # note this is patched to our fork in ./Cargo.toml default-features = false [dependencies.x25519-dalek] -version = "2.0.1" +version = "=2.0.1" # TODO: static_secrets is only needed by the engine tests. Ideally, we would put the static_secrets version in dev deps only default-features = false features = ["static_secrets"] [dependencies.ed25519-dalek] -version = "2.1.0" +version = "=2.1.0" #path = "../../../ed25519-dalek" default-features = false features = ["rand_core"] @@ -127,6 +127,7 @@ benchmarks = [ ] # adds the benchmark routines. Left off normally to free up code and memory space. hashtest = [] aestests = [] # adds AES tests +engine-ll = [] # low-level engine tests tts = [] # adds text to speech plugin pddbtest = ["rand_chacha"] autobasis = ["rand_chacha"] @@ -153,4 +154,4 @@ rand-api = [] locktests = [ ] # for debugging some specific `std` tests cherry-picked out of the test suite simple-tls = ["rustls", "webpki-roots"] -default = [] # "debugprint" +default = ["benchmarks"] # "debugprint" diff --git a/services/shellchat/src/cmds/engine.rs b/services/shellchat/src/cmds/engine.rs index 90bfe5359..03108d314 100644 --- a/services/shellchat/src/cmds/engine.rs +++ b/services/shellchat/src/cmds/engine.rs @@ -1,5 +1,6 @@ use core::sync::atomic::{AtomicU32, Ordering}; +#[cfg(feature = "engine-ll")] use engine_25519::*; use num_traits::*; use xous_ipc::String; @@ -27,9 +28,12 @@ pub(crate) enum BenchResult { DhDone, } +#[cfg(feature = "engine-ll")] const TEST_ITERS: usize = 10; +#[cfg(feature = "engine-ll")] const TEST_ITERS_DH: usize = 200; +#[cfg(feature = "engine-ll")] fn vector_read(word_offset: usize) -> u32 { let mut bytes: [u8; 4] = [0; 4]; for i in 0..4 { @@ -38,6 +42,7 @@ fn vector_read(word_offset: usize) -> u32 { u32::from_le_bytes(bytes) } +#[cfg(feature = "engine-ll")] fn run_vectors(engine: &mut Engine25519) -> (usize, usize) { let mut test_offset: usize = 0x0; let mut passes: usize = 0; @@ -129,6 +134,7 @@ benchmark notes: +59mA +/-1mA current draw off fully charged battery when running the benchmark 1246-1261ms/check vector iteration (10 iters total, 1450 vectors total) */ +#[cfg(feature = "engine-ll")] pub fn benchmark_thread(sid0: usize, sid1: usize, sid2: usize, sid3: usize) { let sid = xous::SID::from_u32(sid0 as u32, sid1 as u32, sid2 as u32, sid3 as u32); let xns = xous_names::XousNames::new().unwrap(); @@ -284,11 +290,13 @@ pub struct Engine { impl Engine { pub fn new(xns: &xous_names::XousNames, env: &mut CommonEnv) -> Self { let sid = xous::create_server().unwrap(); + #[cfg(feature = "engine-ll")] let sid_tuple = sid.to_u32(); let cb_id = env.register_handler(String::<256>::from_str("engine")); CB_ID.store(cb_id, Ordering::Relaxed); + #[cfg(feature = "engine-ll")] xous::create_thread_4( benchmark_thread, sid_tuple.0 as usize, @@ -299,6 +307,7 @@ impl Engine { .unwrap(); Engine { susres: susres::Susres::new_without_hook(&xns).unwrap(), + // this is a dummy and hangs if engine-ll is not an active feature benchmark_cid: xous::connect(sid).unwrap(), start_time: None, } @@ -317,12 +326,16 @@ impl<'a> ShellCmdApi<'a> for Engine { ) -> Result>, xous::Error> { use core::fmt::Write; let mut ret = String::<1024>::new(); + #[cfg(feature = "engine-ll")] let helpstring = "engine [check] [bench] [benchdh] [susres] [dh] [ed] [wycheproof]"; + #[cfg(not(feature = "engine-ll"))] + let helpstring = "engine [susres] [dh] [ed] [wycheproof]"; let mut tokens = args.as_str().unwrap().split(' '); if let Some(sub_cmd) = tokens.next() { match sub_cmd { + #[cfg(feature = "engine-ll")] "check" => { let mut engine = engine_25519::Engine25519::new(); log::debug!("running vectors"); @@ -330,6 +343,7 @@ impl<'a> ShellCmdApi<'a> for Engine { write!(ret, "Engine passed {} vectors, failed {} vectors", passes, fails).unwrap(); } + #[cfg(feature = "engine-ll")] "bench" => { let start = env.ticktimer.elapsed_ms(); self.start_time = Some(start); @@ -340,6 +354,7 @@ impl<'a> ShellCmdApi<'a> for Engine { .unwrap(); write!(ret, "Starting Engine hardware benchmark with {} iters", TEST_ITERS).unwrap(); } + #[cfg(feature = "engine-ll")] "benchdh" => { let start = env.ticktimer.elapsed_ms(); self.start_time = Some(start); @@ -364,13 +379,18 @@ impl<'a> ShellCmdApi<'a> for Engine { write!(ret, "Interrupted Engine hardware benchmark with a suspend/resume").unwrap(); } "dh" => { + log::info!("starting DH test"); use x25519_dalek::{EphemeralSecret, PublicKey}; let alice_secret = EphemeralSecret::random_from_rng(&mut env.trng); + log::info!("1"); let alice_public = PublicKey::from(&alice_secret); let bob_secret = EphemeralSecret::random_from_rng(&mut env.trng); let bob_public = PublicKey::from(&bob_secret); + log::info!("2"); let alice_shared_secret = alice_secret.diffie_hellman(&bob_public); + log::info!("3"); let bob_shared_secret = bob_secret.diffie_hellman(&alice_public); + log::info!("4"); let mut pass = true; for (&alice, &bob) in alice_shared_secret.as_bytes().iter().zip(bob_shared_secret.as_bytes().iter()) @@ -571,6 +591,8 @@ impl<'a> ShellCmdApi<'a> for Engine { } else { write!(ret, "{}", helpstring).unwrap(); } + // de-allocate the engine at the end of the test, so other processes can grab it + curve25519_dalek::backend::serial::u32e::free_engine(); Ok(Some(ret)) } From f5fdcf7d5badeee9ee673392feae19f6386c228a Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 11 Mar 2024 18:18:37 +0800 Subject: [PATCH 4/8] 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"); From cb4e5be5ae195819e83150b0aba26a29724c803c Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 11 Mar 2024 18:43:50 +0800 Subject: [PATCH 5/8] bring back the low level tests; remove dependency on engine-25519 --- services/shellchat/Cargo.toml | 2 - services/shellchat/src/cmds/engine.rs | 68 +++++++++------------------ 2 files changed, 21 insertions(+), 49 deletions(-) diff --git a/services/shellchat/Cargo.toml b/services/shellchat/Cargo.toml index d4f49f655..46100588d 100644 --- a/services/shellchat/Cargo.toml +++ b/services/shellchat/Cargo.toml @@ -28,7 +28,6 @@ sha2 = { version = "0.10.8" } digest = "0.10.7" aes = { path = "../aes" } cipher = "0.4.4" -engine-25519 = { path = "../engine-25519", optional = true } spinor = { path = "../spinor" } root-keys = { path = "../root-keys" } jtag = { path = "../jtag" } @@ -127,7 +126,6 @@ benchmarks = [ ] # adds the benchmark routines. Left off normally to free up code and memory space. hashtest = [] aestests = [] # adds AES tests -engine-ll = [] # low-level engine tests tts = [] # adds text to speech plugin pddbtest = ["rand_chacha"] autobasis = ["rand_chacha"] diff --git a/services/shellchat/src/cmds/engine.rs b/services/shellchat/src/cmds/engine.rs index 03108d314..f6c5379d0 100644 --- a/services/shellchat/src/cmds/engine.rs +++ b/services/shellchat/src/cmds/engine.rs @@ -28,12 +28,9 @@ pub(crate) enum BenchResult { DhDone, } -#[cfg(feature = "engine-ll")] const TEST_ITERS: usize = 10; -#[cfg(feature = "engine-ll")] const TEST_ITERS_DH: usize = 200; -#[cfg(feature = "engine-ll")] fn vector_read(word_offset: usize) -> u32 { let mut bytes: [u8; 4] = [0; 4]; for i in 0..4 { @@ -42,8 +39,13 @@ fn vector_read(word_offset: usize) -> u32 { u32::from_le_bytes(bytes) } -#[cfg(feature = "engine-ll")] -fn run_vectors(engine: &mut Engine25519) -> (usize, usize) { +fn run_vectors() -> (usize, usize) { + use curve25519_dalek::backend::serial::u32e::*; + ensure_engine(); + // safety: it's safe because it's after ensure_engine() + let ucode_hw = unsafe { get_ucode() }; + let rf_hw = unsafe { get_rf() }; + let mut test_offset: usize = 0x0; let mut passes: usize = 0; let mut fails: usize = 0; @@ -63,17 +65,9 @@ fn run_vectors(engine: &mut Engine25519) -> (usize, usize) { let num_vectors = (vector_read(test_offset) >> 0) & 0x3F_FFFF; test_offset += 1; - let mut job = Job { - id: None, - uc_start: load_addr, - uc_len: code_len, - ucode: [0; 1024], - rf: [0; RF_SIZE_IN_U32], - window: Some(window as u8), - }; - - for i in load_addr as usize..(load_addr + code_len) as usize { - job.ucode[i] = vector_read(test_offset); + let mut mcode = Vec::::new(); + for _i in load_addr as usize..(load_addr + code_len) as usize { + mcode.push(vector_read(test_offset) as i32); test_offset += 1; } @@ -84,32 +78,20 @@ fn run_vectors(engine: &mut Engine25519) -> (usize, usize) { // a test suite can have numerous vectors against a common code base for argcnt in 0..num_args { for word in 0..8 { - job.rf[(/* window * 32 * 8 + */argcnt * 8 + word) as usize] = vector_read(test_offset); + rf_hw[(window * 32 * 8 + argcnt * 8 + word) as usize] = vector_read(test_offset); test_offset += 1; } } let mut passed = true; log::trace!("spawning job"); - match engine.spawn_job(job) { - Ok(rf_result) => { - for word in 0..8 { - let expect = vector_read(test_offset); - test_offset += 1; - let actual = rf_result[(/* window * 32 * 8 + */31 * 8 + word) as usize]; - if expect != actual { - log::error!("e/a {:08x}/{:08x}", expect, actual); - passed = false; - } - } - } - Err(e) => { - log::error!( - "system error {:?} in running test vector: {}/0x{:x}", - e, - vector, - test_offset - ); + run_job(ucode_hw, rf_hw, &mcode, window as usize); + for word in 0..8 { + let expect = vector_read(test_offset); + test_offset += 1; + let actual = rf_hw[(window * 32 * 8 + 31 * 8 + word) as usize]; + if expect != actual { + log::error!("e/a {:08x}/{:08x}", expect, actual); passed = false; } } @@ -126,6 +108,7 @@ fn run_vectors(engine: &mut Engine25519) -> (usize, usize) { } } } + curve25519_dalek::backend::serial::u32e::free_engine(); (passes, fails) } /* @@ -134,14 +117,11 @@ benchmark notes: +59mA +/-1mA current draw off fully charged battery when running the benchmark 1246-1261ms/check vector iteration (10 iters total, 1450 vectors total) */ -#[cfg(feature = "engine-ll")] pub fn benchmark_thread(sid0: usize, sid1: usize, sid2: usize, sid3: usize) { let sid = xous::SID::from_u32(sid0 as u32, sid1 as u32, sid2 as u32, sid3 as u32); let xns = xous_names::XousNames::new().unwrap(); let callback_conn = xns.request_connection_blocking(crate::SERVER_NAME_SHELLCHAT).unwrap(); - let mut engine = engine_25519::Engine25519::new(); - let mut trng = trng::Trng::new(&xns).unwrap(); loop { @@ -152,7 +132,7 @@ pub fn benchmark_thread(sid0: usize, sid1: usize, sid2: usize, sid3: usize) { let mut passes = 0; let mut fails = 0; for _ in 0..TEST_ITERS { - let (p, f) = run_vectors(&mut engine); + let (p, f) = run_vectors(); passes += p; fails += f; } @@ -290,13 +270,11 @@ pub struct Engine { impl Engine { pub fn new(xns: &xous_names::XousNames, env: &mut CommonEnv) -> Self { let sid = xous::create_server().unwrap(); - #[cfg(feature = "engine-ll")] let sid_tuple = sid.to_u32(); let cb_id = env.register_handler(String::<256>::from_str("engine")); CB_ID.store(cb_id, Ordering::Relaxed); - #[cfg(feature = "engine-ll")] xous::create_thread_4( benchmark_thread, sid_tuple.0 as usize, @@ -335,15 +313,12 @@ impl<'a> ShellCmdApi<'a> for Engine { if let Some(sub_cmd) = tokens.next() { match sub_cmd { - #[cfg(feature = "engine-ll")] "check" => { - let mut engine = engine_25519::Engine25519::new(); log::debug!("running vectors"); - let (passes, fails) = run_vectors(&mut engine); + let (passes, fails) = run_vectors(); write!(ret, "Engine passed {} vectors, failed {} vectors", passes, fails).unwrap(); } - #[cfg(feature = "engine-ll")] "bench" => { let start = env.ticktimer.elapsed_ms(); self.start_time = Some(start); @@ -354,7 +329,6 @@ impl<'a> ShellCmdApi<'a> for Engine { .unwrap(); write!(ret, "Starting Engine hardware benchmark with {} iters", TEST_ITERS).unwrap(); } - #[cfg(feature = "engine-ll")] "benchdh" => { let start = env.ticktimer.elapsed_ms(); self.start_time = Some(start); From bc8eb4683392769a99e6f38514eafc91d93b30ac Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 11 Mar 2024 19:12:43 +0800 Subject: [PATCH 6/8] commit lock file --- Cargo.lock | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 476d6585c..0d95a1a63 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1151,25 +1151,24 @@ checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" [[package]] name = "curve25519-dalek" version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", "digest 0.10.7", - "fiat-crypto 0.2.6", + "engine25519-as", + "log", "platforms", "rustc_version 0.4.0", "subtle", + "utralib 0.1.24", + "xous 0.9.58 (registry+https://github.com/rust-lang/crates.io-index)", "zeroize", ] [[package]] name = "curve25519-dalek-derive" version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", @@ -1186,7 +1185,7 @@ dependencies = [ "digest 0.9.0", "engine-25519", "engine25519-as", - "fiat-crypto 0.1.20", + "fiat-crypto", "hex 0.4.3", "log", "packed_simd_2", @@ -1520,9 +1519,9 @@ checksum = "e18997d4604542d0736fae2c5ad6de987f0a50530cbcc14a7ce5a685328a252d" [[package]] name = "ed25519-dalek" -version = "2.1.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" dependencies = [ "curve25519-dalek", "ed25519 2.2.3", @@ -1813,12 +1812,6 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" -[[package]] -name = "fiat-crypto" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1676f435fc1dadde4d03e43f5d62b259e1ce5f40bd4ffb21db2b42ebe59c1382" - [[package]] name = "filetime" version = "0.2.23" @@ -4207,7 +4200,6 @@ dependencies = [ "curve25519-dalek", "digest 0.10.7", "ed25519-dalek", - "engine-25519", "gam", "graphics-server", "hex 0.4.3", @@ -4592,7 +4584,6 @@ dependencies = [ "digest 0.10.7", "dns", "ed25519-dalek", - "engine-25519", "gam", "graphics-server", "hex 0.4.3", From c121da07ac1dbe1df93eec4a7c405c52ffc7d899 Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 11 Mar 2024 19:12:50 +0800 Subject: [PATCH 7/8] cargo.toml points to local repo. should fix this before merge! --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6d2e91af7..9c8f8ffdd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -145,10 +145,10 @@ sha2_legacy = { git = "https://github.com/RustCrypto/hashes.git", tag = "sha2-v0 [patch.crates-io.aes] path = "services/aes" -#[patch.crates-io.curve25519-dalek] +[patch.crates-io.curve25519-dalek] #git = "https://github.com/betrusted-io/curve25519-dalek.git" #branch = "main" -#path = "../curve25519-dalek/curve25519-dalek" # when doing local dev work +path = "../curve25519-dalek/curve25519-dalek" # when doing local dev work # feature overrides are specified at the crate level [patch."https://github.com/betrusted-io/xous-engine-25519.git"] From 1cc0a7121b76b6f0d488f2e6abbdb3502fb804a2 Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 25 Mar 2024 07:08:27 +0800 Subject: [PATCH 8/8] Point curve25519 patch to the github version --- Cargo.lock | 11 +++-------- Cargo.toml | 6 +++--- services/root-keys/Cargo.toml | 2 +- services/shellchat/Cargo.toml | 2 +- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0d95a1a63..9424175c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1150,7 +1150,8 @@ checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" [[package]] name = "curve25519-dalek" -version = "4.1.1" +version = "4.1.2" +source = "git+https://github.com/betrusted-io/curve25519-dalek.git?branch=main#0fc7183a2a4c82a5ea575f56ca975cef46cd6398" dependencies = [ "cfg-if", "cpufeatures", @@ -1158,7 +1159,6 @@ dependencies = [ "digest 0.10.7", "engine25519-as", "log", - "platforms", "rustc_version 0.4.0", "subtle", "utralib 0.1.24", @@ -1169,6 +1169,7 @@ dependencies = [ [[package]] name = "curve25519-dalek-derive" version = "0.1.1" +source = "git+https://github.com/betrusted-io/curve25519-dalek.git?branch=main#0fc7183a2a4c82a5ea575f56ca975cef46cd6398" dependencies = [ "proc-macro2", "quote", @@ -3649,12 +3650,6 @@ version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" -[[package]] -name = "platforms" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" - [[package]] name = "plotters" version = "0.3.5" diff --git a/Cargo.toml b/Cargo.toml index 9c8f8ffdd..d1154d5d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -146,9 +146,9 @@ sha2_legacy = { git = "https://github.com/RustCrypto/hashes.git", tag = "sha2-v0 path = "services/aes" [patch.crates-io.curve25519-dalek] -#git = "https://github.com/betrusted-io/curve25519-dalek.git" -#branch = "main" -path = "../curve25519-dalek/curve25519-dalek" # when doing local dev work +git = "https://github.com/betrusted-io/curve25519-dalek.git" +branch = "main" +# path = "../curve25519-dalek/curve25519-dalek" # when doing local dev work # feature overrides are specified at the crate level [patch."https://github.com/betrusted-io/xous-engine-25519.git"] diff --git a/services/root-keys/Cargo.toml b/services/root-keys/Cargo.toml index 2c96e9812..2e6d47a1d 100644 --- a/services/root-keys/Cargo.toml +++ b/services/root-keys/Cargo.toml @@ -71,7 +71,7 @@ byteorder = "1.4.3" # used by keywrap 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.2" # note this is patched to our fork in ./Cargo.toml default-features = false [dependencies.ed25519-dalek] diff --git a/services/shellchat/Cargo.toml b/services/shellchat/Cargo.toml index 46100588d..6ca196f29 100644 --- a/services/shellchat/Cargo.toml +++ b/services/shellchat/Cargo.toml @@ -100,7 +100,7 @@ random-pick = { version = "1.2.16", optional = true } hex = { version = "0.4.3", default-features = false, features = [] } #sha2 = {version = "0.9.5", default-features = false, features = []} [dependencies.curve25519-dalek] -version = "=4.1.1" # note this is patched to our fork in ./Cargo.toml +version = "=4.1.2" # note this is patched to our fork in ./Cargo.toml default-features = false [dependencies.x25519-dalek]