Question

I need open source code for RSA implementation (encrypt/decrypt and others). Can anyone suggest some.

Edit: Is it good to use a open source library like opessl or write it your own (Library include other redundant stuff too)

Was it helpful?

Solution

OpenSSL library is the obvious choice. CryptLib is another option, yet you need to check the license (it's quite specific).

Regarding writing your own code: if you need only RSA, it's not large and you can write it yourself. However, RSA is almost never used by its own. Usually encryption is performed using random key and symmetric algorithm, and then the random key is encrypted with RSA. So if you want data encryption and decide to write your own stuff, you will be reinventing the wheel.

OTHER TIPS

Crypto++ Library is a free C++ class library of cryptographic schemes. Amongst the many different encryption systems it supplies it also provides RSA.

In general, it is never a good idea to roll your own encryption/security code, unless this is what you are good at. Secure code is HARD, and even in established libraries loopholes, bugs and faults pop up every once in a while.

OpenSSL would be the standard choice. http://www.openssl.org/ http://www.openssl.org/docs/crypto/rsa.html describes its API.

have a look also at cryptopp. I use it and it is very convenient (haven't use the RSA though).

see my other answers here and here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top