The premise "_we don't have a way of generating and verifying a 2048-bit prime number with 100% accuracy_" is wrong (if we trust the computers performing the operations): it has long been known practicable ways to generate randomly-seeded provable primes, and it is a (somewhat marginal) practice in RSA key generation (see [FIPS 186-4 appendix B.3.2][1]). We can even practically prove (or disprove) the primality of an arbitrary 2048-bit integer, using [a number of methods][2], including the one pointed in [comment][3]: Daniel J. Bernstein, [_Proving primality in essentially quartic random time_][4], in Mathematics of Computation 76 (2007), 389–403 (which is a randomized test giving a certainty; only the time it takes to reach certainty depends on the particular randomness used). However this is complex, and practical cryptography is happy with a simpler probabilistic primality test. Notice that 64 rounds of [Miller-Rabin test][5] against an integer one has randomly _drawn_ (which is the case in RSA key generation), rather than _received_ from a potentially hostile party, are way overkill to rule out compositeness with residual odds less than $2^{-128}$; 4 rounds are more than enough, see [FIPS 186-4 table C-2][6], with justification in [appendix F][7] and its reference: Ivan Damgard, Peter Landrock, and Carl Pomerance, [_Average case error estimates for the strong probable prime test_][8], in Mathematics of Computation 61 (1993), 177–194. --- If we _accidentally_ try to perform RSA with one of $p$ or $q$ composite (because an error crept in the implementation of the primality test), the usual formulas $\varphi(p\cdot q)=(p-1)\cdot(q-1)$ or $\lambda(p\cdot q)=\operatorname{lcm}(p-1,q-1)$ will lead to incorrect value, and with overwhelming odds, decryption or signature verification will fail on the first real use (assuming non-malicious choice of $p$ and $q$, and a random message or proper padding is used). In a PKI context, the verification by the certification authority of the [public-key certification request][9] (which is customarily self-signed) will almost certainly fail. That's because a successful use of RSA constitutes a powerful primality test of $p$ and $q$ (it essentially performs a [Fermat test][10] with a random witness for both $p$ and $q$; that is less powerful than a [Miller-Rabin][11] test, but still very effective). However (just as all practical primality tests for large integers), it gives an indication of compositeness, but does not reveal a previously unknown factor; that's where the reasoning/intuition in the question breaks. An exception pointed in [comment][12] is when the composite $p$ that crept in happens to be a [Charmichael number][13]. These are composites such that $x\not\equiv0\pmod p\implies x^{p-1}\equiv 1\pmod p$; that is, no Fermat test can detect that a Charmichael number is composite. Correspondingly, RSA will "work" with Charmichael numbers instead of primes, but will be arguably less safe than if $p$ was prime, because $p\cdot q$ will be relatively easy to factor: if $p$ is 2048-bit, it will have at least one factor of less than 682-bit (perhaps much less if $p$ has more than three factors). However this won't happens by chance, because Charmichael numbers are very rare: by far the most abundant kind has three factors, and there are no more than $x^{5/14+\mathcal o(1)}$ of these below $x$ (see R. Balasubramanian and S. V. Nagaraj, [_Density of Charmichael numbers with three prime factors_][14], in Mathematics of Computation 66 (1997), 1705-1708). A random 2048-bit integer thus seems to have odds less than $2^{-1300}$ to be a Charmichael number. This will simply not happen by chance, hence if $p$ is a Charmichael number, in addition to the primality test, the random selection of $p$ is intentionally flawed, and the possibility of factorization of $p\cdot q$ using that it has a small prime factor is a comparatively moot issue. [1]: http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf#page=62 [2]: http://cr.yp.to/primetests.html [3]: http://crypto.stackexchange.com/q/25878/555#comment59638_25878 [4]: http://cr.yp.to/papers.html#quartic [5]: http://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test [6]: http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf#page=80 [7]: http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf#page=126 [8]: https://math.dartmouth.edu/~carlp/PDF/paper88.pdf [9]: http://en.wikipedia.org/wiki/Certificate_signing_request [10]: http://en.wikipedia.org/wiki/Fermat_primality_test [11]: http://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test [12]: http://crypto.stackexchange.com/q/25878/555#comment59675_25881 [13]: http://en.wikipedia.org/wiki/Carmichael_number [14]: http://www.ams.org/journals/mcom/1997-66-220/S0025-5718-97-00857-0/S0025-5718-97-00857-0.pdf