Author Topic: [Basic] Making and Breaking Public Key Cryptography  (Read 1212 times)

Itouch_hacker

  • Full Member
  • ***
  • Posts: 233
  • Reputation: 7
  • Just a curious little ewok
    • Games
  • Computers: iMac
  • iDevices: Jailbroken iPad 2 and Jailbroken iPod 2G
[Basic] Making and Breaking Public Key Cryptography
« on: April 03, 2012, 06:13:00 am »
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

MAKING:
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:


Ve
Now your done!!


DECODING/DECRYPTING:

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:

33+23+10=66

There you go.


NOTE:

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.
 

grinch

  • Administrator
  • Hero Member
  • *****
  • Posts: 1926
  • Reputation: 187
  • the digital grinch who stole your data
    • @DigitalGrinch
  • Badges:
  • iDevices: iPhone 3GS 4.3.3, HTC Evo V 4G ICS
Re: [Basic] Making and Breaking Public Key Cryptography
« Reply #1 on: June 16, 2012, 01:08:21 pm »
In the example above, Bob uses Alices PUBLIC key to decrypt, not her private key. Bob does not(or should not) have access to her private key.

Did this "map" make any sense to anyone? I understand public key cryptography and this lost me after diagram 3
If I help you or you appreciate my work, clicking that +1 button is the best thanks I could get.

My opinions are my own, you may agree or disagree with them, but they are only just that; opinions
For example: facebook is the microsoft of social networks

http://goo.gl/PiVjI

@DigitalGrinch
https://twitter.com/DigitalGrinch

I follow all iNinjas members back. PM me if I am not following you

LankAsif

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2392
  • Reputation: 90
  • Forum pride 8)
  • Badges:
  • Computers: i7 with bits and pieces
  • iDevices: iPod Touch 1G (Basically storage for iNinja tools), iPhone 5
Re: [Basic] Making and Breaking Public Key Cryptography
« Reply #2 on: June 16, 2012, 02:26:14 pm »
I got lost too. Was waiting to see other replies to see if im not focussing enough.

Education is never achieved by wise men. it is only believed to have been achieved by fools

Ironman

  • Administrator
  • Hero Member
  • *****
  • Posts: 5103
  • Reputation: 251
  • Badges:
  • Computers: ASUS UL50VT
  • iDevices: iPhone 5, iPhone 4S, iPhone 4, iPhone 3GS
Re: [Basic] Making and Breaking Public Key Cryptography
« Reply #3 on: June 16, 2012, 03:51:05 pm »
I think I got it!! However I believe it could use a little more detail in the explanation to get the idea across.  +1 though. 😊
Click for How to Add Our Repo
If you're going to ask questions....
At least make them good ones.

Knowledge is the one thing that can never be taken from you

LavaThemes

  • Dev Team Member
  • Hero Member
  • *****
  • Posts: 757
  • Reputation: 34
  • Aspiring Developer
  • iDevices: iTouch 4
Re: [Basic] Making and Breaking Public Key Cryptography
« Reply #4 on: June 16, 2012, 03:53:05 pm »
If I remember correctly, this is from a video. It's much easier to understand in the video I saw.

Don't like seeing ads? Click here to register!

C0deH4cker

  • Hero Member
  • *****
  • Posts: 2849
  • Reputation: 129
  • I am leaving iNinjas. Contact me via email.
  • Badges:
  • iDevices: iPhone 4S 16gb Black (5.1.1), iPad 2 32gb White (5.0.1), iPod Touch 2G 8gb (4.2.1)
Re: [Basic] Making and Breaking Public Key Cryptography
« Reply #5 on: June 16, 2012, 07:18:50 pm »
I didnt understand it at all lol

LavaThemes

  • Dev Team Member
  • Hero Member
  • *****
  • Posts: 757
  • Reputation: 34
  • Aspiring Developer
  • iDevices: iTouch 4
Re: [Basic] Making and Breaking Public Key Cryptography
« Reply #6 on: June 16, 2012, 08:15:00 pm »
http://m.wimp.com/howencryption/

This is much easier to understand.

LankAsif

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2392
  • Reputation: 90
  • Forum pride 8)
  • Badges:
  • Computers: i7 with bits and pieces
  • iDevices: iPod Touch 1G (Basically storage for iNinja tools), iPhone 5
Re: [Basic] Making and Breaking Public Key Cryptography
« Reply #7 on: June 16, 2012, 08:29:15 pm »
Lol. Thanks Lava

Education is never achieved by wise men. it is only believed to have been achieved by fools