RSA加密 [英] RSA Encryption

查看:63
本文介绍了RSA加密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用RSA 1024位加密C#中超过117个字节的数据(可以使用CAPICOM和

加密API库)。


任何示例代码将不胜感激。


谢谢

Can I encrypt data more than 117 bytes in C# (can use CAPICOM and
Crypto API libraries) using RSA 1024 bit.

Any sample code would be appreciated.

Thanks

推荐答案

如果你不反对使用内置的加密库是

..NET的一部分,我建议看看
http://ryanscook.com/adminsBlog/2005...ion-class.html


布兰登

没有游戏写道:
If you arena??t opposed to using the built in crypto libraries that are part of
..NET, Ia??d suggest looking at
http://ryanscook.com/adminsBlog/2005...ion-class.html

Brendan
"no game" wrote:
我可以使用RSA 1024位加密C#中超过117个字节的数据(可以使用CAPICOM和
加密API库)。

任何示例代码都将不胜感激。

谢谢
Can I encrypt data more than 117 bytes in C# (can use CAPICOM and
Crypto API libraries) using RSA 1024 bit.

Any sample code would be appreciated.

Thanks



没有游戏< xi ****** **@hotmail.com>写道:
no game <xi********@hotmail.com> wrote:
我可以使用RSA 1024位加密C#中超过117个字节的数据(可以使用CAPICOM和
加密API库)。

任何示例代码都会我很感激。
Can I encrypt data more than 117 bytes in C# (can use CAPICOM and
Crypto API libraries) using RSA 1024 bit.

Any sample code would be appreciated.




我不知道为什么不 - 为什么超过117个字节会出问题?


有关示例代码,请参阅RSACryptoServiceProvider。 (我没有检查过

有多好。)


-

Jon Skeet - < sk * **@pobox.com>
http://www.pobox.com/ 〜双向飞碟

如果回复小组,请不要给我发邮件



I don''t see why not - why would more than 117 bytes be a problem?

See RSACryptoServiceProvider for some sample code. (I haven''t checked
how good it is.)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


我认为该解决方案的问题在于客户端和我们只用RSA 1024算法创建的
交换证书(公钥),以及
数据可能是数百个字节。我们不共享我们的算法,尝试

来做客户要求我们做的所有标准加密,

我们不能告诉他们会有一个IV和键首先被提取

然后进行对称解密。


我知道在java中,我们只需要共享我们自己的公钥然后我们可以

加密和解密数据。


在C#中我有另一个创建证书的问题,我可以获得

私钥进入RSAParameter类。


谢谢


Brendan Grant写道:
I think the problem with that solution is that the client and us only
exchange certificate (public key) created by RSA 1024 algorithm, and
the data could be hundreds of bytes. We don''t share our algorithm, try
to do everything in standard encryption which the client ask us to do,
we can not tell them there will be a IV and Key to be extracted first
and then do a symmetric decryption.

I know in java, we just need to share our own public key then we can
encrypt and decrypt data.

In C# I have another problem of create a certificate and I can get the
private key into RSAParameter class.

Thanks

Brendan Grant wrote:
如果你不反对使用内置的加密库是
.NET的一部分,我建议看看
http://ryanscook.com/adminsBlog/2005...ion-class.html

布兰登

没有游戏写道:
If you aren''t opposed to using the built in crypto libraries that are part of
.NET, I''d suggest looking at
http://ryanscook.com/adminsBlog/2005...ion-class.html

Brendan
"no game" wrote:
我可以使用RSA 1024位加密C#中超过117个字节的数据(可以使用CAPICOM和
加密API库)。

任何示例代码都将不胜感激。

谢谢
Can I encrypt data more than 117 bytes in C# (can use CAPICOM and
Crypto API libraries) using RSA 1024 bit.

Any sample code would be appreciated.

Thanks






这篇关于RSA加密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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