deps: bump crypto deps (#1465)

This commit is contained in:
Matthias Seitz 2022-07-06 23:11:23 +02:00 committed by GitHub
parent 958e0902a0
commit 0b88e4246d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 147 additions and 209 deletions

280
Cargo.lock generated
View File

@ -242,13 +242,11 @@ dependencies = [
[[package]] [[package]]
name = "blake2" name = "blake2"
version = "0.9.2" version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174" checksum = "b9cf849ee05b2ee5fba5e36f97ff8ec2533916700fc0758d40d92136a42f3388"
dependencies = [ dependencies = [
"crypto-mac 0.8.0", "digest 0.10.3",
"digest 0.9.0",
"opaque-debug 0.3.0",
] ]
[[package]] [[package]]
@ -280,7 +278,6 @@ version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
dependencies = [ dependencies = [
"block-padding 0.2.1",
"generic-array 0.14.5", "generic-array 0.14.5",
] ]
@ -538,72 +535,72 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b70e37282d9624283878ffda1d1e53883bcf868cf441bddda44127620b39572d" checksum = "b70e37282d9624283878ffda1d1e53883bcf868cf441bddda44127620b39572d"
dependencies = [ dependencies = [
"crypto-mac 0.11.1", "crypto-mac",
"dbl", "dbl",
] ]
[[package]] [[package]]
name = "coins-bip32" name = "coins-bip32"
version = "0.6.0" version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "471b39eadc9323de375dce5eff149a5a1ebd21c67f1da34a56f87ee62191d4ea" checksum = "634c509653de24b439672164bbf56f5f582a2ab0e313d3b0f6af0b7345cf2560"
dependencies = [ dependencies = [
"bincode", "bincode",
"bs58", "bs58",
"coins-core", "coins-core",
"digest 0.9.0", "digest 0.10.3",
"getrandom 0.2.7", "getrandom 0.2.7",
"hmac 0.11.0", "hmac 0.12.1",
"k256", "k256",
"lazy_static", "lazy_static",
"serde", "serde",
"sha2 0.9.9", "sha2 0.10.2",
"thiserror", "thiserror",
] ]
[[package]] [[package]]
name = "coins-bip39" name = "coins-bip39"
version = "0.6.0" version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f473ea37dfc9d2cb94fdde50c3d41f28c3f384b367573d66386fea38d76d466" checksum = "2a11892bcac83b4c6e95ab84b5b06c76d9d70ad73548dd07418269c5c7977171"
dependencies = [ dependencies = [
"bitvec 0.17.4", "bitvec 0.17.4",
"coins-bip32", "coins-bip32",
"getrandom 0.2.7", "getrandom 0.2.7",
"hex", "hex",
"hmac 0.11.0", "hmac 0.12.1",
"pbkdf2 0.8.0", "pbkdf2 0.11.0",
"rand 0.8.5", "rand 0.8.5",
"sha2 0.9.9", "sha2 0.10.2",
"thiserror", "thiserror",
] ]
[[package]] [[package]]
name = "coins-core" name = "coins-core"
version = "0.2.2" version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d257d975731955ee86fa7f348000c3fea09c262e84c70c11e994a85aa4f467a7" checksum = "c94090a6663f224feae66ab01e41a2555a8296ee07b5f20dab8888bdefc9f617"
dependencies = [ dependencies = [
"base58check", "base58check",
"base64 0.12.3", "base64 0.12.3",
"bech32", "bech32",
"blake2", "blake2",
"digest 0.9.0", "digest 0.10.3",
"generic-array 0.14.5", "generic-array 0.14.5",
"hex", "hex",
"ripemd160", "ripemd",
"serde", "serde",
"serde_derive", "serde_derive",
"sha2 0.9.9", "sha2 0.10.2",
"sha3 0.9.1", "sha3",
"thiserror", "thiserror",
] ]
[[package]] [[package]]
name = "coins-ledger" name = "coins-ledger"
version = "0.6.1" version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbfa8a730d02735d8d53888a95d8f33aaa9dda9979862de113202421db939b2a" checksum = "d9766e413812861a04ceb82c8008e7fea9fe75845b68ed41241c34274702ed9d"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"blake2b_simd", "blake2b_simd",
@ -672,12 +669,6 @@ dependencies = [
"wasm-bindgen", "wasm-bindgen",
] ]
[[package]]
name = "const-oid"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3"
[[package]] [[package]]
name = "const-oid" name = "const-oid"
version = "0.9.0" version = "0.9.0"
@ -820,9 +811,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
[[package]] [[package]]
name = "crypto-bigint" name = "crypto-bigint"
version = "0.3.2" version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" checksum = "9f2b443d17d49dad5ef0ede301c3179cc923b8822f3393b4d2c28c269dd4a122"
dependencies = [ dependencies = [
"generic-array 0.14.5", "generic-array 0.14.5",
"rand_core 0.6.3", "rand_core 0.6.3",
@ -840,16 +831,6 @@ dependencies = [
"typenum", "typenum",
] ]
[[package]]
name = "crypto-mac"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab"
dependencies = [
"generic-array 0.14.5",
"subtle",
]
[[package]] [[package]]
name = "crypto-mac" name = "crypto-mac"
version = "0.11.1" version = "0.11.1"
@ -924,22 +905,14 @@ dependencies = [
"generic-array 0.14.5", "generic-array 0.14.5",
] ]
[[package]]
name = "der"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c"
dependencies = [
"const-oid 0.7.1",
]
[[package]] [[package]]
name = "der" name = "der"
version = "0.6.0" version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f"
dependencies = [ dependencies = [
"const-oid 0.9.0", "const-oid",
"zeroize",
] ]
[[package]] [[package]]
@ -1018,11 +991,11 @@ checksum = "453440c271cf5577fd2a40e4942540cb7d0d2f85e27c8d07dd0023c925a67541"
[[package]] [[package]]
name = "ecdsa" name = "ecdsa"
version = "0.13.4" version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" checksum = "3bd46e0c364655e5baf2f5e99b603e7a09905da9966d7928d7470af393b28670"
dependencies = [ dependencies = [
"der 0.5.1", "der",
"elliptic-curve", "elliptic-curve",
"rfc6979", "rfc6979",
"signature", "signature",
@ -1059,16 +1032,18 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
[[package]] [[package]]
name = "elliptic-curve" name = "elliptic-curve"
version = "0.11.12" version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" checksum = "c47abd0a791d2ac0c7aa1118715f85b83689e4522c4e3a244e159d4fc9848a8d"
dependencies = [ dependencies = [
"base16ct", "base16ct",
"crypto-bigint", "crypto-bigint",
"der 0.5.1", "der",
"digest 0.10.3",
"ff", "ff",
"generic-array 0.14.5", "generic-array 0.14.5",
"group", "group",
"pkcs8",
"rand_core 0.6.3", "rand_core 0.6.3",
"sec1", "sec1",
"subtle", "subtle",
@ -1128,10 +1103,10 @@ dependencies = [
"scrypt", "scrypt",
"serde", "serde",
"serde_json", "serde_json",
"sha2 0.10.1", "sha2 0.10.2",
"sha3 0.10.0", "sha3",
"thiserror", "thiserror",
"uuid", "uuid 0.8.2",
] ]
[[package]] [[package]]
@ -1146,7 +1121,7 @@ dependencies = [
"regex", "regex",
"serde", "serde",
"serde_json", "serde_json",
"sha3 0.10.0", "sha3",
"thiserror", "thiserror",
"uint", "uint",
] ]
@ -1420,8 +1395,8 @@ dependencies = [
"rusoto_kms", "rusoto_kms",
"semver", "semver",
"serde_json", "serde_json",
"sha2 0.9.9", "sha2 0.10.2",
"spki 0.6.0", "spki",
"tempfile", "tempfile",
"thiserror", "thiserror",
"tokio", "tokio",
@ -1458,7 +1433,7 @@ dependencies = [
"semver", "semver",
"serde", "serde",
"serde_json", "serde_json",
"sha2 0.9.9", "sha2 0.10.2",
"solang-parser", "solang-parser",
"svm-rs", "svm-rs",
"svm-rs-builds", "svm-rs-builds",
@ -1540,9 +1515,9 @@ dependencies = [
[[package]] [[package]]
name = "ff" name = "ff"
version = "0.11.0" version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2958d04124b9f27f175eaeb9a9f383d026098aa837eadd8ba22c11f13a05b9e" checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e"
dependencies = [ dependencies = [
"rand_core 0.6.3", "rand_core 0.6.3",
"subtle", "subtle",
@ -1795,9 +1770,9 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
[[package]] [[package]]
name = "group" name = "group"
version = "0.11.0" version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d"
dependencies = [ dependencies = [
"ff", "ff",
"rand_core 0.6.3", "rand_core 0.6.3",
@ -1889,7 +1864,7 @@ version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b"
dependencies = [ dependencies = [
"crypto-mac 0.11.1", "crypto-mac",
"digest 0.9.0", "digest 0.9.0",
] ]
@ -2137,16 +2112,15 @@ dependencies = [
[[package]] [[package]]
name = "k256" name = "k256"
version = "0.10.4" version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" checksum = "2c8a5a96d92d849c4499d99461da81c9cdc1467418a8ed2aaeb407e8d85940ed"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"ecdsa", "ecdsa",
"elliptic-curve", "elliptic-curve",
"sec1", "sha2 0.10.2",
"sha2 0.9.9", "sha3",
"sha3 0.9.1",
] ]
[[package]] [[package]]
@ -2470,25 +2444,24 @@ dependencies = [
[[package]] [[package]]
name = "p256" name = "p256"
version = "0.10.1" version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19736d80675fbe9fe33426268150b951a3fb8f5cfca2a23a17c85ef3adb24e3b" checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594"
dependencies = [ dependencies = [
"ecdsa", "ecdsa",
"elliptic-curve", "elliptic-curve",
"sec1", "sha2 0.10.2",
"sha2 0.9.9",
] ]
[[package]] [[package]]
name = "p384" name = "p384"
version = "0.9.0" version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "755d8266e41f57bd8562ed9b6e93cdcf73ead050e1e8c3a27ea3871b6643a20c" checksum = "70723b6e03216e79df3765a7e4cdf39746c4a2392ba4bdb458111a939494cc1d"
dependencies = [ dependencies = [
"ecdsa", "ecdsa",
"elliptic-curve", "elliptic-curve",
"sec1", "sha2 0.10.2",
] ]
[[package]] [[package]]
@ -2567,9 +2540,9 @@ dependencies = [
[[package]] [[package]]
name = "password-hash" name = "password-hash"
version = "0.2.3" version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77e0b28ace46c5a396546bcf443bf422b57049617433d8854227352a4a9b24e7" checksum = "1d791538a6dcc1e7cb7fe6f6b58aca40e7f79403c45b2bc274008b5e647af1d8"
dependencies = [ dependencies = [
"base64ct", "base64ct",
"rand_core 0.6.3", "rand_core 0.6.3",
@ -2578,9 +2551,9 @@ dependencies = [
[[package]] [[package]]
name = "password-hash" name = "password-hash"
version = "0.3.2" version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d791538a6dcc1e7cb7fe6f6b58aca40e7f79403c45b2bc274008b5e647af1d8" checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700"
dependencies = [ dependencies = [
"base64ct", "base64ct",
"rand_core 0.6.3", "rand_core 0.6.3",
@ -2593,28 +2566,6 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c54014ba3c1880122928735226f78b6f5bf5bd1fed15e41e92cf7aa20278ce28" checksum = "c54014ba3c1880122928735226f78b6f5bf5bd1fed15e41e92cf7aa20278ce28"
[[package]]
name = "pbkdf2"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa"
dependencies = [
"base64ct",
"crypto-mac 0.11.1",
"hmac 0.11.0",
"password-hash 0.2.3",
"sha2 0.9.9",
]
[[package]]
name = "pbkdf2"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f05894bce6a1ba4be299d0c5f29563e08af2bc18bb7d48313113bed71e904739"
dependencies = [
"crypto-mac 0.11.1",
]
[[package]] [[package]]
name = "pbkdf2" name = "pbkdf2"
version = "0.10.1" version = "0.10.1"
@ -2624,7 +2575,19 @@ dependencies = [
"digest 0.10.3", "digest 0.10.3",
"hmac 0.12.1", "hmac 0.12.1",
"password-hash 0.3.2", "password-hash 0.3.2",
"sha2 0.10.1", "sha2 0.10.2",
]
[[package]]
name = "pbkdf2"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917"
dependencies = [
"digest 0.10.3",
"hmac 0.12.1",
"password-hash 0.4.2",
"sha2 0.10.2",
] ]
[[package]] [[package]]
@ -2746,13 +2709,12 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]] [[package]]
name = "pkcs8" name = "pkcs8"
version = "0.8.0" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba"
dependencies = [ dependencies = [
"der 0.5.1", "der",
"spki 0.5.4", "spki",
"zeroize",
] ]
[[package]] [[package]]
@ -3095,12 +3057,12 @@ dependencies = [
[[package]] [[package]]
name = "rfc6979" name = "rfc6979"
version = "0.1.0" version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32"
dependencies = [ dependencies = [
"crypto-bigint", "crypto-bigint",
"hmac 0.11.0", "hmac 0.12.1",
"zeroize", "zeroize",
] ]
@ -3120,14 +3082,12 @@ dependencies = [
] ]
[[package]] [[package]]
name = "ripemd160" name = "ripemd"
version = "0.9.1" version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251" checksum = "1facec54cb5e0dc08553501fa740091086d0259ad0067e0d4103448e4cb22ed3"
dependencies = [ dependencies = [
"block-buffer 0.9.0", "digest 0.10.3",
"digest 0.9.0",
"opaque-debug 0.3.0",
] ]
[[package]] [[package]]
@ -3353,7 +3313,7 @@ dependencies = [
"password-hash 0.3.2", "password-hash 0.3.2",
"pbkdf2 0.10.1", "pbkdf2 0.10.1",
"salsa20", "salsa20",
"sha2 0.10.1", "sha2 0.10.2",
] ]
[[package]] [[package]]
@ -3368,11 +3328,12 @@ dependencies = [
[[package]] [[package]]
name = "sec1" name = "sec1"
version = "0.2.1" version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928"
dependencies = [ dependencies = [
"der 0.5.1", "base16ct",
"der",
"generic-array 0.14.5", "generic-array 0.14.5",
"pkcs8", "pkcs8",
"subtle", "subtle",
@ -3556,13 +3517,14 @@ dependencies = [
[[package]] [[package]]
name = "sha2" name = "sha2"
version = "0.10.1" version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99c3bd8169c58782adad9290a9af5939994036b76187f7b4f0e6de91dbbfc0ec" checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"cpufeatures", "cpufeatures",
"digest 0.10.3", "digest 0.10.3",
"sha2-asm",
] ]
[[package]] [[package]]
@ -3574,18 +3536,6 @@ dependencies = [
"cc", "cc",
] ]
[[package]]
name = "sha3"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809"
dependencies = [
"block-buffer 0.9.0",
"digest 0.9.0",
"keccak",
"opaque-debug 0.3.0",
]
[[package]] [[package]]
name = "sha3" name = "sha3"
version = "0.10.0" version = "0.10.0"
@ -3622,20 +3572,20 @@ dependencies = [
[[package]] [[package]]
name = "signature" name = "signature"
version = "1.4.0" version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4"
dependencies = [ dependencies = [
"digest 0.9.0", "digest 0.10.3",
"rand_core 0.6.3", "rand_core 0.6.3",
"signature_derive", "signature_derive",
] ]
[[package]] [[package]]
name = "signature_derive" name = "signature_derive"
version = "1.0.0-pre.3" version = "1.0.0-pre.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ffba76095b73f87680d2cf325a8000d5fc507ca6c20c4f7e2747405550620d90" checksum = "a7b87d3bd8d687b9265557e613e59ddc5dcb2ed6395523846d2fe76736073d5c"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -3690,23 +3640,14 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
[[package]]
name = "spki"
version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27"
dependencies = [
"base64ct",
"der 0.5.1",
]
[[package]] [[package]]
name = "spki" name = "spki"
version = "0.6.0" version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b"
dependencies = [ dependencies = [
"der 0.6.0", "base64ct",
"der",
] ]
[[package]] [[package]]
@ -4275,6 +4216,15 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "uuid"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd6469f4314d5f1ffec476e05f17cc9a78bc7a27a6a857842170bdf8d6f98d2f"
dependencies = [
"serde",
]
[[package]] [[package]]
name = "valuable" name = "valuable"
version = "0.1.0" version = "0.1.0"
@ -4598,35 +4548,35 @@ checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3"
[[package]] [[package]]
name = "yubihsm" name = "yubihsm"
version = "0.40.0" version = "0.41.0-pre"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c7ba281142fd52beba6ed6e67752bdb93242dd7520908a1d93054bfb4dcc02d" checksum = "58964f0e7f3ddf7606324e0ceb1657577234724b8ad1ffc53b9b6ba342f559ce"
dependencies = [ dependencies = [
"aes", "aes",
"bitflags", "bitflags",
"block-modes", "block-modes",
"ccm", "ccm",
"cmac", "cmac",
"digest 0.9.0", "digest 0.10.3",
"ecdsa", "ecdsa",
"ed25519", "ed25519",
"ed25519-dalek", "ed25519-dalek",
"hmac 0.11.0", "hmac 0.12.1",
"k256", "k256",
"log", "log",
"p256", "p256",
"p384", "p384",
"pbkdf2 0.9.0", "pbkdf2 0.11.0",
"rand_core 0.6.3", "rand_core 0.6.3",
"rusb", "rusb",
"serde", "serde",
"serde_json", "serde_json",
"sha2 0.9.9", "sha2 0.10.2",
"signature", "signature",
"subtle", "subtle",
"thiserror", "thiserror",
"time", "time",
"uuid", "uuid 1.1.2",
"zeroize", "zeroize",
] ]

View File

@ -17,9 +17,9 @@ arrayvec = { version = "0.7.2", default-features = false }
rlp-derive = { version = "0.1.0", default-features = false } rlp-derive = { version = "0.1.0", default-features = false }
# crypto # crypto
elliptic-curve = { version = "0.11.12", default-features = false } elliptic-curve = { version = "0.12.2", default-features = false }
generic-array = { version = "0.14.5", default-features = false } generic-array = { version = "0.14.5", default-features = false }
k256 = { version = "0.10.4", default-features = false, features = ["keccak256", "ecdsa", "std"] } k256 = { version = "0.11", default-features = false, features = ["keccak256", "ecdsa", "std"] }
rand = { version = "0.8.5", default-features = false } rand = { version = "0.8.5", default-features = false }
tiny-keccak = { version = "2.0.2", default-features = false } tiny-keccak = { version = "2.0.2", default-features = false }

View File

@ -3,14 +3,8 @@ use crate::{
types::{Address, H256, U256}, types::{Address, H256, U256},
utils::hash_message, utils::hash_message,
}; };
use fastrlp::Decodable;
use serde::{Deserialize, Serialize};
use std::{convert::TryFrom, fmt, str::FromStr};
use thiserror::Error;
use elliptic_curve::{consts::U32, sec1::ToEncodedPoint}; use elliptic_curve::{consts::U32, sec1::ToEncodedPoint};
use fastrlp::Decodable;
use generic_array::GenericArray; use generic_array::GenericArray;
use k256::{ use k256::{
ecdsa::{ ecdsa::{
@ -19,6 +13,9 @@ use k256::{
}, },
PublicKey as K256PublicKey, PublicKey as K256PublicKey,
}; };
use serde::{Deserialize, Serialize};
use std::{convert::TryFrom, fmt, str::FromStr};
use thiserror::Error;
/// An error involving a signature. /// An error involving a signature.
#[derive(Debug, Error)] #[derive(Debug, Error)]
@ -103,8 +100,8 @@ impl Signature {
}; };
let (recoverable_sig, _recovery_id) = self.as_signature()?; let (recoverable_sig, _recovery_id) = self.as_signature()?;
let verify_key = let verify_key = recoverable_sig
recoverable_sig.recover_verify_key_from_digest_bytes(message_hash.as_ref().into())?; .recover_verifying_key_from_digest_bytes(message_hash.as_ref().into())?;
let public_key = K256PublicKey::from(&verify_key); let public_key = K256PublicKey::from(&verify_key);
let public_key = public_key.to_encoded_point(/* compress = */ false); let public_key = public_key.to_encoded_point(/* compress = */ false);

View File

@ -16,15 +16,15 @@ rustdoc-args = ["--cfg", "docsrs"]
[dependencies] [dependencies]
ethers-core = { version = "^0.13.0", path = "../ethers-core", features = ["eip712"]} ethers-core = { version = "^0.13.0", path = "../ethers-core", features = ["eip712"]}
thiserror = { version = "1.0.31", default-features = false } thiserror = { version = "1.0.31", default-features = false }
coins-bip32 = "0.6.0" coins-bip32 = "0.7.0"
coins-bip39 = "0.6.0" coins-bip39 = "0.7.0"
coins-ledger = { version = "0.6.1", default-features = false, optional = true } coins-ledger = { version = "0.7.0", default-features = false, optional = true }
hex = { version = "0.4.3", default-features = false, features = ["std"] } hex = { version = "0.4.3", default-features = false, features = ["std"] }
async-trait = { version = "0.1.50", default-features = false } async-trait = { version = "0.1.50", default-features = false }
elliptic-curve = { version = "0.11.12", default-features = false } elliptic-curve = { version = "0.12.2", default-features = false }
sha2 = { version = "0.9.8", default-features = false } sha2 = { version = "0.10.2", default-features = false }
rand = { version = "0.8.5", default-features = false } rand = { version = "0.8.5", default-features = false }
yubihsm = { version = "0.40.0", features = ["secp256k1", "http", "usb"], optional = true } yubihsm = { version = "0.41.0-pre", features = ["secp256k1", "http", "usb"], optional = true }
futures-util = { version = "^0.3", optional = true } futures-util = { version = "^0.3", optional = true }
futures-executor = { version = "^0.3", optional = true } futures-executor = { version = "^0.3", optional = true }
semver = { version = "1.0.12", optional = true } semver = { version = "1.0.12", optional = true }
@ -45,10 +45,10 @@ ethers-contract = { version = "^0.13.0", path = "../ethers-contract", features =
ethers-derive-eip712 = { version = "^0.13.0", path = "../ethers-core/ethers-derive-eip712" } ethers-derive-eip712 = { version = "^0.13.0", path = "../ethers-core/ethers-derive-eip712" }
serde_json = { version = "1.0.64" } serde_json = { version = "1.0.64" }
tracing-subscriber = "0.3.11" tracing-subscriber = "0.3.11"
yubihsm = { version = "0.40.0", features = ["secp256k1", "usb", "mockhsm"] } yubihsm = { version = "0.41.0-pre", features = ["secp256k1", "usb", "mockhsm"] }
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
yubihsm = { version = "0.40.0", features = ["secp256k1", "usb", "mockhsm"] } yubihsm = { version = "0.41.0-pre", features = ["secp256k1", "usb", "mockhsm"] }
tokio = { version = "1.18", default-features = false, features = ["macros", "rt"] } tokio = { version = "1.18", default-features = false, features = ["macros", "rt"] }
tempfile = "3.3.0" tempfile = "3.3.0"

View File

@ -34,7 +34,7 @@ pub(super) fn rsig_to_ethsig(sig: &RSig) -> EthSig {
/// Makes a trial recovery to check whether an RSig corresponds to a known /// Makes a trial recovery to check whether an RSig corresponds to a known
/// `VerifyingKey` /// `VerifyingKey`
fn check_candidate(sig: &RSig, digest: [u8; 32], vk: &VerifyingKey) -> bool { fn check_candidate(sig: &RSig, digest: [u8; 32], vk: &VerifyingKey) -> bool {
if let Ok(key) = sig.recover_verify_key_from_digest_bytes(digest.as_ref().into()) { if let Ok(key) = sig.recover_verifying_key_from_digest_bytes(digest.as_ref().into()) {
key == *vk key == *vk
} else { } else {
false false

View File

@ -1,9 +1,9 @@
//! This is a helper module used to pass the pre-hashed message for signing to the //! This is a helper module used to pass the pre-hashed message for signing to the
//! `sign_digest` methods of K256. //! `sign_digest` methods of K256.
use elliptic_curve::consts::U64;
use ethers_core::{ use ethers_core::{
k256::ecdsa::signature::digest::{ k256::ecdsa::signature::digest::{
generic_array::GenericArray, BlockInput, Digest, FixedOutput, Output, Reset, Update, generic_array::GenericArray, Digest, FixedOutput, FixedOutputReset, HashMarker, Output,
OutputSizeUser, Reset, Update,
}, },
types::H256, types::H256,
}; };
@ -18,7 +18,7 @@ pub enum ProxyDigest<D: Digest> {
impl<D: Digest + Clone> From<H256> for ProxyDigest<D> impl<D: Digest + Clone> From<H256> for ProxyDigest<D>
where where
GenericArray<u8, <D as Digest>::OutputSize>: Copy, GenericArray<u8, <D as OutputSizeUser>::OutputSize>: Copy,
{ {
fn from(src: H256) -> Self { fn from(src: H256) -> Self {
ProxyDigest::Proxy(*GenericArray::from_slice(src.as_bytes())) ProxyDigest::Proxy(*GenericArray::from_slice(src.as_bytes()))
@ -33,7 +33,7 @@ impl<D: Digest> Default for ProxyDigest<D> {
impl<D: Digest> Update for ProxyDigest<D> { impl<D: Digest> Update for ProxyDigest<D> {
// we update only if we are digest // we update only if we are digest
fn update(&mut self, data: impl AsRef<[u8]>) { fn update(&mut self, data: &[u8]) {
match self { match self {
ProxyDigest::Digest(ref mut d) => { ProxyDigest::Digest(ref mut d) => {
d.update(data); d.update(data);
@ -43,17 +43,9 @@ impl<D: Digest> Update for ProxyDigest<D> {
} }
} }
} }
}
// we chain only if we are digest impl<D: Digest> HashMarker for ProxyDigest<D> {}
fn chain(self, data: impl AsRef<[u8]>) -> Self {
match self {
ProxyDigest::Digest(d) => ProxyDigest::Digest(d.chain(data)),
ProxyDigest::Proxy(..) => {
unreachable!("can not update if we are proxy");
}
}
}
}
impl<D: Digest> Reset for ProxyDigest<D> { impl<D: Digest> Reset for ProxyDigest<D> {
// make new one // make new one
@ -62,15 +54,12 @@ impl<D: Digest> Reset for ProxyDigest<D> {
} }
} }
// Use Sha256 with 512 bit blocks impl<D: Digest> OutputSizeUser for ProxyDigest<D> {
impl<D: Digest> BlockInput for ProxyDigest<D> { // we default to the output of the original digest
type BlockSize = U64; type OutputSize = <D as OutputSizeUser>::OutputSize;
} }
impl<D: Digest> FixedOutput for ProxyDigest<D> { impl<D: Digest> FixedOutput for ProxyDigest<D> {
// we default to the output of the original digest
type OutputSize = D::OutputSize;
fn finalize_into(self, out: &mut GenericArray<u8, Self::OutputSize>) { fn finalize_into(self, out: &mut GenericArray<u8, Self::OutputSize>) {
match self { match self {
ProxyDigest::Digest(d) => { ProxyDigest::Digest(d) => {
@ -81,9 +70,11 @@ impl<D: Digest> FixedOutput for ProxyDigest<D> {
} }
} }
} }
}
fn finalize_into_reset(&mut self, out: &mut GenericArray<u8, Self::OutputSize>) { impl<D: Digest> FixedOutputReset for ProxyDigest<D> {
fn finalize_into_reset(&mut self, out: &mut Output<Self>) {
let s = std::mem::take(self); let s = std::mem::take(self);
s.finalize_into(out); Digest::finalize_into(s, out)
} }
} }

View File

@ -52,7 +52,7 @@ impl Clone for Wallet<SigningKey> {
fn clone(&self) -> Self { fn clone(&self) -> Self {
Self { Self {
// TODO: Can we have a better way to clone here? // TODO: Can we have a better way to clone here?
signer: SigningKey::from_bytes(&*self.signer.to_bytes()).unwrap(), signer: SigningKey::from_bytes(&self.signer.to_bytes()).unwrap(),
address: self.address, address: self.address,
chain_id: self.chain_id, chain_id: self.chain_id,
} }

View File

@ -33,7 +33,7 @@ num_cpus = "1.13.1"
tiny-keccak = { version = "2.0.2", default-features = false } tiny-keccak = { version = "2.0.2", default-features = false }
tempfile = { version = "3.3.0", optional = true } tempfile = { version = "3.3.0", optional = true }
fs_extra = { version = "1.2.0", optional = true } fs_extra = { version = "1.2.0", optional = true }
sha2 = { version = "0.9.8", default-features = false, optional = true } sha2 = { version = "0.10.2", default-features = false, optional = true }
dunce = "1.0.2" dunce = "1.0.2"
solang-parser = { default-features = false, version = "=0.1.16" } solang-parser = { default-features = false, version = "=0.1.16" }
rayon = "1.5.3" rayon = "1.5.3"