Here’s an example of the sort of mathematics we use. Just to be clear, this is an extremely simplified example that’s no good for encryption.
First we need a key pair. Any 2 numbers that have a result ending in 1 when you multiply them. Let’s choose 7 and 3 which make 21 when multiplied together. 7 is our key. 3 is the private key for the receiver
Now, take a number. Any number between 1 and 9. Lets pick 4.
We multiply by 7 (our public key) to get 28 and throw away the 10s digit to get 8.
We send the 8 to the other person. This is our “encrypted text”. Nobody looking will be able to guess what number we started with. They’ll have to try all possibilities.
The person at the other receives the 8. The multiply it by 3 (their private key) to get 24. They throw away the 10s and get 4! The number they started with!
Now multiplication doesn’t work for cryptography because it’s too easy reverse, but there are other operations that behave in a similar way. We just need to find the right pair of number where applying our public key to the data, then the private key to that data gives us what we started with.
Latest Answers