3

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

  • pycryptopp
  • Python-RSA

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

1
  • First clarify your requirements and make sure you aren't reinventing the wheel. Which entity is going to encrypt the data and which entity is going to decrypt it? How are the keys distributed? Do you need confidentiality only or also integrity? Commented Aug 29, 2012 at 14:26

3 Answers 3

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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

1 Comment

Thank you for answer. Finally we used for encryption Crypto++ in QT and for decryption - pycrypto in django-python. * from Crypto.Cipher insert AES
0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.