I've read here that :
If you’ve watched a security certificate being generated on your computer ..., here is exactly what happens – it produces two large numbers , checks that they are both prime and multiplies them together. This gives you your “public key”, which you can share freely with the world. It allows other people to send you messages by encrypting them with your public key; however, since getting the original two prime numbers from your public key is hard (only your computer knows them because it generated them in the first place), you are the only one who can actually decrypt them!
So I wanted to test how much it takes to "Extract" the prime numbers from a multiplication of 2 big prime numbers :
I won't take huge huge number ( just for demonstration) so I went to this site and took 2 large ( not huge) prime numbers :
32,452,867
and
15,485,867
Let's multiply them and we have : 502560782130689
Now let's see what prime numbers is this number made of :
void Main()
{
double a, b;
Console.WriteLine("Please enter your integer: ");
a = double.Parse(Console.ReadLine());
for (b = 2; a > 1; b++)
if (a % b == 0)
{
int x = 0;
while (a % b == 0)
{
a /= b;
x++;
}
Console.WriteLine("{0} is a prime factor {1} times!", b, x);
}
}
It took 2 seconds to find out :
Question
I'm positive that I didn't understand the paragraph above becuase , to me ,it's seems pretty easy to find out what prime numbers is the number is made of : so I don't understand this part :
however, since getting the original two prime numbers from your public key is hard (???)
**Update : **
I wanted to go further and choose greater numbers :
941,083,987 and 295,075,153 ( multiplication = 277690501449875011 )
And again the time was short enough :