Generalized Fermat Prime search program
genefer is a multithreaded application on CPU and an OpenCL™ application on GPU.
It performs a fast probable primality test for numbers of the form b2n + 1 with Fermat test.
A slower deterministic primality test is also available.
Yves Gallot implemented a new test based on right-angle convolution in Proth.exe in 1999. genefer was a free source code created in 2001. In 2009, Mark Rodenkirch and David Underbakke wrote an implementation for x64 and in 2010, Shoichiro Yamada and Ken Brazier for CUDA. In 2011, Michael Goetz, Ronald Schneider and Iain Bethune added Boinc API and since then genefer has been extensively used by PrimeGrid computing project. In 2013, Yves Gallot wrote different implementations for OpenCL using Number Theoretic Transforms. In 2014, a z-Transform replaced the original weighted transform.
genefer version 22+ is a new C++ application, created in 2022. The previous versions inherited the originally code written in C and a new design was necessary to achieve new levels of complexity.
It implements an Efficient Modular Exponentiation Proof Scheme discovered by Darren Li. The test is validated with Gerbicz - Li error checking and a proof is generated with (Pietrzak - Li) algorithm. Thanks to the Verifiable Delay Function, distributed projects run at twice the speed of double-checked calculations.
Any number of the form b2n + 1 such that 1024 ≤ b < 2,000,000,000 and 12 ≤ n ≤ 23 can be tested on GPU.
On CPU, the code is optimized for PrimeGrid tests and the current limits are b = 2000M (n = 12, 13, 14, 15), b ~ 1500M (n = 16), 1000M (n = 17, 18), 70M (n = 19), 55M (n = 20), 45M (n = 21), 35M (n = 22), 25M (n = 23).
- Linux x64 and arm64
- Windows x64 and arm64
- MacOS x64 and arm64
- Android arm64
The 32-bit versions are no longer supported.
Select the makefile of your target. On Windows, MSYS2 distribution and building platform can be installed.
The compiler (gcc or clang) can be changed, Boinc interface is optional.
The default settings are: gcc on x64 and clang on arm64, linked to Boinc.
Binaries are validated using:
- genefer: Ubuntu 24.04, gcc 13.3 and clang 20.1
- geneferg: Ubuntu 18.04, gcc 7.5
- genefer.exe, geneferg.exe: Windows 11 - MSYS2, gcc 15.2 and clang 22.1
- genefer_arm, geneferg_arm: Ubuntu 22.04, gcc 11.4 and clang 14.0
- genefer_arm.exe, geneferg_arm.exe: Windows 11 on Arm - MSYS2, ?
- genefer_android_arm: Android 12, NDK r29 - clang 21.0
- genefer_mac_x64, geneferg_mac_x64: MacOS 10.13, clang 15
- genefer_mac_arm, geneferg_mac_arm: MacOS 12, clang 15
genefer is free source code, under the MIT license (see LICENSE). You can redistribute, use and/or modify it. Please give feedback to the authors if improvement is realized. It is distributed in the hope that it will be useful.