How RSA keys are tested for primality if they are random generated? I imagine this could be time consuming task.

  • 2
    $\begingroup$ @kelalaka: The answer to the question originally linked as duplicate does not explain how the primality of the factors $p$ and $q$ is tested, other than by reference. E.g FIPS 186-5 appendix B.3 or A.1.4. I linked to another duplicate, and might make or improve an answer. $\endgroup$
    – fgrieu
    Commented Sep 28, 2023 at 15:19
  • 1
    $\begingroup$ Not just time consuming, indeterminate runtime. Which can be fun if you have e.g. a smart card processor in a personalization machine inside of a credit card factory. $\endgroup$
    – Maarten Bodewes
    Commented Sep 29, 2023 at 4:31