Consider a remote and local system doing mutual authentication either by TLS through server/client certificates or similarly wireguard. What are the differences when the private keys (in particular the one for the remote system/server) are
a) exposed in clear to an attacker
b) the attacker can actively change those
Note that both sides might not know the other ones public key in advance. E.g. the attacker has the ability to tamper with the creation of the server keys and sends a valid but evil public key to the client.