The purpose of this tutorial is to provide a brief understanding of why prime numbers are important in the world of online security.

This tutorial is very short and to the point. The following information will be presented:

-Prime number definition.
-Prime number auto generation process.
-Output of auto generation.
-Plain, non technical, explanation of how prime numbers influence security.

Let's begin.

A prime number is a natural number that is only divisible by the numeral one and itself. Divisible in this context indicates that the process of division does not leave a remainder. For example, the natural number 17 is a prime number. 17 can be divided by 1. 17 can be divided by 17.

17 / 1 = 17

17 / 17 = 1

Continue to the next page to see how prime numbers are generated.

Join the Discussion
Write something…
Recent messages
Thank you. ~Gina
Thanks for your good efforts, Douglas.
It's way over MY head, but then my head can be kinda pointy at times...
Uhmm.... could you be kind enough to explain in English how that code works? .... I'm curious.
:-))
Hi. I put some comments in the code, however, I suppose more comments would help. I'll annotate the code in more detail. Anything after a double slash (//) is a comment in most programming languages. Also, anything within /* ... */ is a comment in C. If there is a specific part of the code that your are curious about, please let me know and I will do my best to elucidate. I'll add the additional annotations as soon as I can.
I've added some annotations. Let me know if I can assist in further explanation.
Okay :-))) ....
First, my understanding of code and computerese isn't even in the pygmy stage of development so answering this question will answer my curiosity....

You have restricted your example to >1000 ---- can it (or any other example) be extended to cover any possible prime number?
Or must any attempt always have an upper limit?
An upper limit is not required.
You sure? As the number of possible prime numbers is infinite - if you set a computer to calculate all prime numbers without an upper limit it would never stop calculating. ...?
There are computers that have been constantly calculating the value of pi for years. These computers never stop. The same can be done with prime number calculation.
Very interesting, thank you for this.
Thanks for the valuable training.
Wayne
I've been fighting information overload my whole life. This is very interesting information, but I'm going back to my WA training, if I need a question answered on prime numbers I know who to ask - thanks
Thanks for this!
That is awesome. You reminded me of the old days when i studies C and C++...Great work.