My little cousin (12year) asked me about how emails are encrypted and I want to answers her in such a way she understands it. This is diffuct, but I am happy with teaching the definition of a prime number and a composite.
Is there a teacher here who knows how to explain it in such a way that I and make her understand how to factor a number in to primes and what a prime number is?
I think the best way to explain encryption is something like this:
Imagine you want to safely send a package to me, without taking any chances it will get stolen in transit. First, mail be a box with an open lock in it. I'll take my own open lock, put it inside the box, then lock the box with your lock and mail it back to you. (Call me to confirm you did this -- that's how I know I'm not just getting a lock from someone else who stole the box when it was in the mail.) When you receive the package, unlock your lock, take out mine, put what you want to mail to me inside, then lock it with my lock and send it back to me.
(This isn't a direct analogy for how things are really done, but it explains the basic principle that by being clever with how locks are transported you can transmit something securely.)
Now, the thing that makes this work is a special feature of a lock: anyone can put a lock on if it's open, but once it's on you need the key to get it off.
If we want to do this with computers, we have to come up with a math problem that works that way: it's easy to do it in one direction, but once it's been done it's hard to undo unless you know something special (the key).
Okay, so suppose I give you two numbers, say 23 and 47, and asked you to multiply them together. You know how to do that, right? You just write them down, multiply 3 times 7, [etc.] and you get 1081. On the other hand, what if I told you I multiplied two numbers together and got 1081, and I asked you what the numbers were? Well, you know now -- they're 23 and 47. But if you didn't know that, how would you figure that out? You'd just have to try every pair of numbers until you figured it out. I mean, maybe you could be a little clever about it, but it'd still be hard work no matter what you did.
So multiplying two numbers together is like closing a lock, and getting the numbers back is like trying to open it.
(Again, this doesn't really quite agree what we really do when we encrypt a message, but it gets the principle of a one-way function across and segues nicely into talking about prime numbers.)
Now that you've (hopefully) motivated the problem of trying to factor an integer, you have a good place to start talking about primes -- they're just the point at which you can't factor any further and so you're done.