perf(net): use alloy_primitives::Keccak256 (#20957)

This commit is contained in:
DaniPopes
2026-01-12 11:21:27 +00:00
committed by GitHub
parent 126a7c9570
commit 515fd597f3
4 changed files with 3 additions and 7 deletions

1
Cargo.lock generated
View File

@@ -8338,7 +8338,6 @@ dependencies = [
"reth-network-peers",
"secp256k1 0.30.0",
"sha2",
"sha3",
"thiserror 2.0.17",
"tokio",
"tokio-stream",

View File

@@ -34,7 +34,6 @@ secp256k1 = { workspace = true, features = ["global-context", "std", "recovery",
rand_08.workspace = true
concat-kdf.workspace = true
sha2.workspace = true
sha3.workspace = true
aes.workspace = true
hmac.workspace = true
block-padding.workspace = true

View File

@@ -9,12 +9,12 @@ use crate::{
use aes::{cipher::StreamCipher, Aes128, Aes256};
use alloy_primitives::{
bytes::{BufMut, Bytes, BytesMut},
B128, B256, B512 as PeerId,
Keccak256, B128, B256, B512 as PeerId,
};
use alloy_rlp::{Encodable, Rlp, RlpEncodable, RlpMaxEncodedLen};
use byteorder::{BigEndian, ByteOrder, ReadBytesExt};
use ctr::Ctr64BE;
use digest::{crypto_common::KeyIvInit, Digest};
use digest::crypto_common::KeyIvInit;
use rand_08::{thread_rng as rng, Rng};
use reth_network_peers::{id2pk, pk2id};
use secp256k1::{
@@ -22,7 +22,6 @@ use secp256k1::{
PublicKey, SecretKey, SECP256K1,
};
use sha2::Sha256;
use sha3::Keccak256;
const PROTOCOL_VERSION: usize = 4;

View File

@@ -10,11 +10,10 @@
//! For more information, refer to the [Ethereum MAC specification](https://github.com/ethereum/devp2p/blob/master/rlpx.md#mac).
use aes::Aes256Enc;
use alloy_primitives::{B128, B256};
use alloy_primitives::{Keccak256, B128, B256};
use block_padding::NoPadding;
use cipher::BlockEncrypt;
use digest::KeyInit;
use sha3::{Digest, Keccak256};
/// [`Ethereum MAC`](https://github.com/ethereum/devp2p/blob/master/rlpx.md#mac) state.
///