mirror of
https://github.com/logos-storage/lioness_blockcipher.git
synced 2026-05-19 03:00:07 +00:00
update imports
This commit is contained in:
parent
052ded4641
commit
3ef311c3cb
@ -9,5 +9,5 @@ license = "MIT OR Apache-2.0"
|
|||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
blake2 = "0.10"
|
blake2 = "0.10"
|
||||||
chacha20 = "0.10"
|
chacha20 = "0.10"
|
||||||
sha3 = "0.11.0"
|
turboshake = "0.6.0"
|
||||||
zeroize = { version = "1", features = ["zeroize_derive"] }
|
zeroize = { version = "1", features = ["zeroize_derive"] }
|
||||||
|
|||||||
@ -3,10 +3,8 @@ use blake2::Blake2bMac;
|
|||||||
use blake2::digest::{KeyInit as BlakeKeyInit, Mac, consts::U32};
|
use blake2::digest::{KeyInit as BlakeKeyInit, Mac, consts::U32};
|
||||||
use chacha20::ChaCha20;
|
use chacha20::ChaCha20;
|
||||||
use chacha20::cipher::{KeyIvInit, StreamCipher};
|
use chacha20::cipher::{KeyIvInit, StreamCipher};
|
||||||
use sha3::{
|
use turboshake::TurboShake128;
|
||||||
Shake128,
|
use turboshake::digest::{Update, ExtendableOutput, XofReader};
|
||||||
digest::{ExtendableOutput, Update, XofReader},
|
|
||||||
};
|
|
||||||
use zeroize::{Zeroize, ZeroizeOnDrop};
|
use zeroize::{Zeroize, ZeroizeOnDrop};
|
||||||
|
|
||||||
// We expect the input key to be of size 32 bytes (256-bits)
|
// 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.
|
/// derive all 4 keys from the master key using the KDF i.e. turboshake in here.
|
||||||
fn derive_round_keys(master_key: &MasterKey) -> RoundKeys {
|
fn derive_round_keys(master_key: &MasterKey) -> RoundKeys {
|
||||||
// WARNING: this uses the default domain separation 0x1f
|
// WARNING: this uses the default domain separation 0x1f
|
||||||
let mut kdf = Shake128::default();
|
let mut kdf = <TurboShake128>::default();
|
||||||
kdf.update(master_key);
|
kdf.update(master_key);
|
||||||
|
|
||||||
let mut reader = kdf.finalize_xof();
|
let mut reader = kdf.finalize_xof();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user