# What is the importance of prime numbers in cryptographic algorithms?

such a RSA algorithm.

-
This is thoroughly explained in the Wikipedia article: en.wikipedia.org/wiki/RSA#Security_and_practical_considerations –  Qiaochu Yuan Dec 10 '10 at 7:51
i just wanted to know why prime numbers where used.I dont want to know the implementation of RSA.THANKS. –  Manoj Kumar Dec 10 '10 at 9:50
See also Arturo's great answer math.stackexchange.com/questions/7377/… to the similar question "Why are very large prime numbers important in cryptography?". –  j.p. Dec 10 '10 at 10:50
thanks its great.it really made my mind clear on the use of primes. –  Manoj Kumar Dec 10 '10 at 11:02

The short answer is that what makes primes useful is that it is easy to multiply two primes, but difficult to algorithmically factorise a given number into prime factors (i.e. takes a long time, if the number is big). So multiplying primes is an operation that is easy to perform but difficult to reverse. That makes them a perfect candidate for implementing public-private key encryption.

A long answer would involve explaining RSA, which has been done in lots of places and you will have no difficulty finding them. You need to know Fermat's little theorem to understand how RSA works.

-
thanks.i dont want to know the explaination of RSA,but i wanted to know that why prime numbers were used.i got it thanks. –  Manoj Kumar Dec 10 '10 at 9:48
i have a another question.what is importance of pi.It is used evrywhere Quantum mechanics,relativity..everyfield. –  Manoj Kumar Dec 10 '10 at 9:52
@bobby You should ask that as a separate question. It is in a sense a philosophical question, so you will probably get lots of different answers. –  Alex B. Dec 10 '10 at 9:56
okay.thank you. –  Manoj Kumar Dec 10 '10 at 10:53