From 410b14cc9a34f17037456d9d8cc4a872056c2645 Mon Sep 17 00:00:00 2001 From: Arthur Gautier Date: Tue, 20 Feb 2024 00:03:31 -0800 Subject: [PATCH] bump dependencies to pre-releases --- .github/workflows/workspace.yml | 2 +- Cargo.lock | 266 +++++++++++++++----------------- Cargo.toml | 39 +++++ ssh-cipher/Cargo.toml | 16 +- ssh-cipher/src/lib.rs | 13 +- ssh-encoding/Cargo.toml | 4 +- ssh-encoding/tests/encode.rs | 2 +- ssh-key/Cargo.toml | 22 +-- ssh-key/src/lib.rs | 12 +- ssh-key/src/private/ed25519.rs | 2 +- ssh-key/src/signature.rs | 2 +- 11 files changed, 204 insertions(+), 176 deletions(-) diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index 49feb1a..f052504 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.69.0 + toolchain: 1.71.0 components: clippy - run: cargo clippy --all-features diff --git a/Cargo.lock b/Cargo.lock index 6f56ae5..6545787 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,19 +4,16 @@ version = 3 [[package]] name = "aead" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +version = "0.6.0-pre" +source = "git+https://github.com/RustCrypto/traits.git?branch=master#b2e31d8df293026390b6315c10844eed8b54a185" dependencies = [ "crypto-common", - "generic-array", ] [[package]] name = "aes" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +version = "0.9.0-pre" +source = "git+https://github.com/baloo/block-ciphers.git?branch=baloo/bump-cipher/0.5.0-pre.4#da25e2bd2cbf8d8fd04c4f99f07ba169d3b1756a" dependencies = [ "cfg-if", "cipher", @@ -25,9 +22,8 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +version = "0.11.0-pre" +source = "git+https://github.com/baloo/AEADs.git?branch=baloo/bump-cipher#00dbd8a8d15895a6df8759b2fbf7025b2c57eb52" dependencies = [ "aead", "aes", @@ -57,9 +53,8 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bcrypt-pbkdf" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeac2e1fe888769f34f05ac343bbef98b14d1ffb292ab69d4608b3abc86f2a2" +version = "0.11.0-pre.0" +source = "git+https://github.com/baloo/password-hashes.git?branch=baloo/cipher/0.5.0-pre.4#527596328f38fc78ee3194986752a50857bb334c" dependencies = [ "blowfish", "pbkdf2", @@ -68,27 +63,26 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.4" +version = "0.11.0-pre.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +checksum = "3ded684142010808eb980d9974ef794da2bcf97d13396143b1515e9f0fb4a10e" dependencies = [ - "generic-array", + "crypto-common", ] [[package]] name = "block-padding" -version = "0.3.3" +version = "0.4.0-pre.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" +checksum = "e8ab21a8964437caf2e83a92a1221ce65e356a2a9b8b52d58bece04005fe114e" dependencies = [ - "generic-array", + "hybrid-array", ] [[package]] name = "blowfish" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e412e2cd0f2b2d93e02543ceae7917b3c70331573df19ee046bcbc35e45e87d7" +version = "0.10.0-pre" +source = "git+https://github.com/baloo/block-ciphers.git?branch=baloo/bump-cipher/0.5.0-pre.4#da25e2bd2cbf8d8fd04c4f99f07ba169d3b1756a" dependencies = [ "byteorder", "cipher", @@ -108,9 +102,8 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cbc" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" +version = "0.2.0-pre" +source = "git+https://github.com/baloo/block-modes.git?branch=baloo/bump-prereleases#ac23b1f49e511e4a2fcf29a2671fc03fa2c8c4c6" dependencies = [ "cipher", ] @@ -123,9 +116,8 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chacha20" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" +version = "0.10.0-pre" +source = "git+https://github.com/baloo/stream-ciphers.git?branch=baloo/cipher-0.5.0-pre.4#8146b5ba09fed0101d50a045af4e2eeef552b278" dependencies = [ "cfg-if", "cipher", @@ -134,9 +126,9 @@ dependencies = [ [[package]] name = "cipher" -version = "0.4.4" +version = "0.5.0-pre.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +checksum = "84fba98785cecd0e308818a87c817576a40f99d8bab6405bf422bacd3efb6c1f" dependencies = [ "crypto-common", "inout", @@ -144,9 +136,9 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.5" +version = "0.10.0-pre.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +checksum = "f7e3352a27098ba6b09546e5f13b15165e6a88b5c2723afecb3ea9576b27e3ea" [[package]] name = "cpufeatures" @@ -159,11 +151,12 @@ dependencies = [ [[package]] name = "crypto-bigint" -version = "0.5.5" +version = "0.6.0-pre.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +checksum = "1943d7beadd9ce2b25f3bae73b9e9336fccc1edf38bdec1ed58d3aa183989e11" dependencies = [ - "generic-array", + "hybrid-array", + "num-traits", "rand_core", "subtle", "zeroize", @@ -171,28 +164,27 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.1.6" +version = "0.2.0-pre.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +checksum = "b7aa2ec04f5120b830272a481e8d9d8ba4dda140d2cda59b0f1110d5eb93c38e" dependencies = [ - "generic-array", - "typenum", + "getrandom", + "hybrid-array", + "rand_core", ] [[package]] name = "ctr" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +version = "0.10.0-pre" +source = "git+https://github.com/baloo/block-modes.git?branch=baloo/bump-prereleases#ac23b1f49e511e4a2fcf29a2671fc03fa2c8c4c6" dependencies = [ "cipher", ] [[package]] name = "curve25519-dalek" -version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" +version = "4.2.0-pre" +source = "git+https://github.com/baloo/curve25519-dalek.git?branch=baloo/rust-crypto/digest-sha2-bumps#70f0a07c65d3cbc9b01583c19cc9cd6b4ae5e407" dependencies = [ "cfg-if", "cpufeatures", @@ -207,8 +199,7 @@ dependencies = [ [[package]] name = "curve25519-dalek-derive" version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +source = "git+https://github.com/baloo/curve25519-dalek.git?branch=baloo/rust-crypto/digest-sha2-bumps#70f0a07c65d3cbc9b01583c19cc9cd6b4ae5e407" dependencies = [ "proc-macro2", "quote", @@ -217,9 +208,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.8" +version = "0.8.0-pre.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +checksum = "b489fd2221710c1dd46637d66b984161fb66134f81437a8489800306bcc2ecea" dependencies = [ "const-oid", "zeroize", @@ -227,18 +218,17 @@ dependencies = [ [[package]] name = "des" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdd80ce8ce993de27e9f063a444a4d53ce8e8db4c1f00cc03af5ad5a9867a1e" +version = "0.9.0-pre" +source = "git+https://github.com/baloo/block-ciphers.git?branch=baloo/bump-cipher/0.5.0-pre.4#da25e2bd2cbf8d8fd04c4f99f07ba169d3b1756a" dependencies = [ "cipher", ] [[package]] name = "digest" -version = "0.10.7" +version = "0.11.0-pre.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +checksum = "065d93ead7c220b85d5b4be4795d8398eac4ff68b5ee63895de0a3c1fb6edf25" dependencies = [ "block-buffer", "const-oid", @@ -248,15 +238,14 @@ dependencies = [ [[package]] name = "dsa" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48bc224a9084ad760195584ce5abb3c2c34a225fa312a128ad245a6b412b7689" +version = "0.7.0-pre" +source = "git+https://github.com/RustCrypto/signatures.git#3bbea81e1f0168484975c699bb707cdf117827a5" dependencies = [ "digest", "num-bigint-dig", "num-traits", "pkcs8", - "rfc6979", + "rfc6979 0.5.0-pre.3 (git+https://github.com/RustCrypto/signatures.git)", "sha2", "signature", "zeroize", @@ -264,32 +253,30 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.16.9" +version = "0.17.0-pre.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +checksum = "d7e045ee5c360512162782f3d4cb07d2f4ce8c4ef9bf7c77ec16d1cf60b3d5ca" dependencies = [ "der", "digest", "elliptic-curve", - "rfc6979", + "rfc6979 0.5.0-pre.3 (registry+https://github.com/rust-lang/crates.io-index)", "signature", "spki", ] [[package]] name = "ed25519" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +version = "2.3.0-pre" +source = "git+https://github.com/baloo/signatures.git?branch=baloo/pkcs8-0.11.0-pre.0#f16ce1807c9407fe132c64691d7797112555092d" dependencies = [ "signature", ] [[package]] name = "ed25519-dalek" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +version = "2.2.0-pre" +source = "git+https://github.com/baloo/curve25519-dalek.git?branch=baloo/rust-crypto/digest-sha2-bumps#70f0a07c65d3cbc9b01583c19cc9cd6b4ae5e407" dependencies = [ "curve25519-dalek", "ed25519", @@ -299,16 +286,16 @@ dependencies = [ [[package]] name = "elliptic-curve" -version = "0.13.8" +version = "0.14.0-pre.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +checksum = "4a1775af172997a40c14854c3a9fde9e03e5772084b334b6a0bb18bf7f93ac16" dependencies = [ "base16ct", "crypto-bigint", "digest", "ff", - "generic-array", "group", + "hybrid-array", "pkcs8", "rand_core", "sec1", @@ -332,17 +319,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", - "zeroize", -] - [[package]] name = "getrandom" version = "0.2.11" @@ -356,9 +332,8 @@ dependencies = [ [[package]] name = "ghash" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +version = "0.6.0-pre" +source = "git+https://github.com/baloo/universal-hashes.git?branch=baloo/pre-releases#f13e506fecee337c5293df3c2cf33fe806a040f1" dependencies = [ "opaque-debug", "polyval", @@ -383,21 +358,31 @@ checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "hmac" -version = "0.12.1" +version = "0.13.0-pre.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +checksum = "ffd790a0795ee332ed3e8959e5b177beb70d7112eb7d345428ec17427897d5ce" dependencies = [ "digest", ] +[[package]] +name = "hybrid-array" +version = "0.2.0-rc.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcda354500b318c287a6b91c1cfbc42edd53d52d259a80783ceb5e3986fca2b2" +dependencies = [ + "typenum", + "zeroize", +] + [[package]] name = "inout" -version = "0.1.3" +version = "0.2.0-pre.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +checksum = "0a2cc35b920cc3b344af824e64e508ffc2c819fc2368ed4d253244446194d2fe" dependencies = [ "block-padding", - "generic-array", + "hybrid-array", ] [[package]] @@ -477,9 +462,8 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "p256" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +version = "0.14.0-pre.0" +source = "git+https://github.com/RustCrypto/elliptic-curves.git#3edabece47212ae9ad60a65a9bb9495b332d7d60" dependencies = [ "ecdsa", "elliptic-curve", @@ -489,9 +473,8 @@ dependencies = [ [[package]] name = "p384" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70786f51bcc69f6a4c0360e063a4cac5419ef7c5cd5b3c99ad70f3be5ba79209" +version = "0.14.0-pre" +source = "git+https://github.com/RustCrypto/elliptic-curves.git#3edabece47212ae9ad60a65a9bb9495b332d7d60" dependencies = [ "ecdsa", "elliptic-curve", @@ -501,13 +484,13 @@ dependencies = [ [[package]] name = "p521" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc9e2161f1f215afdfce23677034ae137bbd45016a880c2eb3ba8eb95f085b2" +version = "0.14.0-pre" +source = "git+https://github.com/RustCrypto/elliptic-curves.git#3edabece47212ae9ad60a65a9bb9495b332d7d60" dependencies = [ "base16ct", "ecdsa", "elliptic-curve", + "primefield", "primeorder", "rand_core", "sha2", @@ -515,27 +498,26 @@ dependencies = [ [[package]] name = "pbkdf2" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +version = "0.13.0-pre.0" +source = "git+https://github.com/baloo/password-hashes.git?branch=baloo/cipher/0.5.0-pre.4#527596328f38fc78ee3194986752a50857bb334c" dependencies = [ "digest", ] [[package]] name = "pem-rfc7468" -version = "0.7.0" +version = "1.0.0-pre.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +checksum = "76a65e1c27d1680f8805b3f8c9949f08d6aa5d6cbd088c9896e64a53821dc27d" dependencies = [ "base64ct", ] [[package]] name = "pkcs1" -version = "0.7.5" +version = "0.8.0-pre.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +checksum = "4f6af6e88ac39402f67488e22faa9eb15cf065f520cf4a09419393691a6d0133" dependencies = [ "der", "pkcs8", @@ -544,9 +526,9 @@ dependencies = [ [[package]] name = "pkcs8" -version = "0.10.2" +version = "0.11.0-pre.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +checksum = "935c09e0aecb0cb8f8907b57438b19a068cb74a25189b06724f061170b2465ff" dependencies = [ "der", "spki", @@ -560,9 +542,8 @@ checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" [[package]] name = "poly1305" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +version = "0.9.0-pre" +source = "git+https://github.com/baloo/universal-hashes.git?branch=baloo/pre-releases#f13e506fecee337c5293df3c2cf33fe806a040f1" dependencies = [ "cpufeatures", "opaque-debug", @@ -571,9 +552,8 @@ dependencies = [ [[package]] name = "polyval" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" +version = "0.7.0-pre" +source = "git+https://github.com/baloo/universal-hashes.git?branch=baloo/pre-releases#f13e506fecee337c5293df3c2cf33fe806a040f1" dependencies = [ "cfg-if", "cpufeatures", @@ -587,11 +567,15 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "primefield" +version = "0.14.0-pre" +source = "git+https://github.com/RustCrypto/elliptic-curves.git#3edabece47212ae9ad60a65a9bb9495b332d7d60" + [[package]] name = "primeorder" -version = "0.13.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +version = "0.14.0-pre.0" +source = "git+https://github.com/RustCrypto/elliptic-curves.git#3edabece47212ae9ad60a65a9bb9495b332d7d60" dependencies = [ "elliptic-curve", ] @@ -645,9 +629,18 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.4.0" +version = "0.5.0-pre.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +checksum = "045972f2f66b9467a2f6834b7fd0f9b23ca214b4a8700b880c36edb726e96da6" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "rfc6979" +version = "0.5.0-pre.3" +source = "git+https://github.com/RustCrypto/signatures.git#3bbea81e1f0168484975c699bb707cdf117827a5" dependencies = [ "hmac", "subtle", @@ -655,9 +648,9 @@ dependencies = [ [[package]] name = "rsa" -version = "0.9.6" +version = "0.10.0-pre.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +checksum = "43e0089f12e510517c97e1adc17d0f8374efbabdd021dfb7645d6619f85633e9" dependencies = [ "const-oid", "digest", @@ -685,13 +678,13 @@ dependencies = [ [[package]] name = "sec1" -version = "0.7.3" +version = "0.8.0-pre.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +checksum = "02dc081ed777a3bab68583b52ffb8221677b6e90d483b320963a247e2c07f328" dependencies = [ "base16ct", "der", - "generic-array", + "hybrid-array", "pkcs8", "subtle", "zeroize", @@ -725,9 +718,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.6" +version = "0.11.0-pre.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +checksum = "3885de8cb916f223718c1ccd47a840b91f806333e76002dc5cb3862154b4fed3" dependencies = [ "cfg-if", "cpufeatures", @@ -736,9 +729,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.8" +version = "0.11.0-pre.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "8f33549bf3064b62478926aa89cbfc7c109aab66ae8f0d5d2ef839e482cc30d6" dependencies = [ "cfg-if", "cpufeatures", @@ -747,9 +740,9 @@ dependencies = [ [[package]] name = "signature" -version = "2.2.0" +version = "2.3.0-pre.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +checksum = "1700c22ba9ce32c7b0a1495068a906c3552e7db386af7cf865162e0dea498523" dependencies = [ "digest", "rand_core", @@ -769,9 +762,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spki" -version = "0.7.3" +version = "0.8.0-pre.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +checksum = "cb2b56670f5ef52934c97efad30bf42585de0c33ec3e2a886e38b80d2db67243" dependencies = [ "base64ct", "der", @@ -861,20 +854,13 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "universal-hash" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +version = "0.6.0-pre" +source = "git+https://github.com/RustCrypto/traits.git?branch=master#b2e31d8df293026390b6315c10844eed8b54a185" dependencies = [ "crypto-common", "subtle", ] -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" diff --git a/Cargo.toml b/Cargo.toml index e0ac07a..287ee88 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,3 +8,42 @@ members = [ [profile.dev] opt-level = 2 + +[patch.crates-io] +p256 = { git = "https://github.com/RustCrypto/elliptic-curves.git" } +p384 = { git = "https://github.com/RustCrypto/elliptic-curves.git" } +p521 = { git = "https://github.com/RustCrypto/elliptic-curves.git" } + +# https://github.com/RustCrypto/signatures/pull/807 +ed25519 = { git = "https://github.com/baloo/signatures.git", branch = "baloo/pkcs8-0.11.0-pre.0" } +# https://github.com/dalek-cryptography/curve25519-dalek/pull/620 +ed25519-dalek = { git = "https://github.com/baloo/curve25519-dalek.git", branch = "baloo/rust-crypto/digest-sha2-bumps" } + +dsa = { git = "https://github.com/RustCrypto/signatures.git" } + +# https://github.com/RustCrypto/password-hashes/pull/489 +bcrypt-pbkdf = { git = "https://github.com/baloo/password-hashes.git", branch = "baloo/cipher/0.5.0-pre.4" } + +# https://github.com/RustCrypto/stream-ciphers/pull/344 +chacha20 = { git = "https://github.com/baloo/stream-ciphers.git", branch = "baloo/cipher-0.5.0-pre.4" } + +# https://github.com/RustCrypto/block-ciphers/pull/413 +aes = { git = "https://github.com/baloo/block-ciphers.git", branch = "baloo/bump-cipher/0.5.0-pre.4" } +blowfish = { git = "https://github.com/baloo/block-ciphers.git", branch = "baloo/bump-cipher/0.5.0-pre.4" } +des = { git = "https://github.com/baloo/block-ciphers.git", branch = "baloo/bump-cipher/0.5.0-pre.4" } + +# https://github.com/RustCrypto/block-modes/pull/56 +cbc = { git = "https://github.com/baloo/block-modes.git", branch = "baloo/bump-prereleases" } +ctr = { git = "https://github.com/baloo/block-modes.git", branch = "baloo/bump-prereleases" } + +# https://github.com/RustCrypto/AEADs/pull/583 +aes-gcm = { git = "https://github.com/baloo/AEADs.git", branch = "baloo/bump-cipher" } + +# https://github.com/RustCrypto/universal-hashes/pull/196 +ghash = { git = "https://github.com/baloo/universal-hashes.git", branch = "baloo/pre-releases" } +poly1305 = { git = "https://github.com/baloo/universal-hashes.git", branch = "baloo/pre-releases" } + +aead = { git = "https://github.com/RustCrypto/traits.git", branch = "master" } +universal-hash = { git = "https://github.com/RustCrypto/traits.git", branch = "master" } + + diff --git a/ssh-cipher/Cargo.toml b/ssh-cipher/Cargo.toml index 20ce096..9d58714 100644 --- a/ssh-cipher/Cargo.toml +++ b/ssh-cipher/Cargo.toml @@ -18,17 +18,17 @@ edition = "2021" rust-version = "1.60" [dependencies] -cipher = "0.4" +cipher = "0.5.0-pre.4" encoding = { package = "ssh-encoding", version = "0.2", path = "../ssh-encoding" } # optional dependencies -aes = { version = "0.8", optional = true, default-features = false } -aes-gcm = { version = "0.10", optional = true, default-features = false, features = ["aes"] } -cbc = { version = "0.1", optional = true } -ctr = { version = "0.9", optional = true, default-features = false } -chacha20 = { version = "0.9", optional = true, default-features = false } -des = { version = "0.8", optional = true, default-features = false } -poly1305 = { version = "0.8", optional = true, default-features = false } +aes = { version = "=0.9.0-pre", optional = true, default-features = false } +aes-gcm = { version = "=0.11.0-pre", optional = true, default-features = false, features = ["aes"] } +cbc = { version = "=0.2.0-pre", optional = true } +ctr = { version = "=0.10.0-pre", optional = true, default-features = false } +chacha20 = { version = "=0.10.0-pre", optional = true, default-features = false } +des = { version = "=0.9.0-pre", optional = true, default-features = false } +poly1305 = { version = "=0.9.0-pre", optional = true, default-features = false } subtle = { version = "2", optional = true, default-features = false } [features] diff --git a/ssh-cipher/src/lib.rs b/ssh-cipher/src/lib.rs index 3fc77e9..8419c78 100644 --- a/ssh-cipher/src/lib.rs +++ b/ssh-cipher/src/lib.rs @@ -45,7 +45,10 @@ use aes::{Aes128, Aes192, Aes256}; #[cfg(any(feature = "aes-cbc", feature = "tdes"))] use { cbc::{Decryptor, Encryptor}, - cipher::{block_padding::NoPadding, BlockCipher, BlockDecryptMut, BlockEncryptMut}, + cipher::{ + block_padding::NoPadding, BlockCipher, BlockCipherDecrypt, BlockCipherEncrypt, + BlockModeDecrypt, BlockModeEncrypt, + }, }; #[cfg(any(feature = "aes-cbc", feature = "aes-gcm", feature = "tdes"))] @@ -418,13 +421,13 @@ impl str::FromStr for Cipher { #[cfg(any(feature = "aes-cbc", feature = "tdes"))] fn cbc_encrypt(key: &[u8], iv: &[u8], buffer: &mut [u8]) -> Result<()> where - C: BlockEncryptMut + BlockCipher + KeyInit, + C: BlockCipherEncrypt + BlockCipher + KeyInit, { let cipher = Encryptor::::new_from_slices(key, iv).map_err(|_| Error::KeySize)?; // Since the passed in buffer is already padded, using NoPadding here cipher - .encrypt_padded_mut::(buffer, buffer.len()) + .encrypt_padded::(buffer, buffer.len()) .map_err(|_| Error::Crypto)?; Ok(()) @@ -433,13 +436,13 @@ where #[cfg(any(feature = "aes-cbc", feature = "tdes"))] fn cbc_decrypt(key: &[u8], iv: &[u8], buffer: &mut [u8]) -> Result<()> where - C: BlockDecryptMut + BlockCipher + KeyInit, + C: BlockCipherDecrypt + BlockCipher + KeyInit, { let cipher = Decryptor::::new_from_slices(key, iv).map_err(|_| Error::KeySize)?; // Since the passed in buffer is already padded, using NoPadding here cipher - .decrypt_padded_mut::(buffer) + .decrypt_padded::(buffer) .map_err(|_| Error::Crypto)?; Ok(()) diff --git a/ssh-encoding/Cargo.toml b/ssh-encoding/Cargo.toml index 0c1b6ac..a59df85 100644 --- a/ssh-encoding/Cargo.toml +++ b/ssh-encoding/Cargo.toml @@ -17,8 +17,8 @@ rust-version = "1.60" [dependencies] base64 = { package = "base64ct", version = "1.4", optional = true } bytes = { version = "1", optional = true, default-features = false } -pem = { package = "pem-rfc7468", version = "0.7", optional = true } -sha2 = { version = "0.10", optional = true, default-features = false } +pem = { package = "pem-rfc7468", version = "=1.0.0-pre.0", optional = true } +sha2 = { version = "=0.11.0-pre.3", optional = true, default-features = false } [dev-dependencies] hex-literal = "0.4.1" diff --git a/ssh-encoding/tests/encode.rs b/ssh-encoding/tests/encode.rs index d3994ff..4576251 100644 --- a/ssh-encoding/tests/encode.rs +++ b/ssh-encoding/tests/encode.rs @@ -43,7 +43,7 @@ fn encode_byte_slice() { #[test] fn encode_byte_vec() { let mut out = Vec::new(); - Vec::from(b"example".as_ref()).encode(&mut out).unwrap(); + Vec::from(b"example").encode(&mut out).unwrap(); assert_eq!(out, hex!("000000076578616d706c65")); } diff --git a/ssh-key/Cargo.toml b/ssh-key/Cargo.toml index 993fbf1..393783d 100644 --- a/ssh-key/Cargo.toml +++ b/ssh-key/Cargo.toml @@ -19,24 +19,24 @@ rust-version = "1.65" [dependencies] cipher = { package = "ssh-cipher", version = "0.2", path = "../ssh-cipher" } encoding = { package = "ssh-encoding", version = "0.2", features = ["base64", "pem", "sha2"], path = "../ssh-encoding" } -sha2 = { version = "0.10.8", default-features = false } -signature = { version = "2", default-features = false } +sha2 = { version = "=0.11.0-pre.3", default-features = false } +signature = { version = "=2.3.0-pre.3", default-features = false } subtle = { version = "2", default-features = false } zeroize = { version = "1", default-features = false } # optional dependencies -bcrypt-pbkdf = { version = "0.10", optional = true, default-features = false, features = ["alloc"] } +bcrypt-pbkdf = { version = "=0.11.0-pre.0", optional = true, default-features = false, features = ["alloc"] } bigint = { package = "num-bigint-dig", version = "0.8", optional = true, default-features = false } -dsa = { version = "0.6", optional = true, default-features = false } -ed25519-dalek = { version = "2", optional = true, default-features = false } -p256 = { version = "0.13", optional = true, default-features = false, features = ["ecdsa"] } -p384 = { version = "0.13", optional = true, default-features = false, features = ["ecdsa"] } -p521 = { version = "0.13.3", optional = true, default-features = false, features = ["ecdsa", "getrandom"] } # TODO(tarcieri): RFC6979 +dsa = { version = "=0.7.0-pre", optional = true, default-features = false } +ed25519-dalek = { version = "=2.2.0-pre", optional = true, default-features = false } +p256 = { version = "=0.14.0-pre.0", optional = true, default-features = false, features = ["ecdsa"] } +p384 = { version = "=0.14.0-pre", optional = true, default-features = false, features = ["ecdsa"] } +p521 = { version = "=0.14.0-pre", optional = true, default-features = false, features = ["ecdsa", "getrandom"] } # TODO(tarcieri): RFC6979 rand_core = { version = "0.6.4", optional = true, default-features = false } -rsa = { version = "0.9", optional = true, default-features = false, features = ["sha2"] } -sec1 = { version = "0.7.3", optional = true, default-features = false, features = ["point"] } +rsa = { version = "=0.10.0-pre.1", optional = true, default-features = false, features = ["sha2"] } +sec1 = { version = "=0.8.0-pre.1", optional = true, default-features = false, features = ["point"] } serde = { version = "1", optional = true } -sha1 = { version = "0.10", optional = true, default-features = false } +sha1 = { version = "=0.11.0-pre.3", optional = true, default-features = false } [dev-dependencies] hex-literal = "0.4.1" diff --git a/ssh-key/src/lib.rs b/ssh-key/src/lib.rs index adf7d2a..5595896 100644 --- a/ssh-key/src/lib.rs +++ b/ssh-key/src/lib.rs @@ -54,11 +54,11 @@ //! if let Some(ed25519_public_key) = public_key.key_data().ed25519() { //! assert_eq!( //! ed25519_public_key.as_ref(), -//! [ +//! &[ //! 0xb3, 0x3e, 0xae, 0xf3, 0x7e, 0xa2, 0xdf, 0x7c, 0xaa, 0x1, 0xd, 0xef, 0xde, 0xa3, //! 0x4e, 0x24, 0x1f, 0x65, 0xf1, 0xb5, 0x29, 0xa4, 0xf4, 0x3e, 0xd1, 0x43, 0x27, 0xf5, //! 0xc5, 0x4a, 0xab, 0x62 -//! ].as_ref() +//! ] //! ); //! } //! # Ok(()) @@ -103,20 +103,20 @@ //! if let Some(ed25519_keypair) = private_key.key_data().ed25519() { //! assert_eq!( //! ed25519_keypair.public.as_ref(), -//! [ +//! &[ //! 0xb3, 0x3e, 0xae, 0xf3, 0x7e, 0xa2, 0xdf, 0x7c, 0xaa, 0x1, 0xd, 0xef, 0xde, 0xa3, //! 0x4e, 0x24, 0x1f, 0x65, 0xf1, 0xb5, 0x29, 0xa4, 0xf4, 0x3e, 0xd1, 0x43, 0x27, 0xf5, //! 0xc5, 0x4a, 0xab, 0x62 -//! ].as_ref() +//! ] //! ); //! //! assert_eq!( //! ed25519_keypair.private.as_ref(), -//! [ +//! &[ //! 0xb6, 0x6, 0xc2, 0x22, 0xd1, 0xc, 0x16, 0xda, 0xe1, 0x6c, 0x70, 0xa4, 0xd4, 0x51, //! 0x73, 0x47, 0x2e, 0xc6, 0x17, 0xe0, 0x5c, 0x65, 0x69, 0x20, 0xd2, 0x6e, 0x56, 0xc0, //! 0x8f, 0xb5, 0x91, 0xed -//! ].as_ref() +//! ] //! ) //! } //! # Ok(()) diff --git a/ssh-key/src/private/ed25519.rs b/ssh-key/src/private/ed25519.rs index 29eb3d4..2de6fe1 100644 --- a/ssh-key/src/private/ed25519.rs +++ b/ssh-key/src/private/ed25519.rs @@ -237,7 +237,7 @@ impl Encode for Ed25519Keypair { fn encode(&self, writer: &mut impl Writer) -> encoding::Result<()> { self.public.encode(writer)?; - Zeroizing::new(self.to_bytes()).as_ref().encode(writer)?; + Zeroizing::new(self.to_bytes()).as_slice().encode(writer)?; Ok(()) } } diff --git a/ssh-key/src/signature.rs b/ssh-key/src/signature.rs index 2a1e498..a5b8cdc 100644 --- a/ssh-key/src/signature.rs +++ b/ssh-key/src/signature.rs @@ -725,7 +725,7 @@ mod tests { #[cfg(feature = "p256")] #[test] fn convert_ecdsa_sha2_p256() { - let p256_signature = p256::ecdsa::Signature::try_from(hex!("00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001").as_ref()).unwrap(); + let p256_signature = p256::ecdsa::Signature::try_from(&hex!("00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001")[..]).unwrap(); let _ssh_signature = Signature::try_from(p256_signature).unwrap(); }