From d7ab417a99115493d83c41f32254af949e6f97da Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 31 Jul 2021 22:54:18 +0100 Subject: [PATCH] prep for hmac Signed-off-by: Ian Jackson --- Cargo.lock | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 10 ++++++ 2 files changed, 100 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 2cb430d..c0b447a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -49,6 +49,15 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + [[package]] name = "bytes" version = "1.0.1" @@ -104,6 +113,34 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" +[[package]] +name = "cpufeatures" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71ef" +dependencies = [ + "libc", +] + +[[package]] +name = "crypto-mac" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + [[package]] name = "either" version = "1.6.1" @@ -270,6 +307,16 @@ dependencies = [ "slab", ] +[[package]] +name = "generic-array" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +dependencies = [ + "typenum", + "version_check", +] + [[package]] name = "getrandom" version = "0.2.3" @@ -335,6 +382,7 @@ dependencies = [ "fehler", "futures", "hippotat-macros", + "hmac", "hyper", "hyper-tls", "ipnet", @@ -343,6 +391,7 @@ dependencies = [ "log", "parking_lot", "regex", + "sha2", "structopt", "tokio", "void", @@ -358,6 +407,16 @@ dependencies = [ "syn", ] +[[package]] +name = "hmac" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +dependencies = [ + "crypto-mac", + "digest", +] + [[package]] name = "http" version = "0.2.4" @@ -599,6 +658,12 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + [[package]] name = "openssl" version = "0.10.35" @@ -849,6 +914,19 @@ dependencies = [ "libc", ] +[[package]] +name = "sha2" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" +dependencies = [ + "block-buffer", + "cfg-if", + "cpufeatures", + "digest", + "opaque-debug", +] + [[package]] name = "signal-hook-registry" version = "1.4.0" @@ -910,6 +988,12 @@ dependencies = [ "syn", ] +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + [[package]] name = "syn" version = "1.0.73" @@ -1040,6 +1124,12 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +[[package]] +name = "typenum" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" + [[package]] name = "unicode-segmentation" version = "1.8.0" diff --git a/Cargo.toml b/Cargo.toml index 59a4cf8..fbca270 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,6 +32,7 @@ itertools = "0.10" parking_lot = "0.11" regex = "1.5" log = "0.4" +sha2 = "0.9" structopt = "0.3" tokio = { version = "1", features = ["full"] } void = "1" @@ -40,3 +41,12 @@ void = "1" extend = "1" # no deps not in sid fehler = "1" # no deps (other than fehler-macros, obvs) lazy-regex = "2" # no deps not in sid + +hmac = "0.11" +# ^ more troublesome. runtime deps are +# crypto-mac not in sid, all deps in sid +# digest in sid +# plus dev-dependencies probably for testing with test vectors +# sha2 in sid +# md-5 not in sid, disable ? +# streebog not in sid, disable ? (OST algorithms) -- 2.30.2