Jump to content




encrypting

lua networking

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

#21 tfoote

  • New Members
  • 134 posts
  • LocationSalt Lake, UT

Posted 22 June 2012 - 11:05 PM

View PostOmegaVest, on 22 June 2012 - 07:08 PM, said:

TFoote, use Bossman201's code. As has been said, Obfuscation is best until such time as we can just mod bios.lua. Which is unlikely to happen. But be aware that anytime you just rearrange the text, someone, somehow, will figure out how to put it back right.

Ok.

#22 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 22 June 2012 - 11:06 PM

View Posttfoote, on 22 June 2012 - 11:05 PM, said:

View PostOmegaVest, on 22 June 2012 - 07:08 PM, said:

TFoote, use Bossman201's code. As has been said, Obfuscation is best until such time as we can just mod bios.lua. Which is unlikely to happen. But be aware that anytime you just rearrange the text, someone, somehow, will figure out how to put it back right.

Ok.
Why would you add useless overhead to the code? Just send the message unencrypted, it would be almost the same.

#23 tfoote

  • New Members
  • 134 posts
  • LocationSalt Lake, UT

Posted 22 June 2012 - 11:38 PM

I figured after this that it would just be too confusing... I talked to the server person and figured some stuff out

#24 Bossman201

  • New Members
  • 92 posts

Posted 23 June 2012 - 03:15 AM

View PostOmegaVest, on 22 June 2012 - 07:08 PM, said:

TFoote, use Bossman201's code.
Hell yeah.

But I found a better solution than encryption. Surround routers with blocks, remove privileges to destroy blocks from players. For extra security, add another layer around the router.

#25 kazagistar

  • Members
  • 365 posts

Posted 23 June 2012 - 03:20 AM

View PostBossman201, on 23 June 2012 - 03:15 AM, said:

View PostOmegaVest, on 22 June 2012 - 07:08 PM, said:

TFoote, use Bossman201's code.
Hell yeah.

But I found a better solution than encryption. Surround routers with blocks, remove privileges to destroy blocks from players. For extra security, add another layer around the router.

This dude knows how it is DONE. But seriously, Cloudy, if you are reading this, we could use a way to disable startup boot built in the native CC bios.

#26 Bossman201

  • New Members
  • 92 posts

Posted 23 June 2012 - 03:33 AM

Of course, we don't have to really deal with rednet at all. You could possibly use bundled cables or regular redstone, then transmit that data in bytes/bits(if using bundles), which would be plenty secure from coders that don't format their code. Actually, bundled cables are really nice because you can have computers send/receive at the same time, simulating how real-world internet works. (an Ethernet cable is, essentially, a bundled cable) I learned a fair bit of networking in high school.

EDIT: Although, we learned about encryption, not how to encrypt. So I don't really know how to code it. All I know is obfuscation.
EDIT2: Just remembered something from when I was looking at the Lua Math Library. You could always set a random seed using
local iSeed = math.random()
local tTemp = {}
local tMessage = {}
function encrypt(t)
write your own function
return t
end
math.randomseed( iSeed )
tMessage = encrypt(tTemp)
rednet.send/broadcast([id,] tMessage)
Then you just need to obfuscate and jumble the characters, and send the seed hidden somewhere in the message. I never played with seeds much but from what I understand an identical seed will always produce identical results. Therefore the seed is your cipher.

#27 tfoote

  • New Members
  • 134 posts
  • LocationSalt Lake, UT

Posted 23 June 2012 - 03:45 AM

View PostBossman201, on 23 June 2012 - 03:33 AM, said:

EDIT: Although, we learned about encryption, not how to encrypt. So I don't really know how to code it. All I know is obfuscation.

Agreed





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users