Jump to content




Which method for transmitting is better?

networking wireless help

13 replies to this topic

#1 TechMasterGeneral

  • Members
  • 149 posts
  • LocationUnited States

Posted 03 July 2015 - 03:19 AM

Hey everyone! I'm trying to comeback to the community again (was LuaCrawler... decided it was time for a name change). That being said I would like to know what you all would suggest for wireless networking. Right now i'm trying to make a program set that allows for seamless encrypted chat communications but i've kinda hit a wall over which api to use. One part of me wants to use modem api but i'm not sure of a way to check to see which channels are being used by other computers and which aren't. Rednet seemed like a good idea initially because of the different protocols and hostname features that could be used. I'm not which way is better for what i'm doing and would like to see what you all think.

#2 Rougeminner

  • Members
  • 151 posts

Posted 03 July 2015 - 03:38 AM

I think you shod either use lyqydnet or rednet rednet.lookup can be used to find protocols and or users on a specific protocol

#3 valithor

  • Members
  • 1,050 posts

Posted 03 July 2015 - 05:38 AM

If security is something you are worried about, then I would suggest using modem api. Otherwise there is nothing wrong with rednet.

Modem api gives you more control over what is going on in the background ex: what channel will be used.

Edited by valithor, 03 July 2015 - 05:42 AM.


#4 asto63

  • Members
  • 11 posts

Posted 03 July 2015 - 08:28 AM

Modem API is easy to use,
just do a peripheral.wrap() to the modem, and after modem.transmit(Channel,ReplyChannel,MESSAGE). And receive computer must be open on the channel with Modem.open(CHANNEL).... And you can put at frequence from 0 to around 60 000

#5 TechMasterGeneral

  • Members
  • 149 posts
  • LocationUnited States

Posted 03 July 2015 - 12:26 PM

View PostRougeminner, on 03 July 2015 - 03:38 AM, said:

I think you shod either use lyqydnet or rednet rednet.lookup can be used to find protocols and or users on a specific protocol
Wow! Lyqydnet looks pretty awesome. I might try my hand at that.

#6 TechMasterGeneral

  • Members
  • 149 posts
  • LocationUnited States

Posted 03 July 2015 - 12:32 PM

View Postvalithor, on 03 July 2015 - 05:38 AM, said:

If security is something you are worried about, then I would suggest using modem api. Otherwise there is nothing wrong with rednet.

Modem api gives you more control over what is going on in the background ex: what channel will be used.
Yeah. I'm not sure how to see what channels are being used though. For instance, If I open channel 4765 on a computer someone could be using that channel and I don't want traffic between the computers on 4765 for the secure chat to be sniffed by the other user. I think what I decided was to just put a key up somewhere on the internet and use http to grab it separately. This way I don't have to worry about it being hard coded and then someone looking at the program and knowing how to hack it.

#7 Lupus590

  • Members
  • 1,963 posts
  • LocationUK

Posted 03 July 2015 - 12:39 PM

View PostTechMasterGeneral, on 03 July 2015 - 12:32 PM, said:

View Postvalithor, on 03 July 2015 - 05:38 AM, said:

If security is something you are worried about, then I would suggest using modem api. Otherwise there is nothing wrong with rednet.

Modem api gives you more control over what is going on in the background ex: what channel will be used.
Yeah. I'm not sure how to see what channels are being used though. For instance, If I open channel 4765 on a computer someone could be using that channel and I don't want traffic between the computers on 4765 for the secure chat to be sniffed by the other user. I think what I decided was to just put a key up somewhere on the internet and use http to grab it separately. This way I don't have to worry about it being hard coded and then someone looking at the program and knowing how to hack it.

The problem with that then is if I wanted to hack your system, I just have an extra step to get your channel. Other than run time encryption, there is little you can do security wise.

#8 TechMasterGeneral

  • Members
  • 149 posts
  • LocationUnited States

Posted 03 July 2015 - 12:43 PM

View PostLupus590, on 03 July 2015 - 12:39 PM, said:

View PostTechMasterGeneral, on 03 July 2015 - 12:32 PM, said:

View Postvalithor, on 03 July 2015 - 05:38 AM, said:

If security is something you are worried about, then I would suggest using modem api. Otherwise there is nothing wrong with rednet.

Modem api gives you more control over what is going on in the background ex: what channel will be used.
Yeah. I'm not sure how to see what channels are being used though. For instance, If I open channel 4765 on a computer someone could be using that channel and I don't want traffic between the computers on 4765 for the secure chat to be sniffed by the other user. I think what I decided was to just put a key up somewhere on the internet and use http to grab it separately. This way I don't have to worry about it being hard coded and then someone looking at the program and knowing how to hack it.

The problem with that then is if I wanted to hack your system, I just have an extra step to get your channel. Other than run time encryption, there is little you can do security wise.
Well correct me if I'm wrong, but I have to use the same AES key that I encrypted the message with to decrypt that message right? Or can I use 2 different keys?

#9 Lupus590

  • Members
  • 1,963 posts
  • LocationUK

Posted 03 July 2015 - 03:17 PM

View PostTechMasterGeneral, on 03 July 2015 - 12:43 PM, said:

View PostLupus590, on 03 July 2015 - 12:39 PM, said:

-snip-
Well correct me if I'm wrong, but I have to use the same AES key that I encrypted the message with to decrypt that message right? Or can I use 2 different keys?

The problem is I can read your program and re-engineer it's encryption/decryption parts for malicious use and fetch the key from your server. The way to prevent this is to use byte code but that is not allowed on the forums ("malicious code smuggling" as I call it).

The only 2 key system I know of from encryption is public key if you can get that working, you should be safer, just have the user make there own private key.

Note: CC doesn't lend itself well to security, also I'm no expert on encryption.

Also: Why does a chat program need encryption?
My solution to my theoretical needs of preventing my CC data being read is to bit shift it a number of times. Although that is more to prevent my code from trying to understand another systems rednet chatter. (My theoretical scenario is in my Hive system, sending data to turtles [we are likely not going to do it this way though, this idea was from ages ago])

Edited by Lupus590, 03 July 2015 - 03:18 PM.


#10 MKlegoman357

  • Members
  • 1,170 posts
  • LocationKaunas, Lithuania

Posted 03 July 2015 - 03:36 PM

If it's a simple chat program, then the easiest and the best method would be to ask the user to input the password themselves. That way users would simply share their chat passwords. For other data transmission, you could use the Diffie–Hellman key exchange method.

#11 TechMasterGeneral

  • Members
  • 149 posts
  • LocationUnited States

Posted 03 July 2015 - 04:07 PM

View PostLupus590, on 03 July 2015 - 03:17 PM, said:

View PostTechMasterGeneral, on 03 July 2015 - 12:43 PM, said:

View PostLupus590, on 03 July 2015 - 12:39 PM, said:

-snip-
Well correct me if I'm wrong, but I have to use the same AES key that I encrypted the message with to decrypt that message right? Or can I use 2 different keys?

The problem is I can read your program and re-engineer it's encryption/decryption parts for malicious use and fetch the key from your server. The way to prevent this is to use byte code but that is not allowed on the forums ("malicious code smuggling" as I call it).

The only 2 key system I know of from encryption is public key if you can get that working, you should be safer, just have the user make there own private key.

Note: CC doesn't lend itself well to security, also I'm no expert on encryption.

Also: Why does a chat program need encryption?
My solution to my theoretical needs of preventing my CC data being read is to bit shift it a number of times. Although that is more to prevent my code from trying to understand another systems rednet chatter. (My theoretical scenario is in my Hive system, sending data to turtles [we are likely not going to do it this way though, this idea was from ages ago])
Yeah my plan was to use RSA key pairs for the users but have the public keys stored on a server computer program (maybe). I'm more doing this as a proof of concept to make using key pairs seamless. I just wanted a way to encrypt the public keys before sending them to the key server and then I realized I would need the key I encrypted them with on the key server already. I was going to use the cryptographic accelerator from immibis peripherals btw.
Yeah people being able to read the program is a risk I'm going to have to take. But like I said its more proof of concept.

#12 Microwarrior

  • Members
  • 33 posts

Posted 03 July 2015 - 04:51 PM

I came around asking about asymetric encryption (the kind with public and private keys) not too long ago and learned that asymetric is not possible in computercraft because cc cannot calculate the massive numbers for RSA encryption. If you want something similar, you should use AES with a diffe-Hellman key exchange. Its a bit less efficient, but is gets the job done.

#13 Lupus590

  • Members
  • 1,963 posts
  • LocationUK

Posted 03 July 2015 - 05:14 PM

If it's a proof of concept then go for it, but if you have to send sensitive data then don't use CC with that data.

Have a look at other encryption posts of the forums for more tips.

#14 meigrafd

  • Members
  • 17 posts
  • LocationGermany

Posted 06 July 2015 - 05:55 PM

Is there any project available with DH (Diffie–Hellman key exchange) support for ComputerCraft?

I think that will be the easiest and securest methode for me for my "big nuclear reactor"-project, coz i need to use multiple wireless-network connections but dont want to add hardcoded encryption-keys..

I think i cant code DH myself :rolleyes:

Ive found this: http://www.computerc...s-various-apis/
but im not sure if it will work.. ?

Edited by meigrafd, 06 July 2015 - 06:00 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users