The purpose of this is just to sort of become aware of what a public key is and you could. Probably teach your friends this and pass notes in school or something.
Okay first off this is a fairly basic tutorial and shouldn't help you out too much in the world of cryptography but here goes.
So what is public key cryptography? Well here is an example:
I'm the example Alice sends a "plaintext" message to bob: I will pay $500
Her message is then encrypted into "cipher-text" with her private key and the encrypted message is then sent to bob. Bob then uses Alice's private key to decode and receive the message.
What Im going to show you is how you can make a basic public key message, encrypted and decrypt. Do lets start
When making a public cryptography map you want to start with three points called nodes. Like so:
Next you want to give each of these nodes a partner node in my example we will give them two. Notice how the nodes don't overlap partners.
Now connect all the partner nodes together
OKAY! You now have a basic public key map.
MAKING (Part 2):
An advantage to encrypting your message now is you know the three first nodes these are the blue nodes this will come in handy later for decrypting.
Let's see me and my friend made up a secret code and I want to say: Hello
In our secret code the number 66 represents the word hello. So I would want to encrypt 66 into cipher-text so my teacher won't know what we are saying. This is what to do:
Using your map from part 1 place numbers by each node. In the end all the numbers must add up to 66. Example:
As you can see I tidied up the public key map so others can't tell. Anyway looking at this the teacher could add up all the numbers and ask what 66 means if she found it so there isn't much safety to it, am I right?
So what we want to do next is make it harder to tell. Each node has 2 partner nodes in this example so that's 3 nodes. The node and the 2 partner nodes. So for each set of three we want to add up the 1st nodes number, the 2nd nodes number and the 3rd nodes number place the total by the middle node. Like so:
As you an see if the old numbers were erased it would take a while to decode. So once you finish that the final note you send to your friend would be this:
Now your done!!
So say your friend gave that message to you. Since we made the public key map the trick to decoding the message is to use the first three nodes we drew. Which in this case are the corner area ones:
All you need to decode this one is add up the numbers for these three nodes and you get the unencrypted answer:
There you go.
not all public key maps are the same so don't just do the corner ones. Nodes can have more then 2 partners in a map. ALSO it's best to map numbers above 20 on this because 20 and below are to easy to decode and not as secure. Your ALLOWED zeros and negative numbers when making a map.