diff options
| author | Daniel Schadt <kingdread@gmx.de> | 2026-04-28 17:57:28 +0200 |
|---|---|---|
| committer | Daniel Schadt <kingdread@gmx.de> | 2026-04-28 17:57:28 +0200 |
| commit | 13fb026842345a5aad0cb7788bf327e03b521222 (patch) | |
| tree | 254abb4c22772f6851bca2557d02aabaedceae8c | |
| parent | 3f31e03159406b238f6ded01903cbdbc1b3b499a (diff) | |
| download | leona-13fb026842345a5aad0cb7788bf327e03b521222.tar.gz leona-13fb026842345a5aad0cb7788bf327e03b521222.tar.bz2 leona-13fb026842345a5aad0cb7788bf327e03b521222.zip | |
add benchmark with sha3
| -rw-r--r-- | Cargo.lock | 21 | ||||
| -rw-r--r-- | Cargo.toml | 1 | ||||
| -rw-r--r-- | benches/leona.rs | 3 |
3 files changed, 25 insertions, 0 deletions
@@ -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" @@ -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"); } |
