mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-19 03:04:27 -05:00
perf(net): use alloy_primitives::Keccak256 (#20957)
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -8338,7 +8338,6 @@ dependencies = [
|
||||
"reth-network-peers",
|
||||
"secp256k1 0.30.0",
|
||||
"sha2",
|
||||
"sha3",
|
||||
"thiserror 2.0.17",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user