A method, apparatus, and article of manufacture provide the ability to
rapidly generate a large prime number to be utilized in a cryptographic
key of a cryptographic system. A candidate prime number is determined and
a mod remainder table is initialized for the candidate prime number using
conventional mod operations. If all mod remainder entries in the table
are non-zero, the candidate number is tested for primality. If the
candidate prime number tests positive for primality, the candidate number
is utilized in a cryptographic key of a cryptographic system. If any of
the table entries is zero, the candidate number and each mod remainder
entry are decremented/incremented. If any mod remainder entry is less
than zero or greater than the corresponding prime number, the
corresponding prime number is added/subtracted to/from the mod remainder.
The process then repeats until a satisfactory number is obtained.