From 3ef311c3cb26b6566054bff344bc0d266fc8a0cd Mon Sep 17 00:00:00 2001 From: mghazwi Date: Tue, 28 Apr 2026 14:05:31 +0200 Subject: [PATCH] update imports --- Cargo.toml | 2 +- src/lib.rs | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5558fdb..24f4129 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,5 +9,5 @@ license = "MIT OR Apache-2.0" anyhow = "1" blake2 = "0.10" chacha20 = "0.10" -sha3 = "0.11.0" +turboshake = "0.6.0" zeroize = { version = "1", features = ["zeroize_derive"] } diff --git a/src/lib.rs b/src/lib.rs index c94ddd9..7f060c5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,10 +3,8 @@ use blake2::Blake2bMac; use blake2::digest::{KeyInit as BlakeKeyInit, Mac, consts::U32}; use chacha20::ChaCha20; use chacha20::cipher::{KeyIvInit, StreamCipher}; -use sha3::{ - Shake128, - digest::{ExtendableOutput, Update, XofReader}, -}; +use turboshake::TurboShake128; +use turboshake::digest::{Update, ExtendableOutput, XofReader}; use zeroize::{Zeroize, ZeroizeOnDrop}; // We expect the input key to be of size 32 bytes (256-bits) @@ -125,7 +123,7 @@ impl Lioness { /// derive all 4 keys from the master key using the KDF i.e. turboshake in here. fn derive_round_keys(master_key: &MasterKey) -> RoundKeys { // WARNING: this uses the default domain separation 0x1f - let mut kdf = Shake128::default(); + let mut kdf = ::default(); kdf.update(master_key); let mut reader = kdf.finalize_xof();