I am reverse engineering a software that implements its own encryption over HTTP. The implementation is very simple, the client has the server's public key which it uses to encrypt the data it sends to the server; there is no encryption in the response. To handle RSA encryption the software uses openssl, the problem is that I cannot understand how AES encryption is implemented. Replacing the public key of the server that the software has with my own I can't decrypt the packets, with openssl I can decrypt the AES key, but I have no idea how to use it, what mode it uses, etc... The key would appear to be 256 bit, or perhaps it is a 128-bit key combined with an IV. I have tried various combinations with the most popular modes, but without success. How should I proceed? In addition, the encrypted text has a length that does not seem to have a particular padding, but I have tried CTR without success.