Modular Arithmetic and Primality

Modular Arithmetic and Primality Modular Arithmetic and Primality

axon.cs.byu.edu
from axon.cs.byu.edu More from this publisher
01.01.2015 Views

function primality2(N) Input: Positive integer N Output: yes/no Choose a 1 …a k (k

Primality testing is efficient! - O(n 3 ) Carmichael numbers – There are an infinite but rare set of composite numbers which pass the Fermat test for all a i – These can be dealt with by a more refined primality test Generating random primes – An n bit random number has approximately a 1 in n chance of being prime Prime Generation Algorithm CS 312 - Complexity Examples - Arithmetic and RSA 33

function primality2(N)<br />

Input: Positive integer N<br />

Output: yes/no<br />

Choose a 1 …a k (k

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

Saved successfully!

Ooh no, something went wrong!