def METHOD_NAME(self):
    self.key = X25519PrivateKey.generate()
    if self.transport.server_mode:
        self.transport._expect_packet(_MSG_KEXECDH_INIT)
        return
    m = Message()
    m.add_byte(c_MSG_KEXECDH_INIT)
    m.add_string(
        self.key.public_key().public_bytes(
            serialization.Encoding.Raw, serialization.PublicFormat.Raw
        )
    )
    self.transport._send_message(m)
    self.transport._expect_packet(_MSG_KEXECDH_REPLY)