哪种内置的.NET加密算法是最安全的? [英] Which built-in .NET cryptography algorithm is the most secure?

查看:120
本文介绍了哪种内置的.NET加密算法是最安全的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

推荐答案

您不能直接比较所有类型的加密算法。这就像比较排序算法和乘法算法:它们有不同的目的。
话虽如此,我会回答:

You cannot directly compare all types of cryptographic algorithms. That would be like comparing a sorting algorithm with a multiplication algorithm: they have different purposes. That being said, I would answer:

  • Symmetric cipher: AES-256
  • Asymmetric cipher: RSA with 4096 bit key (I believe that is the maximum in .NET) or ECDSA with 571 bit key (but that is only supported in .NET 3.5)
  • Hash: SHA-512
  • Message Authentication Code: HMAC with SHA-512

尽管如此,对于大多数应用程序来说,这些都是过度的,你应该使用AES-128,RSA 2048位密钥,SHA-256和HMAC与SHA-256。

That being said, those are overkill for most applications, and you should do fine using AES-128, RSA with 2048 bit key, SHA-256 and HMAC with SHA-256.

这篇关于哪种内置的.NET加密算法是最安全的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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