diff --git a/Cargo.lock b/Cargo.lock index 9a33cafc4..596fc65c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -402,12 +402,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - [[package]] name = "base16ct" version = "0.2.0" @@ -918,12 +912,6 @@ dependencies = [ "ttrpc-codegen", ] -[[package]] -name = "const-oid" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" - [[package]] name = "const-oid" version = "0.9.5" @@ -1117,28 +1105,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "crypto-bigint" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "crypto-bigint" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" -dependencies = [ - "generic-array", - "rand_core 0.6.4", - "subtle", - "zeroize", -] - [[package]] name = "crypto-bigint" version = "0.5.5" @@ -1172,6 +1138,21 @@ dependencies = [ "subtle", ] +[[package]] +name = "crypto_secretbox" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d6cf87adf719ddf43a805e92c6870a531aedda35ff640442cbaf8674e141e1" +dependencies = [ + "aead", + "cipher", + "generic-array", + "poly1305", + "salsa20", + "subtle", + "zeroize", +] + [[package]] name = "csv-rs" version = "0.1.0" @@ -1222,19 +1203,32 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.0.0-rc.1" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d4ba9852b42210c7538b75484f9daa0655e9a3ac04f693747bb0f02cf3cfe16" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", - "packed_simd_2", "platforms", + "rustc_version 0.4.0", "subtle", "zeroize", ] +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + [[package]] name = "curve25519-dalek-ng" version = "4.1.1" @@ -1340,26 +1334,13 @@ dependencies = [ "generic-array", ] -[[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", - "crypto-bigint 0.3.2", - "pem-rfc7468 0.3.1", -] - [[package]] name = "der" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ - "const-oid 0.9.5", - "der_derive", - "flagset", + "const-oid", "pem-rfc7468 0.6.0", "zeroize", ] @@ -1370,21 +1351,22 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ - "const-oid 0.9.5", + "const-oid", + "der_derive", + "flagset", "pem-rfc7468 0.7.0", "zeroize", ] [[package]] name = "der_derive" -version = "0.6.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ef71ddb5b3a1f53dee24817c8f70dfa1cb29e804c18d88c228d4bc9c86ee3b9" +checksum = "5fe87ce4529967e0ba1dcf8450bab64d97dfd5010a6256187ffe2e43e6f0e049" dependencies = [ - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] @@ -1498,7 +1480,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", - "const-oid 0.9.5", + "const-oid", "crypto-common", "subtle", ] @@ -1584,18 +1566,6 @@ dependencies = [ "cipher", ] -[[package]] -name = "ecdsa" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12844141594ad74185a926d030f3b605f6a903b4e3fec351f3ea338ac5b7637e" -dependencies = [ - "der 0.6.1", - "elliptic-curve 0.12.3", - "rfc6979 0.3.1", - "signature 2.0.0", -] - [[package]] name = "ecdsa" version = "0.16.9" @@ -1604,8 +1574,8 @@ checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der 0.7.8", "digest 0.10.7", - "elliptic-curve 0.13.8", - "rfc6979 0.4.0", + "elliptic-curve", + "rfc6979", "signature 2.0.0", "spki 0.7.2", ] @@ -1621,11 +1591,11 @@ dependencies = [ [[package]] name = "ed25519" -version = "2.1.0" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf420a7ec85d98495b0c34aa4a58ca117f982ffbece111aeb545160148d7010" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ - "pkcs8 0.9.0", + "pkcs8 0.10.2", "signature 2.0.0", ] @@ -1654,15 +1624,16 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.0.0-pre.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd577ba9d4bcab443cac60003d8fd32c638e7024a3ec92c200d7af5d2c397ed" +checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" dependencies = [ - "curve25519-dalek 4.0.0-rc.1", - "ed25519 2.1.0", + "curve25519-dalek 4.1.1", + "ed25519 2.2.3", "rand_core 0.6.4", "serde", "sha2 0.10.8", + "subtle", "zeroize", ] @@ -1691,45 +1662,23 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" -[[package]] -name = "elliptic-curve" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" -dependencies = [ - "base16ct 0.1.1", - "crypto-bigint 0.4.9", - "der 0.6.1", - "digest 0.10.7", - "ff 0.12.1", - "generic-array", - "group 0.12.1", - "hkdf", - "pem-rfc7468 0.6.0", - "pkcs8 0.9.0", - "rand_core 0.6.4", - "sec1 0.3.0", - "subtle", - "zeroize", -] - [[package]] name = "elliptic-curve" version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ - "base16ct 0.2.0", - "crypto-bigint 0.5.5", + "base16ct", + "crypto-bigint", "digest 0.10.7", - "ff 0.13.0", + "ff", "generic-array", - "group 0.13.0", + "group", "hkdf", "pem-rfc7468 0.7.0", "pkcs8 0.10.2", "rand_core 0.6.4", - "sec1 0.7.3", + "sec1", "subtle", "zeroize", ] @@ -1841,16 +1790,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" -[[package]] -name = "ff" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" -dependencies = [ - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "ff" version = "0.13.0" @@ -1863,9 +1802,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.1.20" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" [[package]] name = "filetime" @@ -2175,24 +2114,13 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "group" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" -dependencies = [ - "ff 0.12.1", - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "group" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "ff 0.13.0", + "ff", "rand_core 0.6.4", "subtle", ] @@ -2782,8 +2710,8 @@ dependencies = [ "hmac-sha256", "hmac-sha512", "k256", - "p256 0.13.2", - "p384 0.13.0", + "p256", + "p384", "rand 0.8.5", "rsa 0.7.2", "serde", @@ -2800,8 +2728,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" dependencies = [ "cfg-if", - "ecdsa 0.16.9", - "elliptic-curve 0.13.8", + "ecdsa", + "elliptic-curve", "once_cell", "sha2 0.10.8", "signature 2.0.0", @@ -3011,12 +2939,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "libm" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" - [[package]] name = "libm" version = "0.2.8" @@ -3303,7 +3225,7 @@ checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" dependencies = [ "byteorder", "lazy_static", - "libm 0.2.8", + "libm", "num-integer", "num-iter", "num-traits", @@ -3352,7 +3274,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", - "libm 0.2.8", + "libm", ] [[package]] @@ -3691,39 +3613,15 @@ dependencies = [ "yasna 0.5.2", ] -[[package]] -name = "p256" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49c124b3cbce43bcbac68c58ec181d98ed6cc7e6d0aa7c3ba97b2563410b0e55" -dependencies = [ - "ecdsa 0.15.1", - "elliptic-curve 0.12.3", - "primeorder 0.12.1", - "sha2 0.10.8", -] - [[package]] name = "p256" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" dependencies = [ - "ecdsa 0.16.9", - "elliptic-curve 0.13.8", - "primeorder 0.13.6", - "sha2 0.10.8", -] - -[[package]] -name = "p384" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630a4a9b2618348ececfae61a4905f564b817063bf2d66cdfc2ced523fe1d2d4" -dependencies = [ - "ecdsa 0.15.1", - "elliptic-curve 0.12.3", - "primeorder 0.12.1", + "ecdsa", + "elliptic-curve", + "primeorder", "sha2 0.10.8", ] @@ -3733,22 +3631,12 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70786f51bcc69f6a4c0360e063a4cac5419ef7c5cd5b3c99ad70f3be5ba79209" dependencies = [ - "ecdsa 0.16.9", - "elliptic-curve 0.13.8", - "primeorder 0.13.6", + "ecdsa", + "elliptic-curve", + "primeorder", "sha2 0.10.8", ] -[[package]] -name = "packed_simd_2" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1914cd452d8fccd6f9db48147b29fd4ae05bea9dc5d9ad578509f72415de282" -dependencies = [ - "cfg-if", - "libm 0.1.4", -] - [[package]] name = "parking_lot" version = "0.12.1" @@ -3774,9 +3662,9 @@ dependencies = [ [[package]] name = "password-hash" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" dependencies = [ "base64ct", "rand_core 0.6.4", @@ -3792,6 +3680,16 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac 0.12.1", +] + [[package]] name = "peeking_take_while" version = "0.1.2" @@ -3800,20 +3698,12 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" [[package]] name = "pem" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" -dependencies = [ - "base64 0.13.1", -] - -[[package]] -name = "pem-rfc7468" -version = "0.3.1" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01de5d978f34aa4b2296576379fcc416034702fd94117c56ffd8a1a767cefb30" +checksum = "6b13fe415cdf3c8e44518e18a7c95a13431d9bdf6d15367d82b23c377fdd441a" dependencies = [ - "base64ct", + "base64 0.21.5", + "serde", ] [[package]] @@ -3882,38 +3772,29 @@ dependencies = [ [[package]] name = "picky" -version = "7.0.0-rc.5" +version = "7.0.0-rc.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ac7d98dfb5e53cdea76b70df8d5e8dd7717a2d685a12f54c547e03b5afd76a" +checksum = "52cccdaffd2f361b4b4eb70b4249bd71d89bb66cb84b7f76483ecd1640c543ce" dependencies = [ - "base64 0.13.1", + "base64 0.21.5", "digest 0.10.7", + "ed25519-dalek 2.1.0", "md-5", "num-bigint-dig", - "oid", - "p256 0.12.0", - "p384 0.12.0", - "picky-asn1 0.7.2", + "p256", + "p384", + "picky-asn1", "picky-asn1-der", - "picky-asn1-x509 0.9.0", + "picky-asn1-x509", "rand 0.8.5", - "rsa 0.6.1", + "rand_core 0.6.4", + "rsa 0.9.3", "serde", - "sha-1", + "sha1", "sha2 0.10.8", "sha3", "thiserror", -] - -[[package]] -name = "picky-asn1" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f338f1fd4f3e13e75e986ca29f2a3c62528d88d3cbadf4afdcefb6b087f2d32" -dependencies = [ - "oid", - "serde", - "serde_bytes", + "x25519-dalek", "zeroize", ] @@ -3926,6 +3807,7 @@ dependencies = [ "oid", "serde", "serde_bytes", + "zeroize", ] [[package]] @@ -3934,26 +3816,11 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5df7873a9e36d42dadb393bea5e211fe83d793c172afad5fb4ec846ec582793f" dependencies = [ - "picky-asn1 0.8.0", + "picky-asn1", "serde", "serde_bytes", ] -[[package]] -name = "picky-asn1-x509" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb51541f90aa99f2fa7191c8daebc224d500cd5963c6ca3e6cede9645a1b2e1" -dependencies = [ - "base64 0.13.1", - "num-bigint-dig", - "oid", - "picky-asn1 0.7.2", - "picky-asn1-der", - "serde", - "zeroize", -] - [[package]] name = "picky-asn1-x509" version = "0.12.0" @@ -3961,10 +3828,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c5f20f71a68499ff32310f418a6fad8816eac1a2859ed3f0c5c741389dd6208" dependencies = [ "base64 0.21.5", + "num-bigint-dig", "oid", - "picky-asn1 0.8.0", + "picky-asn1", "picky-asn1-der", "serde", + "zeroize", ] [[package]] @@ -3999,17 +3868,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkcs1" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a78f66c04ccc83dd4486fd46c33896f4e17b24a7a3a6400dedc48ed0ddd72320" -dependencies = [ - "der 0.5.1", - "pkcs8 0.8.0", - "zeroize", -] - [[package]] name = "pkcs1" version = "0.4.1" @@ -4043,21 +3901,25 @@ dependencies = [ "cbc", "der 0.6.1", "hmac 0.12.1", - "pbkdf2", - "scrypt", + "pbkdf2 0.11.0", + "scrypt 0.10.0", "sha2 0.10.8", "spki 0.6.0", ] [[package]] -name = "pkcs8" -version = "0.8.0" +name = "pkcs5" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +checksum = "e847e2c91a18bfa887dd028ec33f2fe6f25db77db3619024764914affe8b69a6" dependencies = [ - "der 0.5.1", - "spki 0.5.4", - "zeroize", + "aes", + "cbc", + "der 0.7.8", + "pbkdf2 0.12.2", + "scrypt 0.11.0", + "sha2 0.10.8", + "spki 0.7.2", ] [[package]] @@ -4067,7 +3929,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" dependencies = [ "der 0.6.1", - "pkcs5", + "pkcs5 0.5.0", "rand_core 0.6.4", "spki 0.6.0", ] @@ -4079,6 +3941,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ "der 0.7.8", + "pkcs5 0.7.1", + "rand_core 0.6.4", "spki 0.7.2", ] @@ -4145,22 +4009,13 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "primeorder" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b54f7131b3dba65a2f414cf5bd25b66d4682e4608610668eae785750ba4c5b2" -dependencies = [ - "elliptic-curve 0.12.3", -] - [[package]] name = "primeorder" version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" dependencies = [ - "elliptic-curve 0.13.8", + "elliptic-curve", ] [[package]] @@ -4675,17 +4530,6 @@ dependencies = [ "rand 0.8.5", ] -[[package]] -name = "rfc6979" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" -dependencies = [ - "crypto-bigint 0.4.9", - "hmac 0.12.1", - "zeroize", -] - [[package]] name = "rfc6979" version = "0.4.0" @@ -4734,26 +4578,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "rsa" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cf22754c49613d2b3b119f0e5d46e34a2c628a937e3024b8762de4e7d8c710b" -dependencies = [ - "byteorder", - "digest 0.10.7", - "num-bigint-dig", - "num-integer", - "num-iter", - "num-traits", - "pkcs1 0.3.3", - "pkcs8 0.8.0", - "rand_core 0.6.4", - "smallvec", - "subtle", - "zeroize", -] - [[package]] name = "rsa" version = "0.7.2" @@ -4802,7 +4626,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86ef35bf3e7fe15a53c4ab08a998e42271eab13eb0db224126bc7bc4c4bad96d" dependencies = [ - "const-oid 0.9.5", + "const-oid", "digest 0.10.7", "num-bigint-dig", "num-integer", @@ -4993,8 +4817,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" dependencies = [ "hmac 0.12.1", + "pbkdf2 0.11.0", + "salsa20", + "sha2 0.10.8", +] + +[[package]] +name = "scrypt" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" +dependencies = [ "password-hash", - "pbkdf2", + "pbkdf2 0.12.2", "salsa20", "sha2 0.10.8", ] @@ -5009,27 +4844,13 @@ dependencies = [ "untrusted 0.9.0", ] -[[package]] -name = "sec1" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" -dependencies = [ - "base16ct 0.1.1", - "der 0.6.1", - "generic-array", - "pkcs8 0.9.0", - "subtle", - "zeroize", -] - [[package]] name = "sec1" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ - "base16ct 0.2.0", + "base16ct", "der 0.7.8", "generic-array", "pkcs8 0.10.2", @@ -5126,7 +4947,7 @@ dependencies = [ "dyn-clone", "eax", "ecb", - "ecdsa 0.16.9", + "ecdsa", "ed25519 1.5.3", "ed25519-dalek 1.0.1", "flate2", @@ -5142,7 +4963,7 @@ dependencies = [ "memsec", "num-bigint-dig", "once_cell", - "p256 0.13.2", + "p256", "rand 0.7.3", "rand 0.8.5", "rand_core 0.6.4", @@ -5466,33 +5287,33 @@ dependencies = [ [[package]] name = "sigstore" -version = "0.6.0" -source = "git+https://github.com/sigstore/sigstore-rs.git?rev=69e8f33#69e8f3310e5ecff7dbe15ae6b45e2edf091aa4db" +version = "0.7.2" +source = "git+https://github.com/sigstore/sigstore-rs.git?tag=v0.7.2#4111411119510ebbb09831485c99214225f14353" dependencies = [ "async-trait", "base64 0.21.5", "cfg-if", "chrono", - "const-oid 0.9.5", - "der 0.6.1", + "const-oid", + "crypto_secretbox", "digest 0.10.7", - "ecdsa 0.15.1", - "ed25519 2.1.0", - "ed25519-dalek 2.0.0-pre.0", - "elliptic-curve 0.12.3", + "ecdsa", + "ed25519 2.2.3", + "ed25519-dalek 2.1.0", + "elliptic-curve", "getrandom 0.2.11", "lazy_static", "oci-distribution", "olpc-cjson", - "p256 0.12.0", - "p384 0.12.0", + "p256", + "p384", "pem", "picky", - "pkcs1 0.4.1", - "pkcs8 0.9.0", + "pkcs1 0.7.5", + "pkcs8 0.10.2", "rand 0.8.5", - "rsa 0.8.2", - "scrypt", + "rsa 0.9.3", + "scrypt 0.11.0", "serde", "serde_json", "sha2 0.10.8", @@ -5503,7 +5324,6 @@ dependencies = [ "url", "webbrowser", "x509-cert", - "xsalsa20poly1305", "zeroize", ] @@ -5560,16 +5380,6 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -[[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]] name = "spki" version = "0.6.0" @@ -6186,8 +5996,8 @@ dependencies = [ "num-derive", "num-traits", "oid", - "picky-asn1 0.8.0", - "picky-asn1-x509 0.12.0", + "picky-asn1", + "picky-asn1-x509", "regex", "serde", "tss-esapi-sys", @@ -6894,6 +6704,18 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "x25519-dalek" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" +dependencies = [ + "curve25519-dalek 4.1.1", + "rand_core 0.6.4", + "serde", + "zeroize", +] + [[package]] name = "x25519-dalek-ng" version = "1.1.1" @@ -6908,14 +6730,13 @@ dependencies = [ [[package]] name = "x509-cert" -version = "0.1.1" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d224a125dec5adda27d0346b9cae9794830279c4f9c27e4ab0b6c408d54012" +checksum = "25eefca1d99701da3a57feb07e5079fc62abba059fc139e98c13bbb250f3ef29" dependencies = [ - "const-oid 0.9.5", - "der 0.6.1", - "flagset", - "spki 0.6.0", + "const-oid", + "der 0.7.8", + "spki 0.7.2", ] [[package]] @@ -6927,19 +6748,6 @@ dependencies = [ "libc", ] -[[package]] -name = "xsalsa20poly1305" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02a6dad357567f81cd78ee75f7c61f1b30bb2fe4390be8fb7c69e2ac8dffb6c7" -dependencies = [ - "aead", - "poly1305", - "salsa20", - "subtle", - "zeroize", -] - [[package]] name = "xxhash-rust" version = "0.8.7" diff --git a/image-rs/Cargo.toml b/image-rs/Cargo.toml index d599bad79..7e06aef7e 100644 --- a/image-rs/Cargo.toml +++ b/image-rs/Cargo.toml @@ -38,7 +38,7 @@ serde = { workspace = true, features = ["serde_derive", "rc"] } serde_json.workspace = true serde_yaml = { version = "0.9", optional = true } sha2.workspace = true -sigstore = { git = "https://github.com/sigstore/sigstore-rs.git", rev = "69e8f33", default-features = false, optional = true} +sigstore = { git = "https://github.com/sigstore/sigstore-rs.git", tag = "v0.7.2", default-features = false, optional = true} strum.workspace = true strum_macros = "0.25" tar = "0.4.37" diff --git a/image-rs/src/signature/mechanism/cosign/mod.rs b/image-rs/src/signature/mechanism/cosign/mod.rs index cbfd4ee56..e919758e5 100644 --- a/image-rs/src/signature/mechanism/cosign/mod.rs +++ b/image-rs/src/signature/mechanism/cosign/mod.rs @@ -5,7 +5,7 @@ //! Cosign verification -use anyhow::{anyhow, bail, Context, Result}; +use anyhow::{anyhow, bail, Result}; use async_trait::async_trait; use oci_distribution::secrets::RegistryAuth; use serde::{Deserialize, Serialize}; @@ -18,8 +18,9 @@ use sigstore::{ }, crypto::SigningScheme, errors::SigstoreVerifyConstraintsError, - registry::Auth, + registry::{Auth, OciReference}, }; +use std::str::FromStr; use super::SignScheme; use crate::resource; @@ -134,35 +135,17 @@ impl CosignParameters { (Some(_), Some(_)) => bail!("Both keyPath and keyData are specified."), }; - let image_ref = image.reference.whole(); + let image_ref = OciReference::from_str(&image.reference.whole())?; + let auth = &Auth::from(auth); - let auth = auth.clone(); - // Get the signature layers in cosign signature "image"'s manifest - let signature_layers = tokio::task::spawn_blocking(move || -> Result<_> { - let auth = Auth::from(&auth); + let mut client = ClientBuilder::default().build()?; - let mut client = ClientBuilder::default().build()?; + // Get the cosign signature "image"'s uri and the signed image's digest + let (cosign_image, source_image_digest) = client.triangulate(&image_ref, auth).await?; - // Get the cosign signature "image"'s uri and the signed image's digest - // - // We need a runtime here because now `triangulate` is a future - // that cannot be `Send` between threads. Thus we need to create a - // runtime and disable context switch here. - let rt = tokio::runtime::Runtime::new()?; - let (cosign_image, source_image_digest) = - rt.block_on(client.triangulate(&image_ref, &auth))?; - - let layers = rt.block_on(client.trusted_signature_layers( - &auth, - &source_image_digest, - &cosign_image, - ))?; - - Ok(layers) - }) - .await - .context("tokio spawn")? - .context("get signature layers")?; + let signature_layers = client + .trusted_signature_layers(auth, &source_image_digest, &cosign_image) + .await?; // By default, the hashing algorithm is SHA256 let pub_key_verifier = @@ -315,7 +298,7 @@ mod tests { "registry.cn-hangzhou.aliyuncs.com/xynnn/cosign:latest", false, // If verified failed, the pubkey given to verify will be printed. - "[PublicKeyVerifier { key: ECDSA_P256_SHA256_ASN1(VerifyingKey { inner: PublicKey { point: AffinePoint { x: FieldElement(UInt { limbs: [Limb(540873142526201775), Limb(9033147506996235883), Limb(13963524140470157687), Limb(5553333931660335980)] }), y: FieldElement(UInt { limbs: [Limb(310064843663294190), Limb(16768641685016372219), Limb(6660968332548595134), Limb(15802642679658786528)] }), infinity: 0 } } }) }]" + "[PublicKeyVerifier { key: ECDSA_P256_SHA256_ASN1(VerifyingKey { inner: PublicKey { point: AffinePoint { x: FieldElement(0x4D1167C9BBBCDB6CC1C867394D50C1777D5C2FCC46374E6B07819141E8D2CFAF), y: FieldElement(0xDB4E43CA897D2EE05C70836839AF5DBEE8B62EC4B93563FB044D92551FE33EEE), infinity: 0 } } }) }]" )] #[case( &format!("\ @@ -345,7 +328,7 @@ mod tests { "quay.io/kata-containers/confidential-containers:cosign-signed", false, // If verified failed, the pubkey given to verify will be printed. - "[PublicKeyVerifier { key: ECDSA_P256_SHA256_ASN1(VerifyingKey { inner: PublicKey { point: AffinePoint { x: FieldElement(UInt { limbs: [Limb(540873142526201775), Limb(9033147506996235883), Limb(13963524140470157687), Limb(5553333931660335980)] }), y: FieldElement(UInt { limbs: [Limb(310064843663294190), Limb(16768641685016372219), Limb(6660968332548595134), Limb(15802642679658786528)] }), infinity: 0 } } }) }]", + "[PublicKeyVerifier { key: ECDSA_P256_SHA256_ASN1(VerifyingKey { inner: PublicKey { point: AffinePoint { x: FieldElement(0x4D1167C9BBBCDB6CC1C867394D50C1777D5C2FCC46374E6B07819141E8D2CFAF), y: FieldElement(0xDB4E43CA897D2EE05C70836839AF5DBEE8B62EC4B93563FB044D92551FE33EEE), infinity: 0 } } }) }]" )] #[case( &format!("\