This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Geforce Fan's profile picture

[LUA] [HELP]How to encode something, send over rednet, decode at the other end?

Started by Geforce Fan, 17 May 2013 - 06:15 PM
Geforce Fan #1
Posted 17 May 2013 - 08:15 PM
How do I encode something then send it to another computer over rednet, then have that computer send it to another one and then that computer decode it?
I can't seem to figure out how to use the RC4 encryption API, can anyone help?
(I didn't want to have to make a new topic)
making a new topic, nvm.
Edited on 18 May 2013 - 09:30 AM
Sora Firestorm #2
Posted 17 May 2013 - 08:31 PM
The SHA encryption algorithms are hashes, which cannot be decrypted, by design.
You're going to have to choose another algorithm.
Bubba #3
Posted 17 May 2013 - 09:33 PM
Step 1) Design or find an encryption (NOT hashing!) method of your choice. There are plenty of APIs floating around the forums. A quick search of "encrypt" should yield the results you want.
Step 2) Use the encryption method to encrypt the input and then send it the computer which will decode the encryption.
Step 3) Perform the decryption method provided with the API or that you yourself have created on the encrypted string.
Step 4) ???
Step 5) Profit!1!11
Geforce Fan #4
Posted 17 May 2013 - 11:45 PM
Could you help me with the the RC-4 one? The commands don't want to work.
RC-4 is the only one that I think would work that I've found. I've spent like an hour searching.
Geforce Fan #5
Posted 18 May 2013 - 11:15 AM
bump
Orwell #6
Posted 18 May 2013 - 03:15 PM
I implemented an RSA-api the other day (not quite finished yet). I strongly suggest the RSA algorithm (wikipedia) or any other public-key algorithm. It's what's being used in SSL and other applications of encrypted networking.
PixelToast #7
Posted 18 May 2013 - 11:59 PM
i have a working XOR stream API (verry insecure if you know what your doing)
its essentially noob-proof to those who have no knowledge of encryption
it uses a symetric key exchange (unlike rsa wich is asymetric) using FCS32