INNER CODE UNIT · Rust
establish_inbound_channel
matrix-org/vodozemac · src/ecies/mod.rs:234
pub fn establish_inbound_channel(
self,
message: &InitialMessage,
) -> Result<InboundCreationResult, Error> {
let our_public_key = self.public_key();
let shared_secret = self.secret_key.diffie_hellman(&message.public_key.inner);
if shared_secret.was_contributory() {
let mut ecies = EstablishedEcies::new(
&shared_secret,
our_public_key,
message.public_key,
&self.application_info_prefix,
Role::Recipient,
);
let nonce = ecies.decryption_nonce.get();