Big Integers and Testing For Primes

--

Your online security is fundamentally dependent on a special type of number: a prime number. Every time you connect to the Internet, there is a computation that is normally done that allows a symmetric key to be created between you and a Web site and which involves:

V = calc (mod p)

and where p is a prime number. Along with this, we must verify a remote Web site with its signature, and so we also perform a calculation with involves a prime number (q):

S = calc (mod q)

And, so, both the security of the encryption tunnel and the trust in connection to a remote site are dependent on prime numbers. Often, for security reasons, the prime number number has to be extremely large, such as having 2,048 bits or more. Normally, though, our integer values have up to 64 bits in them, and which gives a range of up to:

>>> 2**64
18446744073709551616

But, with a 2,048 bit integer value, and which gives a range of:

>>> 2**2048
323170060713110073007148766886699519604441026697154840321303454275246551388
678908931972014115229134636887179609218980194941195591504909210950881523864
482831206308773673009960917501977503896521067960576383840675682767922186426
197561618380943384761704705816458520363050428875758915410658086075523991239…

--

--

Prof Bill Buchanan OBE FRSE
ASecuritySite: When Bob Met Alice

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.