This website has been designed for use with the FireFox browser. Please use FireFox to view this page.
This generates two prime numbers that are large enough to
create keys that are in the order of 10’s of millions. It also checks that
the numbers are relatively prime to (p-1) * (q – 1)
Note that the functions IsPrime,
GCD
and Euler
have not yet been implemented
Firstly, create the IsPrime function.
VB.NET
Private Function IsPrime(ByRef lngNumber As
Double) As Boolean
On Error Resume Next
Dim lngCount As Double
Dim lngSqr As Double
Dim x As Double
lngSqr = Int(System.Math.Sqrt(lngNumber)) ' Get the int square root