Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Revert "WIP"
Browse files Browse the repository at this point in the history
This reverts commit 85f7e74.
  • Loading branch information
dvdplm committed Jun 5, 2019
1 parent 85f7e74 commit 3c895da
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 18 deletions.
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,3 @@ members = [

[patch.crates-io]
heapsize = { git = "https://github.com/cheme/heapsize.git", branch = "ec-macfix" }
parity-crypto = { path = "../parity-common/parity-crypto" }
10 changes: 3 additions & 7 deletions util/network-devp2p/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ use std::sync::atomic::{AtomicBool, Ordering as AtomicOrdering};
use std::time::Duration;

use bytes::{Buf, BufMut};
use crypto::{
aes::{AesCtr256, AesEcb256},
ecdh::{self, Secret},
};
use crypto::aes::{AesCtr256, AesEcb256};
use error_chain::bail;
use ethereum_types::{H128, H256, H512};
use keccak_hash::{keccak, write_keccak};
Expand All @@ -37,7 +34,7 @@ use rlp::{Rlp, RlpStream};
use tiny_keccak::Keccak;

use ethcore_io::{IoContext, StreamToken};
//use ethkey::{crypto as ethcrypto, Secret};
use ethkey::{crypto as ethcrypto, Secret};
use network::{Error, ErrorKind};

use crate::handshake::Handshake;
Expand Down Expand Up @@ -303,8 +300,7 @@ const NULL_IV : [u8; 16] = [0;16];
impl EncryptedConnection {
/// Create an encrypted connection out of the handshake.
pub fn new(handshake: &mut Handshake) -> Result<EncryptedConnection, Error> {
// let shared = ethcrypto::ecdh::agree(handshake.ecdhe.secret(), &handshake.remote_ephemeral)?;
let shared = ecdh::agree(handshake.ecdhe.secret(), &handshake.remote_ephemeral)?;
let shared = ethcrypto::ecdh::agree(handshake.ecdhe.secret(), &handshake.remote_ephemeral)?;
let mut nonce_material = H512::default();
if handshake.originated {
(&mut nonce_material[0..32]).copy_from_slice(handshake.remote_nonce.as_bytes());
Expand Down

0 comments on commit 3c895da

Please sign in to comment.