High Quality Content by WIKIPEDIA articles! A primality test is an algorithm for determining whether an input number is prime. Amongst other fields of mathematics, it is used for cryptography. The difference between this and integer factorization is that a primality test doesn't necessarily give prime factors, while integer factorization does. As of 2009, factorization is a computationally hard problem, whereas primality testing is comparatively easy. Some primality tests prove that a number is prime, while others prove that a number is composite. Therefore we might call the latter compositeness tests instead of primality tests.