From 758d155f6a4367f51c493a0f5f690c36c24b83c7 Mon Sep 17 00:00:00 2001 From: Pavlo Myroniuk Date: Fri, 6 Dec 2024 22:52:55 +0200 Subject: [PATCH] feat(crypto-helper): crypto-helper: implement \`HmacSha\` algorithm; --- Cargo.lock | 589 ++++++++++++++-------------- Cargo.toml | 8 +- src/crypto_helper/algorithm.rs | 100 ++++- src/crypto_helper/computations.rs | 125 +++++- src/crypto_helper/info/mod.rs | 7 +- src/crypto_helper/input/hmac_sha.rs | 152 +++++++ src/crypto_helper/input/mod.rs | 6 + src/crypto_helper/mod.rs | 9 +- src/crypto_helper/output/mod.rs | 1 + 9 files changed, 694 insertions(+), 303 deletions(-) create mode 100644 src/crypto_helper/input/hmac_sha.rs diff --git a/Cargo.lock b/Cargo.lock index ef3e56fc..b6c9cd6a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,13 +4,19 @@ version = 4 [[package]] name = "addr2line" -version = "0.24.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + [[package]] name = "adler2" version = "2.0.0" @@ -39,9 +45,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.18" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -54,36 +60,36 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.10" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.6" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.2" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.6" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -121,23 +127,23 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.4.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.74" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", + "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", - "windows-targets", ] [[package]] @@ -166,13 +172,13 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bcrypt" -version = "0.16.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b1866ecef4f2d06a0bb77880015fdf2b89e25a1c2e5addacb87e459c86dc67e" +checksum = "e65938ed058ef47d92cf8b346cc76ef48984572ade631927e9937b5ffc7662c7" dependencies = [ "base64 0.22.1", "blowfish", - "getrandom 0.2.15", + "getrandom", "subtle", "zeroize", ] @@ -213,7 +219,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ - "digest", + "digest 0.10.7", ] [[package]] @@ -225,6 +231,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.11.0-rc.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8969801e57d15e15bc4d7cdc5600dc15ca06a9a62b622bd4871c2d21d8aeb42d" +dependencies = [ + "crypto-common 0.2.0-rc.1", +] + [[package]] name = "block-padding" version = "0.3.3" @@ -264,9 +279,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.9.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "cbc" @@ -279,9 +294,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.2" +version = "1.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" +checksum = "50d2eb3cd3d1bf4529e31c215ee6f93ec5a3d536d9f578f93d9d33ee19562932" dependencies = [ "shlex", ] @@ -298,15 +313,15 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "crypto-common", + "crypto-common 0.1.6", "inout", ] [[package]] name = "colorchoice" -version = "1.0.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "console_error_panic_hook" @@ -324,11 +339,17 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "const-oid" +version = "0.10.0-rc.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9adcf94f05e094fca3005698822ec791cb4433ced416afda1c5ca3b8dfc05a2f" + [[package]] name = "cpufeatures" -version = "0.2.16" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] @@ -348,7 +369,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17d88231face754cdb045c1b65912a0f4ff78ca24bf371e30a4a8cfa993b3897" dependencies = [ - "crypto-common", + "crypto-common 0.1.6", ] [[package]] @@ -373,6 +394,17 @@ dependencies = [ "typenum", ] +[[package]] +name = "crypto-common" +version = "0.2.0-rc.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0b8ce8218c97789f16356e7896b3714f26c2ee1079b79c0b7ae7064bb9089fa" +dependencies = [ + "getrandom", + "hybrid-array", + "rand_core 0.6.4", +] + [[package]] name = "crypto-helper" version = "0.15.0" @@ -392,13 +424,13 @@ dependencies = [ "paste", "picky", "picky-krb", - "rand 0.9.0-beta.1", - "rand_chacha 0.9.0-beta.1", + "rand 0.9.0-alpha.2", + "rand_chacha 0.9.0-alpha.2", "rsa", "serde", "serde_json", "serde_qs", - "sha1", + "sha1 0.11.0-pre.4", "sha2", "similar", "time", @@ -423,7 +455,7 @@ dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", - "digest", + "digest 0.10.7", "fiat-crypto", "rustc_version", "subtle", @@ -438,7 +470,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.75", ] [[package]] @@ -447,7 +479,7 @@ version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ - "const-oid", + "const-oid 0.9.6", "pem-rfc7468", "zeroize", ] @@ -476,12 +508,23 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer", - "const-oid", - "crypto-common", + "block-buffer 0.10.4", + "const-oid 0.9.6", + "crypto-common 0.1.6", "subtle", ] +[[package]] +name = "digest" +version = "0.11.0-pre.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf2e3d6615d99707295a9673e889bf363a04b2a466bd320c65a72536f7577379" +dependencies = [ + "block-buffer 0.11.0-rc.1", + "const-oid 0.10.0-rc.0", + "crypto-common 0.2.0-rc.1", +] + [[package]] name = "ecdsa" version = "0.16.9" @@ -489,7 +532,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der", - "digest", + "digest 0.10.7", "elliptic-curve", "rfc6979", "signature", @@ -529,7 +572,7 @@ checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct", "crypto-bigint", - "digest", + "digest 0.10.7", "ff", "generic-array", "group", @@ -573,19 +616,19 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.10" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] name = "fastrand" -version = "2.2.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "ff" @@ -605,13 +648,13 @@ checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "flate2" -version = "1.0.35" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" +checksum = "9c0596c1eac1f9e04ed902702e9878208b336edc9d6fddc8a48387349bab3666" dependencies = [ "crc32fast", "libz-sys", - "miniz_oxide", + "miniz_oxide 0.8.0", ] [[package]] @@ -631,9 +674,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -646,9 +689,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -656,15 +699,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -673,38 +716,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.75", ] [[package]] name = "futures-sink" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -738,30 +781,15 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "getrandom" -version = "0.3.0-rc.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a78f88e84d239c7f2619ae8b091603c26208e1cb322571f5a29d6806f56ee5e" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "rustix", - "wasi 0.13.3+wasi-0.2.2", + "wasi", "wasm-bindgen", - "windows-targets", ] [[package]] name = "gimli" -version = "0.31.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "gloo" @@ -933,7 +961,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "903f432be5ba34427eac5e16048ef65604a82061fe93789f2212afc73d8617d6" dependencies = [ - "getrandom 0.2.15", + "getrandom", "gloo-events 0.2.0", "gloo-utils 0.2.0", "serde", @@ -1169,7 +1197,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.75", ] [[package]] @@ -1185,9 +1213,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.2" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "hermit-abi" @@ -1216,7 +1244,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest", + "digest 0.10.7", ] [[package]] @@ -1236,6 +1264,15 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +[[package]] +name = "hybrid-array" +version = "0.2.0-rc.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d306b679262030ad8813a82d4915fc04efff97776e4db7f8eb5137039d56400" +dependencies = [ + "typenum", +] + [[package]] name = "implicit-clone" version = "0.4.9" @@ -1253,14 +1290,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9311685eb9a34808bbb0608ad2fcab9ae216266beca5848613e95553ac914e3b" dependencies = [ "quote", - "syn 2.0.90", + "syn 2.0.75", ] [[package]] name = "indexmap" -version = "2.7.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown", @@ -1284,17 +1321,16 @@ checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itoa" -version = "1.0.14" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.74" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ - "once_cell", "wasm-bindgen", ] @@ -1318,21 +1354,21 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.167" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libm" -version = "0.2.11" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libz-sys" -version = "1.1.20" +version = "1.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" +checksum = "fdc53a7799a7496ebc9fd29f31f7df80e83c9bda5299768af5f9e59eeea74647" dependencies = [ "cc", "pkg-config", @@ -1367,7 +1403,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ "cfg-if", - "digest", + "digest 0.10.7", ] [[package]] @@ -1382,6 +1418,15 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +[[package]] +name = "miniz_oxide" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +dependencies = [ + "adler", +] + [[package]] name = "miniz_oxide" version = "0.8.0" @@ -1476,9 +1521,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.5" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] @@ -1494,9 +1539,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.2" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "overload" @@ -1576,7 +1621,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ - "digest", + "digest 0.10.7", "hmac", "password-hash 0.4.2", "sha-1", @@ -1600,12 +1645,12 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "picky" -version = "7.0.0-rc.11" +version = "7.0.0-rc.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f62f11977ee3ab76e48f7465f035a607e61b7421b154384b71607cb85a26d5dd" +checksum = "fe9b488630f493840c2e6ef270c3619a3dc2ad0953eb978d6e4273a8337fee5e" dependencies = [ "base64 0.22.1", - "digest", + "digest 0.10.7", "ed25519-dalek", "hex", "md-5", @@ -1613,14 +1658,14 @@ dependencies = [ "p256", "p384", "p521", - "picky-asn1 0.10.0", - "picky-asn1-der 0.5.1", - "picky-asn1-x509 0.14.1", + "picky-asn1 0.9.0", + "picky-asn1-der 0.5.0", + "picky-asn1-x509 0.13.0", "rand 0.8.5", "rand_core 0.6.4", "rsa", "serde", - "sha1", + "sha1 0.10.6", "sha2", "sha3", "thiserror", @@ -1640,9 +1685,9 @@ dependencies = [ [[package]] name = "picky-asn1" -version = "0.10.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d061c9f67e256511d8d69b86730a506bed100db520c8812e789cf91d9c6a16cc" +checksum = "360019b238b11b8c0e88cd9db3a6677f1af122e3422d0a26a2b576f084d9be36" dependencies = [ "oid", "serde", @@ -1662,11 +1707,11 @@ dependencies = [ [[package]] name = "picky-asn1-der" -version = "0.5.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e15b90fb132c46ded79c39277afa93151691d9df6e7ff369c071890b36478392" +checksum = "04784987e157b5a8f832ce68b3364915dc6ef4bed94a6e10e241fa1bae3db2e3" dependencies = [ - "picky-asn1 0.10.0", + "picky-asn1 0.9.0", "serde", "serde_bytes", ] @@ -1685,15 +1730,15 @@ dependencies = [ [[package]] name = "picky-asn1-x509" -version = "0.14.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f702973074c654cef724d7430e2852acdb8b0e897ed9c4120727446a1bda1464" +checksum = "f3384ff768b1c4a04532916be77935f634a4738d3b2138da98798e90352fadf4" dependencies = [ "base64 0.22.1", "num-bigint-dig", "oid", - "picky-asn1 0.10.0", - "picky-asn1-der 0.5.1", + "picky-asn1 0.9.0", + "picky-asn1-der 0.5.0", "serde", "zeroize", ] @@ -1717,36 +1762,36 @@ dependencies = [ "picky-asn1-x509 0.9.0", "rand 0.8.5", "serde", - "sha1", + "sha1 0.10.6", "thiserror", "uuid", ] [[package]] name = "pin-project" -version = "1.1.7" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.7" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.75", ] [[package]] name = "pin-project-lite" -version = "0.2.15" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -1788,9 +1833,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "powerfmt" @@ -1804,17 +1849,17 @@ version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" dependencies = [ - "zerocopy 0.7.35", + "zerocopy", ] [[package]] name = "prettyplease" -version = "0.2.25" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.90", + "syn 2.0.75", ] [[package]] @@ -1862,9 +1907,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -1909,7 +1954,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rand_xorshift", - "regex-syntax 0.8.5", + "regex-syntax 0.8.4", "rusty-fork", "tempfile", "unarray", @@ -1943,13 +1988,13 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.0-beta.1" +version = "0.9.0-alpha.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8478de76992f2825a1052cc2ae9d1401cdb62687761d4100ddd69a73dc3dc48" +checksum = "c3e256ff62cee3e03def855c4d4260106d2bb1696fdc01af03e9935b993720a5" dependencies = [ - "rand_chacha 0.9.0-beta.1", - "rand_core 0.9.0-beta.1", - "zerocopy 0.8.13", + "rand_chacha 0.9.0-alpha.2", + "rand_core 0.9.0-alpha.2", + "zerocopy", ] [[package]] @@ -1964,12 +2009,12 @@ dependencies = [ [[package]] name = "rand_chacha" -version = "0.9.0-beta.1" +version = "0.9.0-alpha.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f16da77124f4ee9fabd55ce6540866e9101431863b4876de58b68797f331adf2" +checksum = "d299e9db34f6623b2a9e86c015d6e173d5f46d64d4b9b8cc46ae8a982a50b04c" dependencies = [ "ppv-lite86", - "rand_core 0.9.0-beta.1", + "rand_core 0.9.0-alpha.2", ] [[package]] @@ -1978,17 +2023,17 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.15", + "getrandom", ] [[package]] name = "rand_core" -version = "0.9.0-beta.1" +version = "0.9.0-alpha.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a98fa0b8309344136abe6244130311e76997e546f76fae8054422a7539b43df7" +checksum = "f4e93f5a5e3c528cda9acb0928c31b2ba868c551cc46e67b778075e34aab9906" dependencies = [ - "getrandom 0.3.0-rc.0", - "zerocopy 0.8.13", + "getrandom", + "zerocopy", ] [[package]] @@ -2002,14 +2047,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.1" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -2023,13 +2068,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.5", + "regex-syntax 0.8.4", ] [[package]] @@ -2040,9 +2085,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "rfc6979" @@ -2062,12 +2107,12 @@ checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" [[package]] name = "rsa" -version = "0.9.7" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47c75d7c5c6b673e58bf54d8544a9f432e3a925b0e80f7cd3602ab5c50c55519" +checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" dependencies = [ - "const-oid", - "digest", + "const-oid 0.9.6", + "digest 0.10.7", "num-bigint-dig", "num-integer", "num-traits", @@ -2088,18 +2133,18 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc_version" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.41" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ "bitflags", "errno", @@ -2110,9 +2155,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.18" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "rusty-fork" @@ -2154,9 +2199,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.215" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" dependencies = [ "serde_derive", ] @@ -2194,20 +2239,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.215" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.75", ] [[package]] name = "serde_json" -version = "1.0.133" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" dependencies = [ "itoa", "memchr", @@ -2217,9 +2262,9 @@ dependencies = [ [[package]] name = "serde_qs" -version = "0.13.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd34f36fe4c5ba9654417139a9b3a20d2e1de6012ee678ad14d240c22c78d8d6" +checksum = "0431a35568651e363364210c91983c1da5eb29404d9f0928b67d4ebcfa7d330c" dependencies = [ "percent-encoding", "serde", @@ -2246,7 +2291,7 @@ checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" dependencies = [ "cfg-if", "cpufeatures", - "digest", + "digest 0.10.7", ] [[package]] @@ -2257,7 +2302,18 @@ checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", - "digest", + "digest 0.10.7", +] + +[[package]] +name = "sha1" +version = "0.11.0-pre.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9540978cef7a8498211c1b1c14e5ce920fe5bd524ea84f4a3d72d4602515ae93" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.11.0-pre.9", ] [[package]] @@ -2268,7 +2324,7 @@ checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", - "digest", + "digest 0.10.7", ] [[package]] @@ -2277,7 +2333,7 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "digest", + "digest 0.10.7", "keccak", ] @@ -2302,7 +2358,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "digest", + "digest 0.10.7", "rand_core 0.6.4", ] @@ -2364,9 +2420,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.90" +version = "2.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" dependencies = [ "proc-macro2", "quote", @@ -2375,9 +2431,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.14.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", @@ -2388,22 +2444,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.69" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.69" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.75", ] [[package]] @@ -2418,9 +2474,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.37" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "js-sys", @@ -2440,9 +2496,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "tokio" -version = "1.42.0" +version = "1.39.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" +checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" dependencies = [ "backtrace", "pin-project-lite", @@ -2450,9 +2506,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.17" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", "pin-project-lite", @@ -2478,9 +2534,9 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.41" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -2489,29 +2545,29 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.28" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.75", ] [[package]] name = "tracing-core" -version = "0.1.33" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", ] [[package]] name = "tracing-subscriber" -version = "0.3.19" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "matchers", "nu-ansi-term", @@ -2550,9 +2606,9 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicode-ident" -version = "1.0.14" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "urlencoding" @@ -2568,11 +2624,11 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.11.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" dependencies = [ - "getrandom 0.2.15", + "getrandom", "serde", "wasm-bindgen", ] @@ -2604,20 +2660,11 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "wasi" -version = "0.13.3+wasi-0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" -dependencies = [ - "wit-bindgen-rt", -] - [[package]] name = "wasm-bindgen" -version = "0.2.97" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", "once_cell", @@ -2626,37 +2673,36 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.97" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.75", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.47" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", - "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.97" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2664,28 +2710,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.97" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.75", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.97" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.74" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -2804,15 +2850,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "wit-bindgen-rt" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" -dependencies = [ - "bitflags", -] - [[package]] name = "x25519-dalek" version = "2.0.1" @@ -2872,14 +2909,14 @@ checksum = "7ad00f6c9436d25c9225ed0fd8eea27e6d2886c1387bf934afdf91e9131b8b77" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.75", ] [[package]] name = "yew-hooks" -version = "0.3.3" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4a023bfdcec05c9a0f6fd84f0caff8869fed4b0b73ba06e9418c8e45ce7ca5" +checksum = "cbe7d30ef9d9afb9be38b1b310c42d59963c6d1c950f0e0435b78b346b4b24bf" dependencies = [ "gloo 0.11.0", "js-sys", @@ -2903,7 +2940,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.75", ] [[package]] @@ -2945,7 +2982,7 @@ checksum = "42bfd190a07ca8cfde7cd4c52b3ac463803dc07323db8c34daa697e86365978c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.75", ] [[package]] @@ -2955,16 +2992,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "byteorder", - "zerocopy-derive 0.7.35", -] - -[[package]] -name = "zerocopy" -version = "0.8.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67914ab451f3bfd2e69e5e9d2ef3858484e7074d63f204fd166ec391b54de21d" -dependencies = [ - "zerocopy-derive 0.8.13", + "zerocopy-derive", ] [[package]] @@ -2975,18 +3003,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7988d73a4303ca289df03316bc490e934accf371af6bc745393cf3c2c5c4f25d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.90", + "syn 2.0.75", ] [[package]] @@ -3006,5 +3023,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.75", ] diff --git a/Cargo.toml b/Cargo.toml index 98bbba07..6bec0e37 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,7 @@ tracing = "0.1" hex = "0.4" gloo-timers = "0.3" serde = { version = "1.0", features = ["derive"] } -serde_qs = "0.13" +serde_qs = "0.12" serde_json = "1.0" base64 = "0.22" time = { version = "0.3", features = ["local-offset", "wasm-bindgen"] } @@ -52,11 +52,11 @@ time = { version = "0.3", features = ["local-offset", "wasm-bindgen"] } picky-krb = { git = "https://github.com/TheBestTravynka/picky-rs.git", rev = "604a246" } picky = { version = "7.0.0-rc.8", default-features = false } md5 = "0.7" -sha1 = "0.10" +sha1 = "0.11.0-pre.3" sha2 = "0.10.8" hmac = "0.12.1" rsa = "0.9" -bcrypt = "0.16" +bcrypt = "0.15" flate2 = { version = "1.0", features = ["zlib"] } rand = { version = "0.9.0-alpha.0", features = ["small_rng"] } rand_chacha = "0.9.0-alpha.0" @@ -69,4 +69,4 @@ oid = { version = "0.2", default-features = false } paste = "1.0" # diff -similar = { version = "2.6", features = ["serde"] } \ No newline at end of file +similar = { version = "2.4", features = ["serde"] } diff --git a/src/crypto_helper/algorithm.rs b/src/crypto_helper/algorithm.rs index 3fe28df2..31c57055 100644 --- a/src/crypto_helper/algorithm.rs +++ b/src/crypto_helper/algorithm.rs @@ -19,8 +19,9 @@ pub const SHA384: &str = "SHA384"; pub const BCRYPT: &str = "BCRYPT"; pub const ZLIB: &str = "ZLIB"; pub const ARGON2: &str = "ARGON2"; +pub const HMAC_SHA: &str = "HMAC-SHA"; -pub const SUPPORTED_ALGORITHMS: [&str; 13] = [ +pub const SUPPORTED_ALGORITHMS: [&str; 14] = [ MD5, SHA1, SHA256, @@ -34,13 +35,16 @@ pub const SUPPORTED_ALGORITHMS: [&str; 13] = [ BCRYPT, ZLIB, ARGON2, + HMAC_SHA, ]; pub const HASHING_ALGOS: [&str; 7] = [MD5, SHA1, SHA256, SHA384, SHA512, BCRYPT, ARGON2]; pub const ENCRYPTION_ALGOS: [&str; 3] = [AES128_CTS_HMAC_SHA1_96, AES256_CTS_HMAC_SHA1_96, RSA]; -pub const HMAC_ALGOS: [&str; 2] = [HMAC_SHA1_96_AES128, HMAC_SHA1_96_AES256]; +pub const HMAC_ALGOS: [&str; 3] = [HMAC_SHA1_96_AES128, HMAC_SHA1_96_AES256, HMAC_SHA]; + +pub const HMAC_HASH_ALGOS: [&str; 3] = [SHA256, SHA384, SHA512]; pub const COMPRESSION_ALGOS: [&str; 1] = [ZLIB]; @@ -87,10 +91,7 @@ pub enum KrbMode { impl From for bool { fn from(mode: KrbMode) -> Self { - match mode { - KrbMode::Encrypt => false, - KrbMode::Decrypt => true, - } + matches!(mode, KrbMode::Decrypt) } } @@ -531,6 +532,87 @@ impl From<&Argon2Action> for bool { } } +#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize, Default)] +pub enum HmacShaAction { + #[default] + Sign, + #[serde(serialize_with = "serialize_bytes", deserialize_with = "deserialize_bytes")] + Verify(Vec), +} + +impl From for HmacShaAction { + fn from(value: bool) -> Self { + if value { + Self::Verify(Vec::new()) + } else { + Self::Sign + } + } +} + +impl From<&HmacShaAction> for bool { + fn from(value: &HmacShaAction) -> Self { + matches!(value, HmacShaAction::Verify(_)) + } +} + +#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] +pub enum HmacShaAlgorithm { + Sha256, + Sha384, + Sha512, +} + +impl TryFrom<&str> for HmacShaAlgorithm { + type Error = String; + + fn try_from(value: &str) -> Result { + Ok(match value { + SHA256 => Self::Sha256, + SHA384 => Self::Sha384, + SHA512 => Self::Sha512, + _ => return Err(format!("hmac: unsupported hash algorithm: {}", value)), + }) + } +} + +impl AsRef for HmacShaAlgorithm { + fn as_ref(&self) -> &str { + match self { + HmacShaAlgorithm::Sha256 => SHA256, + HmacShaAlgorithm::Sha384 => SHA384, + HmacShaAlgorithm::Sha512 => SHA512, + } + } +} + +impl PartialEq<&str> for HmacShaAlgorithm { + fn eq(&self, other: &&str) -> bool { + self.as_ref() == *other + } +} + +#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] +pub struct HmacShaInput { + pub hash_alg: HmacShaAlgorithm, + #[serde(serialize_with = "serialize_bytes", deserialize_with = "deserialize_bytes")] + pub key: Vec, + #[serde(serialize_with = "serialize_bytes", deserialize_with = "deserialize_bytes")] + pub msg: Vec, + pub action: HmacShaAction, +} + +impl Default for HmacShaInput { + fn default() -> Self { + Self { + hash_alg: HmacShaAlgorithm::Sha256, + key: Default::default(), + msg: Default::default(), + action: Default::default(), + } + } +} + #[allow(clippy::large_enum_variant)] #[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] pub enum Algorithm { @@ -552,6 +634,7 @@ pub enum Algorithm { Bcrypt(BcryptInput), Zlib(ZlibInput), Argon2(Argon2Input), + HmacSha(HmacShaInput), } impl TryFrom<&str> for Algorithm { @@ -584,6 +667,8 @@ impl TryFrom<&str> for Algorithm { return Ok(Algorithm::Zlib(Default::default())); } else if value == ARGON2 { return Ok(Algorithm::Argon2(Default::default())); + } else if value == HMAC_SHA { + return Ok(Algorithm::HmacSha(Default::default())); } Err(format!( @@ -609,6 +694,7 @@ impl From<&Algorithm> for &str { Algorithm::Bcrypt(_) => BCRYPT, Algorithm::Zlib(_) => ZLIB, Algorithm::Argon2(_) => ARGON2, + Algorithm::HmacSha(_) => HMAC_SHA, } } } @@ -623,6 +709,6 @@ impl PartialEq<&str> for &Algorithm { impl Default for Algorithm { fn default() -> Self { - Algorithm::Zlib(Default::default()) + Algorithm::HmacSha(Default::default()) } } diff --git a/src/crypto_helper/computations.rs b/src/crypto_helper/computations.rs index bd4ec1df..b21a397c 100644 --- a/src/crypto_helper/computations.rs +++ b/src/crypto_helper/computations.rs @@ -12,8 +12,8 @@ use rsa::rand_core::OsRng; use rsa::Pkcs1v15Encrypt; use super::algorithm::{ - Argon2Action, Argon2Input, BcryptAction, BcryptInput, KrbInput, KrbInputData, KrbMode, RsaAction, RsaInput, - ZlibInput, ZlibMode, + Argon2Action, Argon2Input, BcryptAction, BcryptInput, HmacShaAction, HmacShaAlgorithm, HmacShaInput, KrbInput, + KrbInputData, KrbMode, RsaAction, RsaInput, ZlibInput, ZlibMode, }; pub fn process_rsa(input: &RsaInput) -> Result, String> { @@ -132,3 +132,124 @@ pub fn process_argon2(input: &Argon2Input) -> Result, String> { } } } + +pub fn process_hmac_sha(input: &HmacShaInput) -> Result, String> { + let HmacShaInput { + hash_alg, + key, + msg, + action, + } = input; + + match &action { + HmacShaAction::Sign => match hash_alg { + HmacShaAlgorithm::Sha256 => { + if key.len() < 32 { + return Err(format!( + "hmac: invalid key length: expected at least 32 bytes but got {}", + key.len() + )); + } + + Ok(sign_hmac!( + hash_alg: sha2::Sha256, + key: key, + msg: msg, + )) + } + HmacShaAlgorithm::Sha384 => { + if key.len() < 48 { + return Err(format!( + "hmac: invalid key length: expected at least 48 bytes but got {}", + key.len() + )); + } + + Ok(sign_hmac!( + hash_alg: sha2::Sha384, + key: key, + msg: msg, + )) + } + HmacShaAlgorithm::Sha512 => { + if key.len() < 64 { + return Err(format!( + "hmac: invalid key length: expected at least 64 bytes but got {}", + key.len() + )); + } + + Ok(sign_hmac!( + hash_alg: sha2::Sha512, + key: key, + msg: msg, + )) + } + }, + HmacShaAction::Verify(digest) => match hash_alg { + HmacShaAlgorithm::Sha256 => { + if key.len() < 32 { + return Err(format!( + "hmac: invalid key length: expected at least 32 bytes but got {}", + key.len() + )); + } + + Ok( + if verify_hmac!( + hash_alg: sha2::Sha256, + key: key, + msg: msg, + digest: digest.as_slice(), + ) { + vec![1] + } else { + vec![0] + }, + ) + } + HmacShaAlgorithm::Sha384 => { + if key.len() < 48 { + return Err(format!( + "hmac: invalid key length: expected at least 48 bytes but got {}", + key.len() + )); + } + + Ok( + if verify_hmac!( + hash_alg: sha2::Sha384, + key: key, + msg: msg, + digest: digest.as_slice(), + ) { + vec![1] + } else { + vec![0] + }, + ) + } + HmacShaAlgorithm::Sha512 => { + if key.len() < 64 { + return Err(format!( + "hmac: invalid key length: expected at least 64 bytes but got {}", + key.len() + )); + } + + Ok( + if verify_hmac!( + hash_alg: sha2::Sha512, + key: key, + msg: msg, + digest: digest.as_slice(), + ) { + vec![1] + } else { + vec![0] + }, + ) + } + }, + } +} diff --git a/src/crypto_helper/info/mod.rs b/src/crypto_helper/info/mod.rs index a276f2b2..389041d5 100644 --- a/src/crypto_helper/info/mod.rs +++ b/src/crypto_helper/info/mod.rs @@ -73,10 +73,15 @@ fn get_algorithm_info(algorithm: &Algorithm) -> Html { }, Algorithm::Argon2(_) => html! { - {"Use Argon2 to encrypt/verify your data."} + {"Use Argon2 to hash/verify your data."} {"RFC"} }, + Algorithm::HmacSha(_) => html! { + {"Use HMAC-SHA to sign/verify your data."} + {"RFC"} + + }, } } diff --git a/src/crypto_helper/input/hmac_sha.rs b/src/crypto_helper/input/hmac_sha.rs new file mode 100644 index 00000000..d88299c4 --- /dev/null +++ b/src/crypto_helper/input/hmac_sha.rs @@ -0,0 +1,152 @@ +use web_sys::{Event, HtmlInputElement}; +use yew::{function_component, html, Callback, Html, Properties, TargetCast}; + +use crate::common::{build_byte_input, Switch}; +use crate::crypto_helper::algorithm::{HmacShaAction, HmacShaInput as HmacShaInputData, HMAC_HASH_ALGOS}; + +#[derive(PartialEq, Properties, Clone)] +pub struct HmacShaInputProps { + pub input: HmacShaInputData, + pub input_setter: Callback, +} + +#[function_component(HmacShaInput)] +fn hmac_sha_input(props: &HmacShaInputProps) -> Html { + let HmacShaInputData { + hash_alg, + key, + msg, + action, + } = props.input.clone(); + + let input_setter = props.input_setter.clone(); + let input = props.input.clone(); + let on_switch = Callback::from(move |mode: bool| { + let HmacShaInputData { + hash_alg, + key, + msg, + action: _, + } = input.clone(); + input_setter.emit(HmacShaInputData { + hash_alg, + key, + msg, + action: mode.into(), + }); + }); + + let input_setter = props.input_setter.clone(); + let input = props.input.clone(); + let on_key_input = Callback::from(move |key| { + let HmacShaInputData { + hash_alg, + key: _, + msg, + action, + } = input.clone(); + input_setter.emit(HmacShaInputData { + hash_alg, + key, + msg, + action, + }); + }); + + let input_setter = props.input_setter.clone(); + let input = props.input.clone(); + let on_msg_input = Callback::from(move |msg| { + let HmacShaInputData { + hash_alg, + key, + msg: _, + action, + } = input.clone(); + input_setter.emit(HmacShaInputData { + hash_alg, + key, + msg, + action, + }); + }); + + let input_setter = props.input_setter.clone(); + let input = props.input.clone(); + let on_digest_input = Callback::from(move |digest| { + let HmacShaInputData { + hash_alg, + key, + msg, + action: _, + } = input.clone(); + input_setter.emit(HmacShaInputData { + hash_alg, + key, + msg, + action: HmacShaAction::Verify(digest), + }); + }); + + let input_setter = props.input_setter.clone(); + let input = props.input.clone(); + let onchange = Callback::from(move |event: Event| { + let hash_alg: HtmlInputElement = event.target_unchecked_into(); + + if let Ok(hash_alg) = hash_alg.value().as_str().try_into() { + let HmacShaInputData { + hash_alg: _, + key, + msg, + action, + } = input.clone(); + input_setter.emit(HmacShaInputData { + hash_alg, + key, + msg, + action, + }); + } + }); + + html! { +
+ {build_byte_input(key, on_key_input, None, Some("key".into()))} + {build_byte_input(msg, on_msg_input, None, Some("payload (message)".into()))} +
+
+ +
+ {"sign"} + + {"verify"} +
+
+ {if let HmacShaAction::Verify(digest) = action { + build_byte_input(digest, on_digest_input, None, Some("digest".into())) + } else { + html! {} + }} +
+
+ } +} + +pub fn build_hmac_sha_input(input: HmacShaInputData, input_setter: Callback) -> Html { + html! { + + } +} diff --git a/src/crypto_helper/input/mod.rs b/src/crypto_helper/input/mod.rs index d9ebff9d..b9450042 100644 --- a/src/crypto_helper/input/mod.rs +++ b/src/crypto_helper/input/mod.rs @@ -1,5 +1,6 @@ mod argon2; mod bcrypt; +mod hmac_sha; mod krb; mod rsa; mod zlib; @@ -9,6 +10,7 @@ use yew::{function_component, html, Callback, Html, Properties, UseStateSetter}; use self::argon2::build_argon2_input; use self::bcrypt::build_bcrypt_input; +use self::hmac_sha::build_hmac_sha_input; use self::krb::build_krb_input; use self::rsa::build_rsa_input; use self::zlib::build_zlib_input; @@ -99,6 +101,10 @@ fn get_input_components(algorithm: &Algorithm, setter: &UseStateSetter build_hmac_sha_input( + input.clone(), + Callback::from(move |input| setter.set(Algorithm::HmacSha(input))), + ), } } diff --git a/src/crypto_helper/mod.rs b/src/crypto_helper/mod.rs index df0c42d9..dc9d9d34 100644 --- a/src/crypto_helper/mod.rs +++ b/src/crypto_helper/mod.rs @@ -18,14 +18,16 @@ use yew::{function_component, html, use_effect_with, use_state, Callback, Html}; use yew_hooks::{use_clipboard, use_local_storage, use_location}; use yew_notifications::{use_notification, Notification, NotificationType}; -use self::computations::{process_argon2, process_krb_cipher, process_krb_hmac, process_rsa, process_zlib}; +use self::computations::{ + process_argon2, process_hmac_sha, process_krb_cipher, process_krb_hmac, process_rsa, process_zlib, +}; use crate::crypto_helper::computations::process_bcrypt; use crate::url_query_params::generate_crypto_helper_link; const CRYPTO_HELPER_LOCAL_STORAGE_KEY: &str = "CRYPTO_HELPER_DATA"; -fn convert(algrithm: &Algorithm) -> Result, String> { - match algrithm { +fn convert(algorithm: &Algorithm) -> Result, String> { + match algorithm { Algorithm::Md5(input) => Ok(md5::compute(input).to_vec()), Algorithm::Sha1(input) => { let mut sha1 = Sha1::new(); @@ -61,6 +63,7 @@ fn convert(algrithm: &Algorithm) -> Result, String> { Algorithm::Bcrypt(input) => process_bcrypt(input), Algorithm::Zlib(input) => process_zlib(input), Algorithm::Argon2(input) => process_argon2(input), + Algorithm::HmacSha(input) => process_hmac_sha(input), } } diff --git a/src/crypto_helper/output/mod.rs b/src/crypto_helper/output/mod.rs index 9e2e57ce..07c72beb 100644 --- a/src/crypto_helper/output/mod.rs +++ b/src/crypto_helper/output/mod.rs @@ -29,6 +29,7 @@ fn get_output_components(algorithm: &Algorithm, output: &[u8], add_notification: ), Algorithm::Zlib(_) => build_simple_output(output.into(), BytesFormat::Hex, add_notification), Algorithm::Argon2(_) => build_simple_output(output.into(), BytesFormat::Hex, add_notification), + Algorithm::HmacSha(_) => build_simple_output(output.into(), BytesFormat::Hex, add_notification), } }