roqsi
roqsi

Reputation: 141

Encrypt in C++ and decrypt in Python

What libraries do you know that can be used to encrypt in C/C++ and decrypt in python for the RSA/AES/DES algorithms?

We are going to use one of the those algorithms to encrypt some parameters in URL.

We have already tried some libraries in C++:

and in python

But unfortunantly I didn't manage to match the parameters/keys that those libraries use.

Upvotes: 3

Views: 3067

Answers (3)

Jonathan Vanasco
Jonathan Vanasco

Reputation: 15690

I use pycrypto http://pypi.python.org/pypi/pycrypto/2.6

pycryptopp is just wrappers around Crypto++ , which means you're likely doing something wrong in Crypto , Python or both.

If you're just using payloads in URLs for web stuff, I wrote this library that handles all that crap

https://github.com/jvanasco/insecure_but_secure_enough/blob/master/insecure_but_secure_enough/__init__.py

Upvotes: 0

Valdir Stumm Junior
Valdir Stumm Junior

Reputation: 4667

Take a look at keyczar, a cryptographic toolkit from Google. It is easy to use and it is not just a set of encrypt/decrypt funcions; it has other features (e.g. key management). It does not depends on a single encryption algorithm, as the developer can choose which one to use.

There are good docs here: http://code.google.com/p/keyczar/w/list

Upvotes: 0

sean
sean

Reputation: 3985

Why not just use OpenSSL wrappers in each language? It is a very standardized method of encryption and there are many libraries that can ease in writing the code itself.

http://www.openssl.org/

https://launchpad.net/pyopenssl

http://www.boost.org/doc/libs/1_49_0/boost/asio/ssl/detail/openssl_init.hpp

This will allow for the greatest compatibility between the two languages and any other system you may need.

Upvotes: 1

Related Questions