diff --git a/dispatch/Cargo.toml b/dispatch/Cargo.toml index 131cbff..e045dba 100644 --- a/dispatch/Cargo.toml +++ b/dispatch/Cargo.toml @@ -19,6 +19,10 @@ trussed-core.workspace = true [features] default = [] std = ["delog/std"] +mldsa44 = [] +mldsa65 = [] +mldsa87 = [] + log-all = [] log-none = [] diff --git a/dispatch/src/types.rs b/dispatch/src/types.rs index a7fa6c7..bc3fae3 100644 --- a/dispatch/src/types.rs +++ b/dispatch/src/types.rs @@ -1,7 +1,16 @@ use ctaphid_app::{Command, Error}; use heapless_bytes::Bytes; -pub const MESSAGE_SIZE: usize = 7609; +// TODO: update ML-DSA to minimum necessary sizes +pub const MESSAGE_SIZE: usize = if cfg!(feature = "mldsa87") { + 20000 +} else if cfg!(feature = "mldsa65") { + 15000 +} else if cfg!(feature = "mldsa44") { + 10000 +} else { + 7609 +}; pub type Message = Bytes;