手机客户端与服务器之间采用https协议进行通信,并对传输的内容进行RSA和DES的加密.
我想通过lua或nginx的模块对手机客户端传过来的消息进行RSA或DES解密.
但是不清楚现在是否有这样的模块?
或者请教一下各位同学,对客户端和服务器之间的消息加密解密是否有更好的建议?
2012/5/14 steven <suyi...@gmail.com>:
> 我的应用场景:
>
> 手机客户端与服务器之间采用https协议进行通信,并对传输的内容进行RSA和DES的加密.
> 我想通过lua或nginx的模块对手机客户端传过来的消息进行RSA或DES解密.
> 但是不清楚现在是否有这样的模块?
>
> 或者请教一下各位同学,对客户端和服务器之间的消息加密解密是否有更好的建议?
>
> --
> 邮件自: 列表“openresty”,专用于技术讨论!
> 发言: 请发邮件到 open...@googlegroups.com
> 退订: 请发邮件至 openresty+...@googlegroups.com
> 详情: http://groups.google.com/group/openresty
> 官网: http://openresty.org/
> 仓库: https://github.com/agentzh/ngx_openresty
> 建议: 提问的智慧 http://wiki.woodpecker.org.cn/moin/AskForHelp
> 教程: http://agentzh.org/misc/nginx/agentzh-nginx-tutorials-zhcn.html
lua-resty-string 库的 0.06 版刚刚包含了 resty.aes 模块,通过 LuaJIT FFI 向 Lua 提供了
OpenSSL 的 AES API:
https://github.com/agentzh/lua-resty-string
可以仿照着 resty.aes 模块再写一个 resty.des 和 resty.rsa 模块 :)
通过 LuaJIT FFI 方式暴露的 C API 要比通过标准 Lua C 模块的方式更为高效,因为 LuaJIT 有机会直接在 JIT
生成的机器码中直接内联相关的 C 库调用。
目前的 ngx_openresty 稳定版和开发版都尚未包含 lua-resty-string 0.06,但下面这个 1.0.15.5rc2
中已经包含了它(以及这两天的一些新 bug 修复):
http://agentzh.org/misc/nginx/ngx_openresty-1.0.15.5rc2.tar.gz
Best regards,
-agentzh
On 5月14日, 下午3时13分, agentzh <agen...@gmail.com> wrote:
> 2012/5/14 steven <suyis...@gmail.com>:
呵呵,我会继续写教程的,只是眼下我被用户补丁和邮件淹没了。。。呵呵
Regards,
-agentzh