How to do AES encryption with Lua and MUSHclient revisited

Posted by Victorious on Thu 09 Nov 2017 06:04 PM — 7 posts, 31,396 views.

#0
Hi,

There's an article on the forum about how to do this but its from 2004.

Given that AES is now widely available, can this functionality be built into mushclient, and/or the guide updated? Its now pointing to 404 urls, and using lua 5.0.
USA Global Moderator #1
Quote:
can this functionality be built into mushclient

Can, yes. Should, probably not.

http://lua-users.org/wiki/CryptographyStuff
#2
It would be extremely helpful for things like private communications. I've also gone through every link of that page but haven't managed to find something that would work with mushclient.

The closest I got was aeslua which works for me in my system's lua interpretor (it relies on the bitlib module that I separately installed with luarocks, but mushclient isn't able to load the .dll for some reason even with the right cpath set.
USA Global Moderator #3
If you are failing to load a DLL, run Dependency Walker on it and make sure that it's not missing a dependency. I load DLLs all the time.
#4
It worked when I replaced the built-in lua dlls with the same ones as my local installation, so maybe it needs to use the same minor version as the built-in mushclient's lua for it to work.

One last thing is now the library i'm trying to use has a c extension named "bit", which also conflicts with mushclient's bit library.
Australia Forum Administrator #5
Apart from what Fiendish mentioned, I was wary of embedding encryption into MUSHclient because of all the carry-on about encryption being a munition and possibly getting into trouble for exporting it.

See, for example: What laws or restrictions exist regarding export of encryption products from Australia?

I gave some ideas (https://www.gammon.com.au/forum/?id=4988) for how to do encryption, without actually supplying the files. Thus, anyone that wants to do it can get into trouble with their governments themselves rather than it being my fault.

If the links don't quite work, it should be easily fixable. AES encryption is widely used and there should be reference implementations around, plus probably ones that work faster or more compactly than the reference version.
USA Global Moderator #6
One thing I'm not sure I understand is what is meant by "extremely helpful for things like private communications."

Private communications where and between whom? Because I use TLS all the time in MUSHclient with luasocket, lua-openssl, and lua-llthreads2.