It takes a short time to generate such a number but a very long time to decompose it, but this is a different problem than telling whether a number is prime.
ECC doesn’t require primes and so is safer in that respect although I’ve been hearing that ECC might have structural deficiencies that causes a swing back to RSA for the most secure applications.
You seem to be claiming that the ability to determine whether a number is prime or not is extremely difficult and that it would break (some) cryptography if it were no so. My stance is that (some) cryptography would not be broken unless factorisation of large numbers into two large primes becomes easy.
Can you clarify how you think that some cryptography is broken by a relatively simple test of whether a large number is prime or not?
https://en.wikipedia.org/wiki/AKS_primality_test
I'm not sure why you would expect this to break all (or any) cryptographic protocols.