10.12.2012 Views

Prime Numbers

Prime Numbers

Prime Numbers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

9.2 Enhancements to modular arithmetic 455<br />

although the techniques we shall describe apply equally well to general moduli<br />

2 q ±1, any q. That is, whether or not the modulus N has additional properties<br />

of primality or special structure is of no consequence for the mod algorithm<br />

of this section. A relevant result is the following:<br />

Theorem 9.2.12 (Special-form modular arithmetic). For N =2 q +c, c an<br />

integer, q a positive integer, and for any integer x,<br />

x ≡ (x mod 2 q ) − c⌊x/2 q ⌋ (mod N). (9.15)<br />

Furthermore, in the Mersenne case c = −1, multiplication by 2 k modulo N is<br />

equivalent to left-circular shift by k bits (so if k>,<br />

left-shift

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!