Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Fermat primality test
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Applications== As mentioned above, most applications use a [[Miller–Rabin primality test|Miller–Rabin]] or [[Baillie–PSW primality test|Baillie–PSW]] test for primality. Sometimes a Fermat test (along with some trial division by small primes) is performed first to improve performance. [[GNU Multiple Precision Arithmetic Library|GMP]] since version 3.0 uses a base-210 Fermat test after trial division and before running Miller–Rabin tests. [[Libgcrypt]] uses a similar process with base 2 for the Fermat test, but [[OpenSSL]] does not. In practice with most big number libraries such as GMP, the Fermat test is not noticeably faster than a Miller–Rabin test, and can be slower for many inputs.<ref>{{citation|author=Joe Hurd|date=2003|title=Verification of the Miller–Rabin Probabilistic Primality Test|page=2|citeseerx=10.1.1.105.3196}}</ref> As an exception, OpenPFGW uses only the Fermat test for probable prime testing. The program is typically used with multi-thousand digit inputs with a goal of maximum speed with very large inputs. Another well known program that relies only on the Fermat test is [[Pretty Good Privacy|PGP]] where it is only used for testing of self-generated large random values (an open source counterpart, [[GNU Privacy Guard]], uses a Fermat pretest followed by Miller–Rabin tests).
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)