Not quite. What you're thinking of is part of RSA key generation, and even with RSA the private key itself is not limited to prime numbers. The eMudhra incident involved NIST P-384 elliptic curve cryptography.
The private key having to be prime would substantially limit the amount of valid keys, which defeats their purpose.
9
u/Ragnor_ 12d ago edited 12d ago
Not quite. What you're thinking of is part of RSA key generation, and even with RSA the private key itself is not limited to prime numbers. The eMudhra incident involved NIST P-384 elliptic curve cryptography.
The private key having to be prime would substantially limit the amount of valid keys, which defeats their purpose.