Does there exist a test that checks if a number is prime or a semi prime in polynomial time?
I am aware that AKS can be used to check primality but what about semi primality?
==================================================================
Additional Note:
Do there exist algorithms that cannot differentiate between primes and semi-primes but can differentiate either of those two from normal integers?
It is an open problem. As far as anyone knows it is as hard as factoring which is not known to be in $P$. A related problem which is also not known to be in $P$ is determining if a number has an even or odd number of prime factors.