aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock21
-rw-r--r--Cargo.toml1
-rw-r--r--benches/leona.rs3
3 files changed, 25 insertions, 0 deletions
diff --git a/Cargo.lock b/Cargo.lock
index b8f1e75..2361fd6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -378,6 +378,16 @@ dependencies = [
]
[[package]]
+name = "keccak"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e24a010dd405bd7ed803e5253182815b41bf2e6a80cc3bfc066658e03a198aa"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+]
+
+[[package]]
name = "leona"
version = "0.1.0"
dependencies = [
@@ -392,6 +402,7 @@ dependencies = [
"hmac",
"hybrid-array",
"sha2",
+ "sha3",
"thiserror",
"typenum",
"zerocopy",
@@ -605,6 +616,16 @@ dependencies = [
]
[[package]]
+name = "sha3"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be176f1a57ce4e3d31c1a166222d9768de5954f811601fb7ca06fc8203905ce1"
+dependencies = [
+ "digest",
+ "keccak",
+]
+
+[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/Cargo.toml b/Cargo.toml
index 0c500ff..be8372f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,6 +20,7 @@ criterion = "0.8.2"
ctr = "0.10.0"
hmac = "0.13.0"
sha2 = "0.11.0"
+sha3 = "0.11.0"
[[bench]]
name = "leona"
diff --git a/benches/leona.rs b/benches/leona.rs
index fe6329e..b2d26a7 100644
--- a/benches/leona.rs
+++ b/benches/leona.rs
@@ -8,6 +8,7 @@ use chacha20::ChaCha20;
use ctr::Ctr32BE;
use hmac::Hmac;
use sha2::Sha256;
+use sha3::Sha3_256;
use typenum::U32;
use cipher::stream::StreamCipher;
@@ -44,9 +45,11 @@ where
fn bench(c: &mut Criterion) {
inner::<ZeroIv<ChaCha20>, Blake2sMac256>(c, "chacha20", "blake2s256");
inner::<ZeroIv<ChaCha20>, KeyedHash<U32, Sha256>>(c, "chacha20", "sha256");
+ inner::<ZeroIv<ChaCha20>, KeyedHash<U32, Sha3_256>>(c, "chacha20", "sha3_256");
inner::<ZeroIv<ChaCha20>, Hmac<Sha256>>(c, "chacha20", "sha256-hmac");
inner::<ZeroIv<Ctr32BE<Aes256>>, Blake2sMac256>(c, "aes256", "blake2s256");
inner::<ZeroIv<Ctr32BE<Aes256>>, KeyedHash<U32, Sha256>>(c, "aes256", "sha256");
+ inner::<ZeroIv<Ctr32BE<Aes256>>, KeyedHash<U32, Sha3_256>>(c, "aes256", "sha3_256");
inner::<ZeroIv<Ctr32BE<Aes256>>, Hmac<Sha256>>(c, "aes256", "sha256-hmac");
}