I'm generating RSA 2048-bit keys with $p$ and $q$ of 1024-bit primes. For primality, I'm using the Miller-Rabin test. As Carmichael numbers pass the MR test, I tried to compute how many such numbers exist.
From wiki, the number of Carmichaels numbers exist are $C(X)>X^{0.332}$.
So the number of 1024-bit Carmichael numbers are 2339.07.
In relative terms the probability that a chosen prime number is Carmichael number is 2−678.01 which is significantly low.
My doubt is since the amount of Carmichael numbers that exists which is 2339.07 is quite a significant number and if there is a way these numbers are generated in polynomial time there is a high possibility that one can easily install backdoors or purposefully can generate weak RSA keys with Carmichael numbers as primes.
Is there exists any such algorithm that can generate Carmichael numbers in polynomial time? Is there any sort of this kind of insider attack that happened on RSA before, if so can you please share some references?