From 73b0b44a3054c1e90240ededd9f76c4b7f54aef4 Mon Sep 17 00:00:00 2001 From: Arthur Gautier Date: Mon, 21 Oct 2024 09:29:29 -0700 Subject: [PATCH] cms: use aes-kw pre-release --- Cargo.lock | 94 ++++++++++---------------------------------------- Cargo.toml | 8 +++++ cms/Cargo.toml | 4 +-- 3 files changed, 29 insertions(+), 77 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b36dc3af9..588d739c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,18 +23,7 @@ version = "0.6.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5f451b77e2f92932dc411da6ef9f3d33efad68a6f14a7a83e559453458e85ac" dependencies = [ - "crypto-common 0.2.0-rc.1", -] - -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher 0.4.4", - "cpufeatures", + "crypto-common", ] [[package]] @@ -44,7 +33,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7856582c758ade85d71daf27ec6bcea6c1c73913692b07b8dffea2dc03531c9" dependencies = [ "cfg-if", - "cipher 0.5.0-pre.7", + "cipher", "cpufeatures", ] @@ -55,8 +44,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cce27af05d45b901bb28da33ff8b2b2b2044f595b24fc0f36d4882dae91d484" dependencies = [ "aead", - "aes 0.9.0-pre.2", - "cipher 0.5.0-pre.7", + "aes", + "cipher", "ctr", "ghash", "subtle", @@ -64,11 +53,11 @@ dependencies = [ [[package]] name = "aes-kw" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69fa2b352dcefb5f7f3a5fb840e02665d311d878955380515e4fd50095dd3d8c" +version = "0.3.0-pre" +source = "git+https://github.com/RustCrypto/key-wraps.git#c9437ce4933822252863fd64fc06c631405ad8b1" dependencies = [ - "aes 0.8.4", + "aes", + "const-oid", ] [[package]] @@ -292,7 +281,7 @@ version = "0.2.0-pre.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0729a0a8422deb6056b8fcd89c42b724fe27e69458fa006f00c63cbffffd91b" dependencies = [ - "cipher 0.5.0-pre.7", + "cipher", ] [[package]] @@ -328,24 +317,14 @@ dependencies = [ "half", ] -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common 0.1.6", - "inout 0.1.3", -] - [[package]] name = "cipher" version = "0.5.0-pre.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b1425e6ce000f05a73096556cabcfb6a10a3ffe3bb4d75416ca8f00819c0b6a" dependencies = [ - "crypto-common 0.2.0-rc.1", - "inout 0.2.0-rc.1", + "crypto-common", + "inout", ] [[package]] @@ -391,12 +370,12 @@ dependencies = [ name = "cms" version = "0.3.0-pre.0" dependencies = [ - "aes 0.9.0-pre.2", + "aes", "aes-kw", "ansi-x963-kdf", "async-signature", "cbc", - "cipher 0.5.0-pre.7", + "cipher", "const-oid", "der", "ecdsa", @@ -505,16 +484,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - [[package]] name = "crypto-common" version = "0.2.0-rc.1" @@ -532,7 +501,7 @@ version = "0.10.0-pre.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77e1482d284b80d7fddb211666d513dc5e23b0cc3a03ad398ff70543827c789f" dependencies = [ - "cipher 0.5.0-pre.7", + "cipher", ] [[package]] @@ -586,7 +555,7 @@ version = "0.9.0-pre.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76239c731adb4b5204cfeec47bd06ec1071d9477a0d32bbb83dc7d8c599efe63" dependencies = [ - "cipher 0.5.0-pre.7", + "cipher", ] [[package]] @@ -597,7 +566,7 @@ checksum = "cf2e3d6615d99707295a9673e889bf363a04b2a466bd320c65a72536f7577379" dependencies = [ "block-buffer", "const-oid", - "crypto-common 0.2.0-rc.1", + "crypto-common", "subtle", ] @@ -781,16 +750,6 @@ dependencies = [ "slab", ] -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - [[package]] name = "getrandom" version = "0.2.15" @@ -911,15 +870,6 @@ dependencies = [ "hashbrown", ] -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", -] - [[package]] name = "inout" version = "0.2.0-rc.1" @@ -1168,7 +1118,7 @@ dependencies = [ name = "pkcs5" version = "0.8.0-rc.2" dependencies = [ - "aes 0.9.0-pre.2", + "aes", "aes-gcm", "cbc", "der", @@ -1494,7 +1444,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1affa54a576c40080654b494bb3f3198fa2fe46e0954b85196d122e3561c2fd0" dependencies = [ "cfg-if", - "cipher 0.5.0-pre.7", + "cipher", ] [[package]] @@ -1893,7 +1843,7 @@ version = "0.6.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3517d72c5ca6d60f9f2e85d2c772e2652830062a685105a528d19dd823cf87d5" dependencies = [ - "crypto-common 0.2.0-rc.1", + "crypto-common", "subtle", ] @@ -1903,12 +1853,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - [[package]] name = "wait-timeout" version = "0.2.0" diff --git a/Cargo.toml b/Cargo.toml index 85cc8f141..7aaa419e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,3 +58,11 @@ tls_codec_derive = { path = "./tls_codec/derive" } x509-tsp = { path = "./x509-tsp" } x509-cert = { path = "./x509-cert" } x509-ocsp = { path = "./x509-ocsp" } + +# https://github.com/RustCrypto/key-wraps/pull/34 +# https://github.com/RustCrypto/key-wraps/pull/35 +aes-kw = { git = "https://github.com/RustCrypto/key-wraps.git" } + +# https://github.com/RustCrypto/KDFs/pull/102 +ansi-x963-kdf = { git = "https://github.com/RustCrypto/KDFs.git" } + diff --git a/cms/Cargo.toml b/cms/Cargo.toml index f35f0a67d..ff8650d40 100644 --- a/cms/Cargo.toml +++ b/cms/Cargo.toml @@ -22,8 +22,8 @@ x509-cert = { version = "=0.3.0-pre.0", default-features = false } # optional dependencies aes = { version = "=0.9.0-pre.2", optional = true } -aes-kw = { version ="0.2.1", optional = true } -ansi-x963-kdf = { git = "https://github.com/RustCrypto/KDFs.git", version = "0.1.0", optional = true } +aes-kw = { version ="=0.3.0-pre", optional = true } +ansi-x963-kdf = { version = "0.1.0", optional = true } async-signature = { version = "=0.6.0-pre.4", features = ["digest", "rand_core"], optional = true } cbc = { version = "=0.2.0-pre.2", optional = true } cipher = { version = "=0.5.0-pre.7", features = ["alloc", "block-padding", "rand_core"], optional = true }