ddmg-250 opened a new issue, #12504: URL: https://github.com/apache/apisix/issues/12504
### Description I encrypt data using the resty.opensl.cipher class in sm4-cbc mode, but after encryption, it still cannot be decrypted using JAVA. The same string is encrypted using the opensll command, which is consistent with Java, but different from Lua scripts, using the same key and IV. Has anyone encountered the same problem. My API version for the environment is 3.11.0 and OpenSSL version is 3.2.0. But it has been resolved. The problem lies in the inconsistent data filling method. Some people say that the default filling method for FFI is pkcs7, which is compatible with Java's pkcs5. Testing found that they still cannot encrypt and decrypt each other. Later, manual data filling using Lua scripts was used to solve the incompatibility problem; Does anyone know what the default filling method for this class is ### Environment - APISIX version (run `apisix version`): - Operating system (run `uname -a`): - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`): - APISIX Dashboard version, if relevant: - Plugin runner version, for issues related to plugin runners: - LuaRocks version, for installation issues (run `luarocks --version`): -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
