957 posts
Location
Web Development
Posted 14 February 2015 - 12:22 AM
My suggestion is very simple:
Modems return the ID of the sender (along with the stuff they already do)
Why not?
PS i searched this on the forums didn't find it but sorry if this is a duplicate
Edited on 13 February 2015 - 11:23 PM
7083 posts
Location
Tasmania (AU)
Posted 14 February 2015 - 12:52 AM
My personal opinion is that that would take the fun out of it.
957 posts
Location
Web Development
Posted 14 February 2015 - 01:15 AM
My personal opinion is that that would take the fun out of it.
By it, you mean the fun of trying to identify computers that sent a message?
Because I don't find that fun.
You don't have to use it if you really don't want to, but I think it makes a lot of sense.
In real life, identity can only be determined through IP's, and you need to just believe that a device is telling you the correct address.
In CC, its the same, except it's MUCH easier to fake, since there isn't an established system.
I think just including IDs makes things so much easier.
8543 posts
Posted 14 February 2015 - 01:53 AM
There's the ability to specify a "reply channel" that will be passed along in the modem_message event on computers receiving the message, and this is, in fact, used by the rednet API to send along the originating computer's ID. This is the established system in CC, and it's a very sensible way to do so, given the capabilities that are already in place.
957 posts
Location
Web Development
Posted 14 February 2015 - 02:10 AM
There's the ability to specify a "reply channel" that will be passed along in the modem_message event on computers receiving the message, and this is, in fact, used by the rednet API to send along the originating computer's ID. This is the established system in CC, and it's a very sensible way to do so, given the capabilities that are already in place.
I suppose that's what the replay channel was intended for (I've never used it to ACTUALLY specify a reply channel)
The thing is, I'm assuming that someone is trying to fool another computer.
Having it hard coded means that it can't be faked.
7083 posts
Location
Tasmania (AU)
Posted 14 February 2015 - 02:25 AM
The thing is that IP addresses aren't that hard to spoof. MAC addresses were traditionally relied on instead, but these days, even those don't hold much water. Nevertheless, people manage to keep their transmissions safe.
I like the idea that there's the same measure of challenge to creating a secure method of communications within ComputerCraft. "Hand holding" in the way you suggest just cuts out so many of the possibilities.
957 posts
Location
Web Development
Posted 14 February 2015 - 02:51 AM
"Hand holding"
I suppose
Over the break I've got this next week I'll see what I can come up with
The reason I bring this up is I recently found an encryption system I understand and that I think should work pretty well in CC.
I still have doubts that its possible to make it
100% really safe (even ignoring brute force)
That system by the way is the the
Diffie-Hellman key exchange
Edited on 14 February 2015 - 01:55 AM
756 posts
Posted 14 February 2015 - 06:02 AM
I've implemented the Diffie-Hellman in CC a few months backs
http://pastebin.com/H3kZHZBAThing is the maximum number possible in LuaJ aren't big enough to provide maximum security, although I guess it's enough to throw off some attackers.
Edited on 14 February 2015 - 05:02 AM
148 posts
Posted 14 February 2015 - 09:39 AM
Simple bypass:
local os_computerID = os.getComputerID
local modem = peripheral.wrap("top")
local spoofID = 10
os.getComputerID = function() -- We spoof our ID
return spoofID
end
modem.open(69) -- Let's try to send it as channel 69
modem.transmit(65533, 69, "hi") -- Send as channel 69
os.getComputerID = os_computerID -- Recover changed function
Output:
replyChannel = 69
senderChannel = 69
SentChannel = 10 – The id we spoofed earlier also the thing you were suggesting
7083 posts
Location
Tasmania (AU)
Posted 14 February 2015 - 10:47 AM
You don't need to open any modem channels in order to transmit. You need to call rednet.open() before rednet.send(), but that's a requirement of the rednet API, not of modems themselves.
Your transmit command will entirely ignore your changes to the os.getComputerID function pointer. Your computer ID is only sent by modem.transmit() if you specifically stick it in there as one of the parameters.
Even ignoring those two points (what you're thinking is quite do-able, with some corrections), spoofing IDs is insufficient to tap into communications initiated via Diffie-Hellman - at least, not in any meaningful manner.
Thing is the maximum number possible in LuaJ aren't big enough to provide maximum security, although I guess it's enough to throw off some attackers.
Nothing stopping you from writing handlers for larger values. Not entirely simple, but again, that's what makes it fun! ;)/>
957 posts
Location
Web Development
Posted 14 February 2015 - 04:48 PM
fun! ;)/>
If you say so.
Ill have to stick to simpler things like GUI's and user experience.
7083 posts
Location
Tasmania (AU)
Posted 14 February 2015 - 10:22 PM
I admit there's a matter of taste involved - personally I find GUI creation tedious at best. <_</>