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
CateR Premium
Uhmm.... could you be kind enough to explain in English how that code works? .... I'm curious.
:-))
Reply
electrobot Premium
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.
Reply
electrobot Premium
I've added some annotations. Let me know if I can assist in further explanation.
Reply
CateR Premium
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?
Reply
electrobot Premium
An upper limit is not required.
Reply
CateR Premium
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. ...?
Reply
electrobot Premium
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.
Reply
onmyownterms Premium
Thanks for this!
Reply
electrobot Premium
Certainly. Thanks for reading.
Reply
bilalized Premium
That is awesome. You reminded me of the old days when i studies C and C++...Great work.
Reply
electrobot Premium
Thanks.
Reply
DanielF1313 Premium
Wow!! Mind blowing :)
Reply
electrobot Premium
Thanks very much.
Reply
HPrimer Premium
Well done! Thanks, Douglas.
Reply
electrobot Premium
Thanks.
Reply
StepChook Premium
Thanks, Douglas. This is very interesting indeed.
Reply
electrobot Premium
Thanks. I'd like to expand this topic, so any feedback is appreciated.
Reply
Top