fixed grumbles
This commit is contained in:
@@ -18,7 +18,7 @@ use std::sync::Arc;
|
||||
use std::collections::VecDeque;
|
||||
use std::net::SocketAddr;
|
||||
use std::sync::atomic::{AtomicBool, Ordering as AtomicOrdering};
|
||||
use hash::{keccak, keccak_into};
|
||||
use hash::{keccak, write_keccak};
|
||||
use mio::{Token, Ready, PollOpt};
|
||||
use mio::deprecated::{Handler, EventLoop, TryRead, TryWrite};
|
||||
use mio::tcp::*;
|
||||
@@ -312,7 +312,7 @@ impl EncryptedConnection {
|
||||
}
|
||||
let mut key_material = H512::new();
|
||||
shared.copy_to(&mut key_material[0..32]);
|
||||
keccak_into(&nonce_material, &mut key_material[32..64]);
|
||||
write_keccak(&nonce_material, &mut key_material[32..64]);
|
||||
keccak(&key_material).copy_to(&mut key_material[32..64]);
|
||||
keccak(&key_material).copy_to(&mut key_material[32..64]);
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
use std::sync::Arc;
|
||||
use rand::random;
|
||||
use hash::keccak_into;
|
||||
use hash::write_keccak;
|
||||
use mio::tcp::*;
|
||||
use util::hash::*;
|
||||
use util::bytes::Bytes;
|
||||
@@ -273,7 +273,7 @@ impl Handshake {
|
||||
// E(remote-pubk, S(ecdhe-random, ecdh-shared-secret^nonce) || H(ecdhe-random-pubk) || pubk || nonce || 0x0)
|
||||
let shared = *ecdh::agree(secret, &self.id)?;
|
||||
sig.copy_from_slice(&*sign(self.ecdhe.secret(), &(&shared ^ &self.nonce))?);
|
||||
keccak_into(self.ecdhe.public(), hepubk);
|
||||
write_keccak(self.ecdhe.public(), hepubk);
|
||||
pubk.copy_from_slice(public);
|
||||
nonce.copy_from_slice(&self.nonce);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user