cross platform crypto for 5.3

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

cross platform crypto for 5.3

John Dunn-2
I'm trying to track down a reasonably up to date cross platform ( linux/win ) crypto library which works with 5.3 and has a commercially viable license. So far I've looked at

https://github.com/libtom/lcrypt - It claims that the license was changed to LGPL which might fly but COPYING is still GPLv2 which is pretty much a no go. Doesn't look like it would be easy to get running on Windows as well.

https://github.com/mkottman/luacrypto - This seems to basically work although it is missing some functionality like BLOWFISH that I need. It also has a problem where it causes lua_close to crash if all I do is require the module. I think this is related to the way the module metatables are left on the stack combined with a call to lua_settop. I haven't dug into exactly what's going but converting to 5.3 style modules is probably a start - if anyone else has done this work please let me know.

http://luacrypto.luaforge.net/ - 11 years old and very limited in scope.

Are there any other modules I'm missing that I should check out?


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cross platform crypto for 5.3

szbnwer@gmail.com
hi!

if you wanna make a lightweight server, then you can get one and
customize it. probably you will find what you want included in some
more complex projects... i've chose turbo, it's fast and lightweight,
but it's luajit only... btw it wasn't a fast&small research, but
i had probably different aims than whoever else, so as well you will
need your own research. i'm sure about there are good materies out
there, but work will be needed anyhow :D i also think that
cryptographic stuffs mostly can be implemented easily from any other
one you can read, because it's mostly just some math - so it not
depends on an endless root - i think...

have fun :D

2017-08-08 1:22 GMT+02:00 John Dunn <[hidden email]>:

> I'm trying to track down a reasonably up to date cross platform ( linux/win ) crypto library which works with 5.3 and has a commercially viable license. So far I've looked at
>
> https://github.com/libtom/lcrypt - It claims that the license was changed to LGPL which might fly but COPYING is still GPLv2 which is pretty much a no go. Doesn't look like it would be easy to get running on Windows as well.
>
> https://github.com/mkottman/luacrypto - This seems to basically work although it is missing some functionality like BLOWFISH that I need. It also has a problem where it causes lua_close to crash if all I do is require the module. I think this is related to the way the module metatables are left on the stack combined with a call to lua_settop. I haven't dug into exactly what's going but converting to 5.3 style modules is probably a start - if anyone else has done this work please let me know.
>
> http://luacrypto.luaforge.net/ - 11 years old and very limited in scope.
>
> Are there any other modules I'm missing that I should check out?
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cross platform crypto for 5.3

Daurnimator
In reply to this post by John Dunn-2
On 8 August 2017 at 09:22, John Dunn <[hidden email]> wrote:
> I'm trying to track down a reasonably up to date cross platform ( linux/win ) crypto library which works with 5.3 and has a commercially viable license. So far I've looked at
>
> https://github.com/libtom/lcrypt - It claims that the license was changed to LGPL which might fly but COPYING is still GPLv2 which is pretty much a no go. Doesn't look like it would be easy to get running on Windows as well.
>
> https://github.com/mkottman/luacrypto - This seems to basically work although it is missing some functionality like BLOWFISH that I need. It also has a problem where it causes lua_close to crash if all I do is require the module. I think this is related to the way the module metatables are left on the stack combined with a call to lua_settop. I haven't dug into exactly what's going but converting to 5.3 style modules is probably a start - if anyone else has done this work please let me know.
>
> http://luacrypto.luaforge.net/ - 11 years old and very limited in scope.
>
> Are there any other modules I'm missing that I should check out?


luaossl *almost* has windows support.
https://github.com/wahern/luaossl/issues/77
It only takes a couple of small changes to get it to compile on
windows, I just haven't had time to figure out how to make it mergable
for a cross-platform release.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cross platform crypto for 5.3

Tobias Kieslich
In reply to this post by John Dunn-2
Quoting John Dunn <[hidden email]>:

> I'm trying to track down a reasonably up to date cross platform (  
> linux/win ) crypto library which works with 5.3 and has a  
> commercially viable license. So far I've looked at

I think axTls may offer everything you are looking for:
http://axtls.sourceforge.net/

  -tobbik


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: cross platform crypto for 5.3

John Dunn-2
In reply to this post by Daurnimator
> luaossl *almost* has windows support.
> https://github.com/wahern/luaossl/issues/77
> It only takes a couple of small changes to get it to compile on windows, I just haven't had time to figure out > > how to make it mergable for a cross-platform release.

Thanks. This looks promising. I have found one issue - on line 1265

  if (!GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_PIN|GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (void *)&luaopen__openssl, NULL))

On my machine ( Win10 x64 ) the call to GetModuleHandleEx fails with ERROR_INVALID_PARAMETER. It looks like the issue is passing NULL as the HMODULE. If I pass in a dummy module things appear to start working.

John
Loading...