I looked into the math behind RSA and seem to understand the basic encryption and decryption scheme.
Let's say there are two parties, Alice and Bob, who wish to communicate and secure their conversation using RSA.
Alice generates two prime numbers ($p$ and $q$), uses those to compute $n = p q$, and $\phi(n) = (p-1) (q-1)$. Then she computes two values, $e$ and $d$ which are relatively prime to $n$. She sends over the publicly accessible values $n$ and $e$ to Bob, who encrypts his message $m$ by computing a value $c = m^e \bmod n$. He sends this publicly accessible value to Alice who then uses $d$ to compute $m = c^d \bmod n$.
If an eavesdropper intercepts their conversation and gets the value of $c = m^e \bmod n$ and knows $e$ and $n$, could he not just brute-force different values of $m$ to see which works?
rsa brute force
is, in fact, this question; the next one after that is crypto.stackexchange.com/q/58147, but it's not clear on what RSA-based encryption scheme it's referring to, and the answers don't really explain how real RSA-based encryption is related to the function $x \mapsto x^e \bmod n$, or how randomization is essential to public-key encryption. $\endgroup$