Cybersecurity Is Beautiful and Magical!

Don’t you get tired of searching for a cybersecurity-related image, and end up with endless images of “hackers with hoodies” and blurred…

Cybersecurity Is Beautiful and Magical!

Don’t you get tired of searching for a cybersecurity-related image, and end up with endless images of “hackers with hoodies” and blurred lines of JavaScript code? And, sometimes, don’t you just find cybersecurity presentations to be a little boring … “Beware of clicking on the spear phishing email!”, “The only way is to enable multifactor authentication!” (the stock answer if you ever appear on BBC News and get asked about a recent hack) or “Watch out for ransomware infecting your network … it is not nice!”?

Well, I think cybersecurity is beautiful and magical! Basically, it protects us from people who want to drain our bank accounts of all our money, and from those government agencies who don’t trust anyone. It is full of cool people who focus their research on protecting us from bad people, and who do great advances in moving our untrusted digital world to one which can be trusted, which is more secure and resilient. I see

Those beautiful and magical numbers

And, at the core of our online world we have special numbers — and who are truly magical and beautiful. Without these, we would be stuck in a world of where every network connection could be spied upon. These magic numbers are prime numbers and have managed to avoid our attempts to find a pattern for them.

Euler left a great legacy in our world and defined a magical property of [here]:

and where N and a do not share a factor — known as being co-prime. This is known as Euler’s Theorem — and is the basis of the RSA public key encryption method. If N is a prime number, of course, we can pick any number for a (but not 1 or N, of course). For example:

And, so I used 97, 997 and 2¹⁹-1 as primes here, but my favouriate prime number has 23 1's:

11,111,111,111,111,111,111,111

The pow() method uses a modulo operation, and which considerably speeds up the operation. And, I don’t know if it is prime but the number of 10⁶⁴⁰⁰-10⁶³⁵²-1 is cool:

and I even managed to demo this number at a conference:

In the RSA method, we actually use two prime numbers (p and q), and multiply them together to give a public modulus (N=p.q) [here]. We can then just use Euler’s method to secure the encryption. But, what makes prime numbers so difficult to crack? Well, with our amazing computing power and data storage, couldn’t we just find a formula for finding every prime number, and try them? Well, no!

While prime numbers seem to show a pattern, we have never actually found a way to actually find them — apart from the ancient sieve method. These pesky numbers just don’t want to be mapped! But, their rein will come to an end for cybersecurity, as quantum computers just love factorizing into prime numbers.

The Ulam spiral

It was Martin Gardner in his Scientific American column who popularized the Ulam spiral (created by Stanislaw Ulam in 1963), where the prime numbers are shown in a spiral. With this we start at the centre and then spiral the numbers around:

Figure: Spiral pattern [link]

The Ulam spiral then plots the prime numbers in this form, and where we see definite patterns of straight lines that run from top right to bottom left:

Figure: Ulam spiral [link]

While the pattern seems to be there, we just haven’t managed to find a formula which can represent this.

Riemann Hypothesis

So, we just can’t find a pattern, but we know it’s there. All we have is the ability to estimate how many prime numbers there are in a given range. This is covered in the Riemann Hypothesis, and which relates to one of the most important unsolved problems in maths:

One of the methods used calculates the prime counting function π(x) using Schoenfeld’s inequality:

One method which can be used to estimate the number of prime numbers is the Riemann R function. This is a smooth approximation for π(x). The function is defined using the rapidly convergent Gram series [here]:

A sample run is [here]:

Range from 0 to  1000000
Estimation of primes: 78498
Possibility of finding prime (%): 7.8498
---- Using Riemannr method to estimate
Estimation is: 78527
Range Est number of primes
10^ 1 4
10^ 2 25
10^ 3 168
10^ 4 1226
10^ 5 9587
10^ 6 78527
10^ 7 664667
10^ 8 5761551
10^ 9 50847455
10^ 10 455050683
10^ 11 4118052494
10^ 12 37607910542
10^ 13 346065531065
10^ 14 3204941731601
10^ 15 29844570495886
10^ 16 279238341360977
10^ 17 2623557157055978
10^ 18 24739954284239496
10^ 19 234057667300228928
10^ 20 2220819602556027136
10^ 21 21127269485932298240
10^ 22 201467286689188773888
10^ 23 1925320391607837261824
10^ 24 18435599767347541311488
10^ 25 176846309399141946490880
10^ 26 1699246750872419937812480
10^ 27 16352460426841662628560896
10^ 28 157589269275973244548022272
10^ 29 1520698109714271704874745856
10^ 30 14692398897720432138328735744

Conclusions

Cybersecurity Is Beautiful and Magical! Learn more about primes here:

https://asecuritysite.com/primes/

Happy Primes:

Carmichael primes:

Russian doll primes: