在C / C ++中使用RSA实现的开源代码(使用库或写自己的) [英] open source code for RSA implementation in C/C++ (Use library or write my own)

查看:1547
本文介绍了在C / C ++中使用RSA实现的开源代码(使用库或写自己的)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要用于RSA实现(加密/解密和其他)的开源代码。任何人都可以提出一些建议。

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

编辑:
使用像opessl这样的开源库是很好的,或者写它自己的(库包括其他多余的东西)

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

推荐答案

OpenSSL库是最明显的选择。 CryptLib 是另一个选项,但您需要检查许可证(它是相当具体)。

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

关于编写自己的代码:
如果你只需要 RSA,它不大,你可以自己写。然而,RSA几乎从不被它自己使用。通常使用随机密钥和对称算法进行加密,然后使用RSA对随机密钥进行加密。所以如果你想要数据加密并决定写自己的东西,你会重新发明的轮子。

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.

这篇关于在C / C ++中使用RSA实现的开源代码(使用库或写自己的)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆