Ok(key) => key,
Err(_) => return,
};
+ let ephemeral_key = match SecretKey::from_slice(get_slice!(32)) {
+ Ok(key) => key,
+ Err(_) => return,
+ };
let mut crypter = if get_slice!(1)[0] != 0 {
let their_pubkey = match PublicKey::from_slice(get_slice!(33)) {
Ok(key) => key,
Err(_) => return,
};
- let mut crypter = PeerChannelEncryptor::new_outbound(their_pubkey);
+ let mut crypter = PeerChannelEncryptor::new_outbound(their_pubkey, ephemeral_key);
crypter.get_act_one();
match crypter.process_act_two(get_slice!(50), &our_network_key) {
Ok(_) => {},
crypter
} else {
let mut crypter = PeerChannelEncryptor::new_inbound(&our_network_key);
- match crypter.process_act_one_with_key(get_slice!(50), &our_network_key) {
+ match crypter.process_act_one_with_keys(get_slice!(50), &our_network_key, ephemeral_key) {
Ok(_) => {},
Err(_) => return,
}