Exercise 2.4.8 (Strong pseudoprime algorithm)

Note that the algorithmic form of the strong pseudoprime test does not terminate prematurely, then the last number examined is a 2 j 1 d = a ( m 1 ) 2 . Explain why it is not necessary to consider a m 1 .

Answers

Proof. If the strong pseudoprime test does not terminate prematurely, it does not terminate at the step j 1 , therefore a 2 j 1 d = a ( m 1 ) 2 ± 1 ( mod m ) .

If a m 1 1 ( mod m ) , then m is composite, since it does not verify the conclusion of Fermat theorem.

If a m 1 1 ( mod m ) , then m is also composite, since [ a ( m 1 ) 2 ] 2 1 ( mod m ) , but a ( m 1 ) 2 ± 1 ( mod m ) .

In both cases m is composite, thus it is useless to compute a m 1 modulo m .

This gives step 5 of the algorithm:

5. If the procedure has not already terminated, then m is composite. □

User profile picture
2024-08-24 10:40
Comments