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

Encryption in Lua

Started by UXELDUXEL, 06 August 2013 - 03:07 PM
UXELDUXEL #1
Posted 06 August 2013 - 05:07 PM
Hey does anybody has a good encryption in computercraft which is purely lua based (not peripheral mod / php based)

The encryption should have these things:

1. should be asynchronous
2. should be fast in crypt and decrypt
3. should be hard(1+ hours) to decrypt if somebody gets the source code of the encryption

I already made a pretty mean encryption it uses seeds with math.randomseed(changes every message) and also some sinus calculations.
The problem is it can get cracked instantly if somebody gets an encrypted message and the source code of the encryption.
That is what i am trying to fix… i tried rsa encryption but it was way to slow (5 minutes to encrypt and 12 to decrypt a 50 char text)

So my question would be:

Does somebody got a good encryption that would fix my problems?

UXELDUXEL

Btw: Yes i am trying to use this for rednet …
Cranium #2
Posted 06 August 2013 - 06:28 PM
As it's a request for a program, I am moving this to the General section.
KillaVanilla #3
Posted 06 August 2013 - 07:15 PM
There are lots of encryption algorithm implementations here; look in the APIs and Utilities section of the forums. You might need to look back a couple of pages.
Most of those algorithms, though, are synchronous. You could use coroutines, to (simulate or use, I'm not sure on terminology) asynchronicity.

Two examples of "real-world" encryption algorithm implementations: RC4, AES.