diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ccc35edf..1071f0a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,13 +36,13 @@ jobs: toolchain: stable deps: true - platform: ubuntu-latest - toolchain: 1.46.0 # MSRV + toolchain: 1.47.0 # MSRV deps: sudo apt-get install libpcsclite-dev - platform: windows-latest - toolchain: 1.46.0 # MSRV + toolchain: 1.47.0 # MSRV deps: true - platform: macos-latest - toolchain: 1.46.0 # MSRV + toolchain: 1.47.0 # MSRV deps: true runs-on: ${{ matrix.platform }} steps: @@ -82,7 +82,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.46.0 # MSRV + toolchain: 1.47.0 # MSRV components: clippy override: true - run: sudo apt-get install libpcsclite-dev diff --git a/Cargo.lock b/Cargo.lock index c99eb3ed..6a6d3c27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -54,23 +54,24 @@ checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "bitvec" -version = "0.18.5" +version = "0.19.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98fcd36dda4e17b7d7abc64cb549bf0201f4ab71e00700c798ca7e62ed3761fa" +checksum = "8942c8d352ae1838c9dda0b0ca2ab657696ef2232a20147cf1b30ae1a9cb4321" dependencies = [ "funty", - "radium 0.3.0", + "radium 0.5.3", + "tap", "wyz", ] [[package]] name = "bitvec" -version = "0.19.5" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8942c8d352ae1838c9dda0b0ca2ab657696ef2232a20147cf1b30ae1a9cb4321" +checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" dependencies = [ "funty", - "radium 0.5.3", + "radium 0.6.2", "tap", "wyz", ] @@ -123,18 +124,18 @@ dependencies = [ [[package]] name = "cipher" -version = "0.2.5" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ "generic-array", ] [[package]] name = "const-oid" -version = "0.4.5" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f6b64db6932c7e49332728e3a6bd82c6b7e16016607d20923b537c3bc4c0d5f" +checksum = "279bc8fc53f788a75c7804af68237d1fce02cde1e275a886a4b320604dc2aeda" [[package]] name = "cookie-factory" @@ -150,9 +151,9 @@ checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" [[package]] name = "crypto-mac" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4857fd85a0c34b3c3297875b747c1e02e06b6a0ea32dd892d8192b9ce0813ea6" +checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e" dependencies = [ "generic-array", "subtle", @@ -166,11 +167,12 @@ checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" [[package]] name = "der" -version = "0.1.0" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f59c66c30bb7445c8320a5f9233e437e3572368099f25532a59054328899b4" +checksum = "83dc83d0b59f92103d8e661e60526338ad3aeb0c15fa4a29a14b6a9b1ac8a43c" dependencies = [ "const-oid", + "typenum", ] [[package]] @@ -200,9 +202,9 @@ dependencies = [ [[package]] name = "des" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b24e7c748888aa2fa8bce21d8c64a52efc810663285315ac7476f7197a982fae" +checksum = "ac41dd49fb554432020d52c875fc290e110113f864c6b1b525cd62c7e7747a5d" dependencies = [ "byteorder", "cipher", @@ -220,10 +222,11 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.10.2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fbdb4ff710acb4db8ca29f93b897529ea6d6a45626d5183b47e012aa6ae7e4" +checksum = "6b568b5e72165dd8913ac2aad6a60cb9cb297287615544c523c37f9247b58fc8" dependencies = [ + "der", "elliptic-curve", "hmac", "signature", @@ -231,18 +234,16 @@ dependencies = [ [[package]] name = "elliptic-curve" -version = "0.8.5" +version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2db227e61a43a34915680bdda462ec0e212095518020a88a1f91acd16092c39" +checksum = "ee681bf25de1aad7cd02ccc7525d7b4bfab7be2493dbe3ee18d93f86eb3dcf3e" dependencies = [ - "bitvec 0.18.5", - "digest", + "bitvec 0.20.4", "ff", - "funty", "generic-array", "group", "pkcs8", - "rand_core 0.5.1", + "rand_core", "subtle", "zeroize", ] @@ -262,12 +263,12 @@ dependencies = [ [[package]] name = "ff" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01646e077d4ebda82b73f1bca002ea1e91561a77df2431a9e79729bcc31950ef" +checksum = "72a4d941a5b7c2a75222e2d44fcdf634a67133d9db31e177ae5ff6ecda852bfe" dependencies = [ - "bitvec 0.18.5", - "rand_core 0.5.1", + "bitvec 0.20.4", + "rand_core", "subtle", ] @@ -311,12 +312,12 @@ dependencies = [ [[package]] name = "group" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc11f9f5fbf1943b48ae7c2bf6846e7d827a512d1be4f23af708f5ca5d01dde1" +checksum = "61b3c1e8b4f1ca07e6605ea1be903a5f6956aec5c8a67fd44d56076631675ed8" dependencies = [ "ff", - "rand_core 0.5.1", + "rand_core", "subtle", ] @@ -351,9 +352,9 @@ dependencies = [ [[package]] name = "hmac" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" +checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" dependencies = [ "crypto-mac", "digest", @@ -520,9 +521,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "p256" -version = "0.7.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8adcc06fe90ec8fb2d2ad46746d2cbd639b158d4240364aa832da7e263dbee91" +checksum = "1cf301f7f053902eaf046d541cd7b454a588b2bdd571f18195b57ae197aed2cb" dependencies = [ "ecdsa", "elliptic-curve", @@ -531,18 +532,18 @@ dependencies = [ [[package]] name = "p384" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea33960aac2200d19a5c9ab06a11ebd48a37a23144496632c358182e6765d80b" +checksum = "94e3bfd7d8f202c293072de214ad93480b533985bfee4fa4a13cfdd185fab13d" dependencies = [ "elliptic-curve", ] [[package]] name = "pbkdf2" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf916dd32dd26297907890d99dc2740e33f6bd9073965af4ccff2967962f5508" +checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" dependencies = [ "crypto-mac", ] @@ -579,11 +580,12 @@ dependencies = [ [[package]] name = "pkcs8" -version = "0.3.3" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4839a901843f3942576e65857f0ebf2e190ef7024d3c62a94099ba3f819ad1d" +checksum = "b813f58dc6e5d1820868a3c3df3a7ae7852aa2d3d18e98f0d6b20ddd01fe25d7" dependencies = [ "der", + "spki", ] [[package]] @@ -618,15 +620,15 @@ dependencies = [ [[package]] name = "radium" -version = "0.3.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" +checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" [[package]] name = "radium" -version = "0.5.3" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" +checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" [[package]] name = "rand" @@ -636,7 +638,7 @@ checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" dependencies = [ "libc", "rand_chacha", - "rand_core 0.6.2", + "rand_core", "rand_hc", ] @@ -647,15 +649,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" dependencies = [ "ppv-lite86", - "rand_core 0.6.2", + "rand_core", ] -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" - [[package]] name = "rand_core" version = "0.6.2" @@ -671,7 +667,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" dependencies = [ - "rand_core 0.6.2", + "rand_core", ] [[package]] @@ -790,12 +786,12 @@ dependencies = [ [[package]] name = "signature" -version = "1.2.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29f060a7d147e33490ec10da418795238fd7545bba241504d6b31a409f2e6210" +checksum = "0f0242b8e50dd9accdd56170e94ca1ebd223b098eb9c83539a6e367d0f36ae68" dependencies = [ "digest", - "rand_core 0.5.1", + "rand_core", ] [[package]] @@ -822,6 +818,15 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spki" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dae7e047abc519c96350e9484a96c6bf1492348af912fd3446dd2dc323f6268" +dependencies = [ + "der", +] + [[package]] name = "static_assertions" version = "1.1.0" diff --git a/Cargo.toml b/Cargo.toml index ba52c9d9..a6ba2313 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,18 +25,18 @@ maintenance = { status = "experimental" } chrono = "0.4" cookie-factory = "0.3" der-parser = "5" -des = "0.6" -elliptic-curve = "0.8" +des = "0.7" +elliptic-curve = "0.9" getrandom = "0.1" -hmac = "0.10" +hmac = "0.11" log = "0.4" nom = "6" num-bigint-dig = { version = "0.7", features = ["rand"], package = "num-bigint-dig" } num-traits = "0.2" num-integer = "0.1" -pbkdf2 = { version = "0.7", default-features = false } -p256 = "0.7" -p384 = "0.6" +pbkdf2 = { version = "0.8", default-features = false } +p256 = "0.8" +p384 = "0.7" pcsc = "2" rsa = "0.4" secrecy = "0.7" diff --git a/src/mgm.rs b/src/mgm.rs index 853a15b4..228a12e6 100644 --- a/src/mgm.rs +++ b/src/mgm.rs @@ -43,7 +43,7 @@ use crate::{ TAG_ADMIN_FLAGS_1, TAG_ADMIN_SALT, TAG_PROTECTED_MGM, }; use des::{ - cipher::{generic_array::GenericArray, BlockCipher, NewBlockCipher}, + cipher::{generic_array::GenericArray, BlockDecrypt, BlockEncrypt, NewBlockCipher}, TdesEde3, }; #[cfg(feature = "untested")]