open source code for RSA implementation in C/C++ (Use library or write my own) [closed]

强颜欢笑 提交于 2019-12-06 15:55:40

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.

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.

davka

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!