Despite the fact primality test is a mathematical issue, it plays a part on the security of many cryptosystems such as RSA. I was trying to understand how it works until I came to the following congruency:
〖(X+a)〗^p≡X^p+a (mod X^r-1,p)
The above reduces evaluating the initial congruency 〖(X+a)〗^p≡X^p+a (mod p)
to have less coefficient. How do we evaluate the above one?