Miller-Rabin Test
The Miller-Rabin Test is a probabilistic algorithm used to determine if a number is a prime. It works by checking whether a number passes certain mathematical conditions that are true for prime numbers. If a number fails these conditions, it is definitely composite. However, if it passes, it may still be composite, which is why the test is called probabilistic.
This test is particularly useful for large numbers, making it a popular choice in cryptography, especially in algorithms like RSA that rely on prime factorization. By running the test multiple times with different bases, the accuracy of the result increases, reducing the chance of error.