Real-world applications of prime numbers? I am going through the problems from Project Euler and I notice a strong insistence on Primes and efficient algorithms to compute large primes efficiently. 
The problems are interesting per se, but I am still wondering what the real-world applications of primes would be. 
What real tasks require the use of prime numbers?

Edit: A bit more context to the question:
I am trying to improve myself as a programmer, and having learned a few good algorithms for calculating primes, I am trying to figure out where I could apply them. 
The explanations concerning cryptography are great, but is there nothing else that primes can be used for? 

Thought I'd mention an application (or more like an explicit effect, rather than a direct application) that prime numbers have on computing fast Fourier transforms (FFTs), which are of fundamental use to many fields (e.g. signal processing, electrical engineering, computer vision).
It turns out that most algorithms for computing FFTs go fastest on inputs of power-of-two size and slowest on those of prime size. This effect is not small; in fact, it is often recommended, when memory is not an issue compared to time, to pad one's input to a power of 2 (increasing the input size to earn a speedup). 
Papers on this have been written: e.g. see Discrete Fourier transforms when the number of data samples is prime by Rader.
And github issues like this suggest it is still an issue.
Very specific algorithms (e.g. see this one using the Chinese remainder theorem for cases where the size is a product of relative primes) have been developed that, in my opinion, constitute some relevancy of primality to these applications. 
