Who calculates the private exponent $d$ in RSA? Who calculates the private exponent $d$ in RSA? Only $(n, e)$ are public and to calculate $d$ (with $d$ being the multiplicative inverse of $e$ with respect to $\phi(n)$), the receiver need $\phi(n)$.

So how is the receiver getting $\phi(n)$ and if the receiver is not getting $\phi(n)$ then who is calculating $d$?
In RSA, the owner of the private key calculates $d$, unless otherwise stated.

In public key cryptography, including RSA:


The public key allows to encipher or/and verify signature.
The private key allows to decipher or/and sign.
Unless otherwise stated it is assumed that the owner/holder of the private key has generated both that private key and the public key, and does not reveal the private key.
In practice, some device (computer, HSM, Smart Card..) and code does that task, perhaps under supervision of some person not the holder/owner of the private key (which might be a computer, sometime not the one used for the generation); this is typically ignored in cryptography, and considered part of computer security.
Unless otherwise stated it is assumed that, somewhat, all public keys get known to all, without alteration or impersonation of who their owner is.
In practice, this is often done using digital certificates.