Hello guys!
At the beginning, I use pycrypto aes to encryp data in client, and decrypt data in tornado server. But when I run a benchmark, I found that use tornado to handle this is too slow, So I decided to decrypt data in openresty.
But when I use lua-resty-string aes ecb mode for decrypt, I found that the client cipher data encrypted by pycrypto can't be decrypted by lua-resty-string aes because of pycrypto doesn't use openssl PKCS padding.
I think the simplest way is to use openssl PKCS padding when use pycrypto ecb aes. But I think another way is to use pycrypto aes in lua, so I implement
lua-pycrypto-aes module which is based on pycrypto aes source. Now I only implement ECB,
CBC, CFB, OFB mode. If you are interested in this, you can try it and implement CTR mode better. Thank you very much!
Best regards!
siddontang