JTK – Notes and Ramblings Things we have found …

12/30/2021

Lua and encryption

Filed under: General — taing @ 2:07 pm

Several times I’ve gone looking for a bit of Lua to do some encryption. For most of these cases I need to have something reversible – meaning I need to recover the original text not just prove it matches with a hash…

This time I have a few candidates:

First is Bruce Schneier’s Solitaire algorithm. I found a Lua implementation. Solitaire is unfortunately limited to the 26 uppercase letters.

Then I found a pair of AES implementations – first and second. These come from the same guy on github but the first one seems a bit more standalone. From what I read these are both pretty slow.

I then stumbled upon https://github.com/philanc/plc where there are several algorithms implemented in pure Lua. morus sounds good and is described as very fast but requires 64 bit integers.

I also found a small simple algorithm that seems to be a good fit. One word of caution here is the results from this will be quite different if you only have 32 bit Lua. I’m not sure what impact 32 bit only has on the security of the method.

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress