开发者

Excellent Encryption for String Type Data [duplicate]

This question already has answers here: 开发者_开发技巧 Closed 12 years ago.

Possible Duplicate:

How to encrypt a string in .NET?

Which one is the most excellent and toughest encryption for String type data in C#..


That really depends on your exact requirements.

Most modern encryption algorithms are probably more than strong enough for your needs if you use them properly.

The weak point in your system will not be the encryption algorithm itself. Almost every other aspect of your setup will be more vulnerable to attack than the algorithm.


My primary answer is "it depends upon what you're doing with that string". This question (and answers) will guide you...

.NET Secure Memory Structures

... but it depends if you're encyrpting/security that string in memory, how you're persisting it, how you intend using that string and how you intend disposing of it.

These SO questions touch on these topics too..

How to encrypt a string in .NET?

What's the best way to encrypt short strings in .NET?

... and contain useful links.


That would be a one-time pad. If correctly implemented it's been proved to be impossible to crack but an OTP is most probably not a viable option for you.

RSA encryption is very secure and .NET supports it. But since asymmetric encryption is only designed for encrypting data smaller than it's key size it's often not a great choice for encryption of arbitrary strings. That leads us to block ciphers and among those I would recommend AES.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜