Jump to content




Modem security


  • You cannot reply to this topic
5 replies to this topic

#1 valithor

  • Members
  • 1,053 posts

Posted 30 August 2015 - 04:42 AM

Been a while since I have posted a topic here :P

I am trying to find a way to create a secure connection between two computers using the modem api. I already have found a way using something similar to a Ceasar cipher to encrypt the message once the secure connection is made (trust me it is very very hard to crack), but I am having trouble finding a way to get the secure connection. What I need to create a secure connection is the ability to have some random number accessible on both computers. So far the only thing that I have found that would be unique between the two computers is the distance between the computers from the modem_message event. However, this would only be secure as long as someone else did not have a system set up to locate the position of computers, which they could use to find the distance between the two computers.

If anyone has any ideas of anything I could try to create a good random number that only two computers would have access to it would be appreciated.

Edited by valithor, 30 August 2015 - 04:44 AM.


#2 HPWebcamAble

  • Members
  • 933 posts
  • LocationWeb Development

Posted 30 August 2015 - 05:03 AM

This is a key-exchange proof-of-concept I wrote:
http://pastebin.com/PvbUbACi

To use in game:
1) Place down 2 computers (they shouldn't have to be advanced)
2) Place wireless modems on top of each computer
3) run the program on each

At the end of the program, they both will have the same 'shared' number, even though it is never explicitly transferred.

EDIT: It uses Diffie HellMan key exchange

Edited by HPWebcamAble, 30 August 2015 - 05:48 AM.


#3 valithor

  • Members
  • 1,053 posts

Posted 30 August 2015 - 05:10 AM

View PostHPWebcamAble, on 30 August 2015 - 05:03 AM, said:

This is a key-exchange proof-of-concept I wrote:
http://pastebin.com/PvbUbACi

To use in game:
1) Place down 2 computers (they shouldn't have to be advanced)
2) Place wireless modems on top of each computer
3) run the program on each

At the end of the program, they both will have the same 'shared' number, even though it is never explicitly transferred.

The only problem is the return port is visible to all computers who receive the message, which would make it just as easy to crack. It is still an amazing concept though. :D/>

I really do doubt I will be able to find something that will work perfectly, and will have to settle for a imperfect solution

Edited by valithor, 30 August 2015 - 05:11 AM.


#4 HPWebcamAble

  • Members
  • 933 posts
  • LocationWeb Development

Posted 30 August 2015 - 05:27 AM

View Postvalithor, on 30 August 2015 - 05:10 AM, said:

The only problem is the return port is visible to all computers who receive the message, which would make it just as easy to crack

Err, you mean the 'replyChannel'? It only broadcasts the computer's ID on with that, but it doesn't really matter if a computer lies about its ID, the calculations don't count on that.

If that's not it, please explain, I was under the impression that this is uncrackable without some fancy math

#5 flaghacker

  • Members
  • 655 posts

Posted 30 August 2015 - 05:42 AM

The wikipedia page about Diffie HellMan key exchange explains how to achieve a shared secret key. It even has some illustrations :)

#6 valithor

  • Members
  • 1,053 posts

Posted 30 August 2015 - 05:59 AM

View PostHPWebcamAble, on 30 August 2015 - 05:27 AM, said:

View Postvalithor, on 30 August 2015 - 05:10 AM, said:

The only problem is the return port is visible to all computers who receive the message, which would make it just as easy to crack

Err, you mean the 'replyChannel'? It only broadcasts the computer's ID on with that, but it doesn't really matter if a computer lies about its ID, the calculations don't count on that.

If that's not it, please explain, I was under the impression that this is uncrackable without some fancy math

Yes I meant replyChannel. I guess that is what I get for skimming the code (read line 41 as p3 instead of p4[3]). I thought I saw it using the replyChannel when generating the shared number. However, I did get a very interesting result when I was testing it on 4 different computers. I edited the code on 2 computers, where it wouldn't send the first message on them, and ran 1 unedited the 2 edited and then the other unedited one. The result that I thought was interesting was not only were there only 2 that were ever the same, but also it wasn't consistently the 2 unedited ones that were the same.

Visual example: 1 and 2 are unedited, while 3 and 4 are (I always ran the 2 edited ones between the unedited ones)

1 = 2
1 = 3
1 = 4
2 = 3
2 = 4

It was always one of those combinations, with the first one usually the outcome.

View Postflaghacker, on 30 August 2015 - 05:42 AM, said:

The wikipedia page about Diffie HellMan key exchange explains how to achieve a shared secret key. It even has some illustrations :)/>/>/>

Thanks i will go check it out

Edited by valithor, 30 August 2015 - 06:02 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users