Photo by Towfiqu barbhuiya on Unsplash

Your Online Security is Fundamentally Dependent on Hard Problems …

Primitive root of a prime number p modulo p in PowerShell

--

Our online security is fundamentally dependent on hard problems. Unfortunately, most of the methods used cannot be proven to be hard problems, and where the RSA method, discrete logs and elliptic curve methods will generally not be hard problems in a post-quantum computer world. But, for just now:

is generally a hard problem to find x, if we know Y, g and p (as long the prime number — p - is large enough). These days, p needs to have at least 1,024 bits to be secure, and in many cases much more than that. But, can we pick any value of g and p? Well, normally we randomly generate a number of a given size, and then increment the value until we find that it is a prime number. Next, we must find a value of the generator g, that will work with this prime number.

So, if we have g^x (mod p) and where p is a prime number, can we find a value of g that makes sure that we get a unique output from 1 to p−1, for every value of x from 0 to p−2? This is known as the primitive root under modulo p.

First, we need the Euler Totient Function (Φ) and which is:

Φ=p−1

--

--

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.