diff --git a/Cargo.lock b/Cargo.lock index 629469b8..3c9010ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -46,6 +46,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" +[[package]] +name = "base16ct" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b59d472eab27ade8d770dcb11da7201c11234bef9f82ce7aa517be028d462b" + [[package]] name = "base64ct" version = "1.8.0" @@ -85,8 +91,7 @@ checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" [[package]] name = "block-buffer" version = "0.11.0-rc.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a229bfd78e4827c91b9b95784f69492c1b77c1ab75a45a8a037b139215086f94" +source = "git+https://github.com/RustCrypto/utils#adfccfea2686ef191b607f653cc3587753b6ec66" dependencies = [ "hybrid-array", ] @@ -261,14 +266,13 @@ checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" [[package]] name = "crypto-bigint" -version = "0.7.0-rc.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "737a2363b81de8cc95d8780d84aecb4b3c6f41e4473759da6636072b5514c875" +version = "0.7.0-rc.2" +source = "git+https://github.com/RustCrypto/crypto-bigint#60047823b17a8400969dca71416a363e71c74a03" dependencies = [ "hybrid-array", "num-traits", "rand_core 0.9.3", - "serdect", + "serdect 0.4.1", "subtle", "zeroize", ] @@ -276,8 +280,7 @@ dependencies = [ [[package]] name = "crypto-common" version = "0.2.0-rc.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a23fa214dea9efd4dacee5a5614646b30216ae0f05d4bb51bafb50e9da1c5be" +source = "git+https://github.com/RustCrypto/traits#b91704f633a83798c1ba89f908cff067ddc7d843" dependencies = [ "hybrid-array", ] @@ -328,8 +331,7 @@ dependencies = [ [[package]] name = "digest" version = "0.11.0-rc.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "460dd7f37e4950526b54a5a6b1f41b6c8e763c58eb9a8fc8fc05ba5c2f44ca7b" +source = "git+https://github.com/RustCrypto/traits#b91704f633a83798c1ba89f908cff067ddc7d843" dependencies = [ "block-buffer", "const-oid", @@ -367,7 +369,7 @@ dependencies = [ "elliptic-curve", "hex-literal 1.0.0", "rfc6979", - "serdect", + "serdect 0.3.0", "sha2", "signature", "spki", @@ -410,10 +412,9 @@ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "elliptic-curve" version = "0.14.0-rc.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02a716b7c32bccdb9c70c78ecdc1e4188f2a76d3ee7d98f404e26b3be8550861" +source = "git+https://github.com/RustCrypto/traits#b91704f633a83798c1ba89f908cff067ddc7d843" dependencies = [ - "base16ct", + "base16ct 0.3.0", "crypto-bigint", "digest", "ff", @@ -424,7 +425,7 @@ dependencies = [ "pkcs8", "rand_core 0.9.3", "sec1", - "serdect", + "serdect 0.4.1", "subtle", "zeroize", ] @@ -553,9 +554,9 @@ dependencies = [ [[package]] name = "hybrid-array" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891d15931895091dea5c47afa5b3c9a01ba634b311919fd4d41388fa0e3d76af" +checksum = "6fe39a812f039072707ce38020acbab2f769087952eddd9e2b890f37654b2349" dependencies = [ "typenum", "zeroize", @@ -564,8 +565,7 @@ dependencies = [ [[package]] name = "inout" version = "0.2.0-rc.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c774c86bce20ea04abe1c37cf0051c5690079a3a28ef5fdac2a5a0412b3d7d74" +source = "git+https://github.com/RustCrypto/utils#adfccfea2686ef191b607f653cc3587753b6ec66" dependencies = [ "hybrid-array", ] @@ -1039,13 +1039,12 @@ dependencies = [ [[package]] name = "sec1" version = "0.8.0-rc.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c54dee398d74b1d03d78ddc09c90e456bf906b5b7aa790ba4f48b025b2179e5d" +source = "git+https://github.com/RustCrypto/formats?branch=sec1%2Fhybrid-array-v0.4#fdc1f293f71bfbbee5e89997b1ec17b13e632c61" dependencies = [ - "base16ct", + "base16ct 0.3.0", "der", "hybrid-array", - "serdect", + "serdect 0.4.1", "subtle", "zeroize", ] @@ -1097,7 +1096,17 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f42f67da2385b51a5f9652db9c93d78aeaf7610bf5ec366080b6de810604af53" dependencies = [ - "base16ct", + "base16ct 0.2.0", + "serde", +] + +[[package]] +name = "serdect" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3ef0e35b322ddfaecbc60f34ab448e157e48531288ee49fafbb053696b8ffe2" +dependencies = [ + "base16ct 0.3.0", "serde", ] diff --git a/Cargo.toml b/Cargo.toml index 79c5444c..783f11a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,3 +25,18 @@ lms-signature = { path = "./lms" } ml-dsa = { path = "./ml-dsa" } rfc6979 = { path = "./rfc6979" } slh-dsa = { path = "./slh-dsa" } + +# https://github.com/RustCrypto/utils/pull/1208 +block-buffer = { git = "https://github.com/RustCrypto/utils" } +# https://github.com/RustCrypto/crypto-bigint/pull/934 +crypto-bigint = { git = "https://github.com/RustCrypto/crypto-bigint" } +# https://github.com/RustCrypto/traits/pull/1976 +crypto-common = { git = "https://github.com/RustCrypto/traits" } +# https://github.com/RustCrypto/traits/pull/1976 +digest = { git = "https://github.com/RustCrypto/traits" } +# https://github.com/RustCrypto/traits/pull/1976 +elliptic-curve = { git = "https://github.com/RustCrypto/traits" } +# https://github.com/RustCrypto/formats/pull/2015 +sec1 = { git = "https://github.com/RustCrypto/formats", branch = "sec1/hybrid-array-v0.4" } +# https://github.com/RustCrypto/utils/pull/1208 +inout = { git = "https://github.com/RustCrypto/utils" } diff --git a/lms/Cargo.toml b/lms/Cargo.toml index 26e85f6b..69d72544 100644 --- a/lms/Cargo.toml +++ b/lms/Cargo.toml @@ -13,7 +13,7 @@ keywords = ["crypto", "signature"] [dependencies] digest = "0.11.0-rc.0" -hybrid-array = { version = "0.3", features = ["extra-sizes", "zeroize"] } +hybrid-array = { version = "0.4", features = ["extra-sizes", "zeroize"] } rand = "0.9.0" sha2 = "0.11.0-rc.0" static_assertions = "1.1.0" diff --git a/ml-dsa/Cargo.toml b/ml-dsa/Cargo.toml index 5b48353d..b20d71e1 100644 --- a/ml-dsa/Cargo.toml +++ b/ml-dsa/Cargo.toml @@ -32,7 +32,7 @@ alloc = ["pkcs8?/alloc"] pkcs8 = ["dep:const-oid", "dep:pkcs8"] [dependencies] -hybrid-array = { version = "0.3", features = ["extra-sizes"] } +hybrid-array = { version = "0.4", features = ["extra-sizes"] } num-traits = { version = "0.2.19", default-features = false } rand_core = { version = "0.9", optional = true } sha3 = "0.11.0-rc.0" diff --git a/ml-dsa/tests/proptests.rs b/ml-dsa/tests/proptests.rs index f513873e..c80f1c63 100644 --- a/ml-dsa/tests/proptests.rs +++ b/ml-dsa/tests/proptests.rs @@ -1,3 +1,4 @@ +use hybrid_array::AsArrayRef; use ml_dsa::{ KeyGen, KeyPair, MlDsa44, MlDsa65, MlDsa87, Signature, signature::{Signer, Verifier}, @@ -10,17 +11,17 @@ const MSG: &[u8] = b"Hello world"; // Keypairs prop_compose! { fn mldsa44_keypair()(seed_bytes in any::<[u8; 32]>()) -> KeyPair { - MlDsa44::key_gen_internal(seed_bytes.as_ref()) + MlDsa44::key_gen_internal(seed_bytes.as_array_ref()) } } prop_compose! { fn mldsa65_keypair()(seed_bytes in any::<[u8; 32]>()) -> KeyPair { - MlDsa65::key_gen_internal(seed_bytes.as_ref()) + MlDsa65::key_gen_internal(seed_bytes.as_array_ref()) } } prop_compose! { fn mldsa87_keypair()(seed_bytes in any::<[u8; 32]>()) -> KeyPair { - MlDsa87::key_gen_internal(seed_bytes.as_ref()) + MlDsa87::key_gen_internal(seed_bytes.as_array_ref()) } } diff --git a/slh-dsa/Cargo.toml b/slh-dsa/Cargo.toml index 738c99a1..9839bb10 100644 --- a/slh-dsa/Cargo.toml +++ b/slh-dsa/Cargo.toml @@ -16,7 +16,7 @@ keywords = ["crypto", "signature"] exclude = ["tests"] [dependencies] -hybrid-array = { version = "0.3", features = ["extra-sizes"] } +hybrid-array = { version = "0.4", features = ["extra-sizes"] } typenum = { version = "1.17.0", features = ["const-generics"] } sha3 = { version = "0.11.0-rc.0", default-features = false } zerocopy = { version = "0.7.34", features = ["derive"] }