For generic encryption, I have came upon Lua Lockbox, which is a native lua implementation of many security algorithms (but not a random generator). Being native Lua it may not give very best performance, but for occasional encryption that may not be an issue.

Regarding TLS, I like the idea of extracting the abstraction layer from libcurl. I have very little experience with c, and also not with linux and mac os, so I am unable to do this myself or to help here.

Is this something that that you can and/or would like to do? In my opinion, it would be a huge complement to your framework to be able to 'speak ssl without hassle'.