From one of my favorite books ever, Applied Cryptography by Bruce Schneier
“If someone created a database of all primes, won’t he be
able to use that database to break public-key algorithms?
Yes, but he can’t do it. If you could store one gigabyte
of information on a drive weighing one gram, then a list
of just the 512-bit primes would weigh so much that it
would exceed the Chandrasekhar limit and collapse into a
black hole… so you couldn’t retrieve the data anyway”
In other words, it’s impossible or unfeasible, or both.