I need to encrypt a piece of text using Ruby. For this purpose, I used the Ruby-Openssl gem. This ciphertext is passed to the python program, with which I must decrypt it. I used Pycrypto for this purpose.
The problem is that in Pycrypto we have to manually specify the add-on agreement. In Ruby, indentation is automatic. I use AES-CBC block encryption mode. This add-on causes problems because its removal cannot be performed correctly in Python. As an example, these are base64 encodings of ciphertext in Ruby and Python:
Python: aENJY28lvE89yY2T/te8vWwdeoeSqSwwlrOAv7b3AWw=
Ruby: aENJY28lvE89yY2T/te8vVoQE6JNxdSRgYXC8mqF3nI=
Please, help...
source
share