A "batteries include" routine for testing if a 32-bit integer is prime (from the referenced 2015 paper): After trial divisions, hash 'n', table lookup and 1 Miller-Rabin step (which I'm doing in Montgomery form).
gist.github.com/Marc-B-Reyno...
gist.github.com
test is a unsigned 32-bit integer is prime
test is a unsigned 32-bit integer is prime. GitHub Gist: instantly share code, notes, and snippets.