From 9165fa4ad7618f15577906b46e1d2405937e66df 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/ssh-cipher.yml | 15 +- .github/workflows/ssh-key.yml | 15 +- .github/workflows/workspace.yml | 2 +- Cargo.lock | 253 ++++++++++++++----------------- Cargo.toml | 41 +++++ ssh-cipher/Cargo.toml | 18 +-- ssh-cipher/src/lib.rs | 13 +- ssh-encoding/Cargo.toml | 4 +- ssh-encoding/tests/encode.rs | 2 +- ssh-key/Cargo.toml | 24 +-- ssh-key/src/lib.rs | 12 +- ssh-key/src/private/ed25519.rs | 2 +- ssh-key/src/signature.rs | 2 +- 13 files changed, 213 insertions(+), 190 deletions(-) diff --git a/.github/workflows/ssh-cipher.yml b/.github/workflows/ssh-cipher.yml index 6c133fc..d44eadc 100644 --- a/.github/workflows/ssh-cipher.yml +++ b/.github/workflows/ssh-cipher.yml @@ -18,18 +18,19 @@ env: RUSTFLAGS: "-Dwarnings" jobs: - minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - stable-cmd: cargo test --all-features --release - working-directory: ${{ github.workflow }} + # Disabled until we get rid of [patch.crates-io] in the workspace + #minimal-versions: + # uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + # with: + # stable-cmd: cargo test --all-features --release + # working-directory: ${{ github.workflow }} no_std: runs-on: ubuntu-latest strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.72.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -48,7 +49,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.72.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ssh-key.yml b/.github/workflows/ssh-key.yml index d3f07dc..8f021b4 100644 --- a/.github/workflows/ssh-key.yml +++ b/.github/workflows/ssh-key.yml @@ -48,18 +48,19 @@ jobs: - run: ${{ matrix.deps }} - run: cargo build --target ${{ matrix.target }} --release --all-features - minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - stable-cmd: cargo test --all-features --release - working-directory: ${{ github.workflow }} + # Disabled until we get rid of [patch.crates-io] in the workspace + #minimal-versions: + # uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + # with: + # stable-cmd: cargo test --all-features --release + # working-directory: ${{ github.workflow }} no_std: runs-on: ubuntu-latest strategy: matrix: rust: - - 1.65.0 # MSRV + - 1.73.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -78,7 +79,7 @@ jobs: strategy: matrix: rust: - - 1.65.0 # MSRV + - 1.73.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index 49feb1a..06046c0 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.73.0 components: clippy - run: cargo clippy --all-features diff --git a/Cargo.lock b/Cargo.lock index 300dc68..ffc2227 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,19 +4,18 @@ version = 3 [[package]] name = "aead" -version = "0.5.2" +version = "0.6.0-pre.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +checksum = "3de53f67567d2692f69357ee20fef7ddf7969d1dff34acefc05db91873aee0ce" dependencies = [ "crypto-common", - "generic-array", ] [[package]] name = "aes" -version = "0.8.4" +version = "0.9.0-pre" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +checksum = "25512cae539ab9089dcbd69c4f704e787fdc8c1cea8d9daa68a9d89b02b0501f" dependencies = [ "cfg-if", "cipher", @@ -25,9 +24,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/RustCrypto/AEADs.git#d812daa6ef9cfe2ad15b8912dc63b978999c815d" dependencies = [ "aead", "aes", @@ -57,9 +55,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#599be2736b7d1fb786f179f9dfc8950bcac1e50b" dependencies = [ "blowfish", "pbkdf2", @@ -68,27 +65,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/RustCrypto/block-ciphers.git#d6ed7a2f45f53db013824ac0e91419fc4f8a4321" dependencies = [ "byteorder", "cipher", @@ -108,9 +104,8 @@ checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[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/RustCrypto/block-modes.git#a2d538114e74ca85c19b6173d08e5aa519763778" dependencies = [ "cipher", ] @@ -123,9 +118,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/RustCrypto/stream-ciphers.git#fea3dd013ee9c35fba56903ad44b411957de8cb2" dependencies = [ "cfg-if", "cipher", @@ -134,9 +128,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 +138,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 +153,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 +166,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/RustCrypto/block-modes.git#a2d538114e74ca85c19b6173d08e5aa519763778" 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 +201,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 +210,8 @@ dependencies = [ [[package]] name = "der" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +version = "0.8.0-pre.0" +source = "git+https://github.com/RustCrypto/formats.git#c03c06640e2499db947f7d02789fa6f3dde07340" dependencies = [ "const-oid", "zeroize", @@ -227,18 +219,18 @@ dependencies = [ [[package]] name = "des" -version = "0.8.1" +version = "0.9.0-pre.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdd80ce8ce993de27e9f063a444a4d53ce8e8db4c1f00cc03af5ad5a9867a1e" +checksum = "3f106bfb220e7015669775195f68a439f4255a0baf95a437de2846f751b25997" 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,9 +240,8 @@ 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#11ea63809073d9bf2ecdb4242bc030bec7ab532f" dependencies = [ "digest", "num-bigint-dig", @@ -264,9 +255,8 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.16.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +version = "0.17.0-pre.5" +source = "git+https://github.com/RustCrypto/signatures.git#11ea63809073d9bf2ecdb4242bc030bec7ab532f" dependencies = [ "der", "digest", @@ -278,18 +268,16 @@ dependencies = [ [[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/RustCrypto/signatures.git#11ea63809073d9bf2ecdb4242bc030bec7ab532f" 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 +287,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 +320,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 +333,9 @@ dependencies = [ [[package]] name = "ghash" -version = "0.5.0" +version = "0.6.0-pre.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +checksum = "43f25097bbd647ae1fdd2fd6bcf100b77c5151e26af9cc2d2e81742c2cac27b7" dependencies = [ "opaque-debug", "polyval", @@ -383,21 +360,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.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53668f5da5a41d9eaf4bf7064be46d1ebe6a4e1ceed817f387587b18f2b51047" +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 +464,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#6ff3bb7d8632ea9970aa583c89e944356b8bc8d1" dependencies = [ "ecdsa", "elliptic-curve", @@ -489,9 +475,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#6ff3bb7d8632ea9970aa583c89e944356b8bc8d1" dependencies = [ "ecdsa", "elliptic-curve", @@ -501,13 +486,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#6ff3bb7d8632ea9970aa583c89e944356b8bc8d1" dependencies = [ "base16ct", "ecdsa", "elliptic-curve", + "primefield", "primeorder", "rand_core", "sha2", @@ -515,27 +500,25 @@ 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#599be2736b7d1fb786f179f9dfc8950bcac1e50b" 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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +version = "0.8.0-pre.0" +source = "git+https://github.com/RustCrypto/formats.git#c03c06640e2499db947f7d02789fa6f3dde07340" dependencies = [ "der", "pkcs8", @@ -544,9 +527,8 @@ dependencies = [ [[package]] name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +version = "0.11.0-pre.0" +source = "git+https://github.com/RustCrypto/formats.git#c03c06640e2499db947f7d02789fa6f3dde07340" dependencies = [ "der", "spki", @@ -560,9 +542,9 @@ checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" [[package]] name = "poly1305" -version = "0.8.0" +version = "0.9.0-pre" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +checksum = "c6c08e786072ace4e4498d7e477e9f8f9ea1a64f1a981ca17be7dc4df1361011" dependencies = [ "cpufeatures", "opaque-debug", @@ -571,9 +553,9 @@ dependencies = [ [[package]] name = "polyval" -version = "0.6.1" +version = "0.7.0-pre.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" +checksum = "8f3e1736974839c02569293a43b332c95269ccf635391bb7bbc75b41bef249b4" dependencies = [ "cfg-if", "cpufeatures", @@ -587,11 +569,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#6ff3bb7d8632ea9970aa583c89e944356b8bc8d1" + [[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#6ff3bb7d8632ea9970aa583c89e944356b8bc8d1" dependencies = [ "elliptic-curve", ] @@ -645,9 +631,8 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +version = "0.5.0-pre.3" +source = "git+https://github.com/RustCrypto/signatures.git#11ea63809073d9bf2ecdb4242bc030bec7ab532f" dependencies = [ "hmac", "subtle", @@ -655,9 +640,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 +670,12 @@ dependencies = [ [[package]] name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +version = "0.8.0-pre.1" +source = "git+https://github.com/RustCrypto/formats.git#c03c06640e2499db947f7d02789fa6f3dde07340" dependencies = [ "base16ct", "der", - "generic-array", + "hybrid-array", "pkcs8", "subtle", "zeroize", @@ -725,9 +709,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 +720,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 +731,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 +753,8 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +version = "0.8.0-pre.0" +source = "git+https://github.com/RustCrypto/formats.git#c03c06640e2499db947f7d02789fa6f3dde07340" dependencies = [ "base64ct", "der", @@ -861,20 +844,14 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "universal-hash" -version = "0.5.1" +version = "0.6.0-pre.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +checksum = "a05336f34009f6bb1c24794e2c04df87f4a0ced7a091692e395119f34fd3f4c5" 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..9aee688 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,3 +8,44 @@ members = [ [profile.dev] opt-level = 2 + +[patch.crates-io] +# When you remove the last patch.crates-io entry, please re-enable `minimal-versions` +# in `.github/workflows/ssh-key.yml` and `.github/workflows/ssh-cipher.yml` + + +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/RustCrypto/signatures.git" } +# 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" } +ecdsa = { 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/345 +chacha20 = { git = "https://github.com/RustCrypto/stream-ciphers.git" } + +# https://github.com/RustCrypto/block-ciphers/pull/413 +# https://github.com/RustCrypto/block-ciphers/pull/419 - pending release +blowfish = { git = "https://github.com/RustCrypto/block-ciphers.git" } + +# https://github.com/RustCrypto/block-modes/pull/56 +cbc = { git = "https://github.com/RustCrypto/block-modes.git" } +ctr = { git = "https://github.com/RustCrypto/block-modes.git" } + +# https://github.com/RustCrypto/AEADs/pull/583 +aes-gcm = { git = "https://github.com/RustCrypto/AEADs.git" } + +der = { git = "https://github.com/RustCrypto/formats.git" } +pkcs1 = { git = "https://github.com/RustCrypto/formats.git" } +pkcs8 = { git = "https://github.com/RustCrypto/formats.git" } +sec1 = { git = "https://github.com/RustCrypto/formats.git" } +spki = { git = "https://github.com/RustCrypto/formats.git" } + diff --git a/ssh-cipher/Cargo.toml b/ssh-cipher/Cargo.toml index 20ce096..ac04406 100644 --- a/ssh-cipher/Cargo.toml +++ b/ssh-cipher/Cargo.toml @@ -15,20 +15,20 @@ categories = ["cryptography", "no-std"] keywords = ["crypto", "encryption", "openssh", "ssh"] readme = "README.md" edition = "2021" -rust-version = "1.60" +rust-version = "1.72" [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.0", 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..ab11600 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 640e659..abda2c8 100644 --- a/ssh-key/Cargo.toml +++ b/ssh-key/Cargo.toml @@ -14,29 +14,29 @@ categories = ["authentication", "cryptography", "encoding", "no-std", "parser-im keywords = ["crypto", "certificate", "openssh", "ssh", "sshsig"] readme = "README.md" edition = "2021" -rust-version = "1.65" +rust-version = "1.73" [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 c791978..75a997e 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(); }