选择最佳算法 [英] select the best algorithm

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

问题描述

hy!

可以告诉我哪种是最好的/最新的安全加密算法。

至于我选择SHA-2 ...

您的选择是什么?

1)MD5

2)SHA-1

3)SHA- 2

如果还有其他请告诉....

您的意见对我来说是必要的....

hy!
can any one tell me which is the best/latest and secure algorithm for encryption.
As for my i select the SHA-2...
what will be your's choise?
1) MD5
2) SHA-1
3) SHA-2
if any other then please tell....
Your opinion is necessary for me....

推荐答案

'Best'必须针对加密算法进行定义(您似乎混淆了散列和加密,但Mehdi Gholam已在解决方案2中告诉您)。最好的算法应该是在提供的安全性和使用的资源之间显示最大比率的算法。

对于一般用途,简单的对称加密,如TripleDES,应该就足够了。如果安全性是一个更大的问题,例如银行,那么非对称加密算法可能更合适,例如RSA。但是非对称算法使用起来有点复杂,并且还需要来自计算机的更多资源。

下面我总结了一些存在并在.NET Framework中实现的加密算法,以及一些链接为了他们,你可以自己做出选择:



对称算法 [ ^ ]

AES [ ^ ]

DES [ ^ ]

RC2 [ ^ ]

Rijndael [ ^ ]

TripleDES [ ^ ]



不对称算法 [ ^ ]

DSA [ ^ ]

ECDiffieHellman [ ^ ]

ECDsa [ ^ ]

RSA [ ^ ]



不知道您的具体要求,很难判断您是否需要哈希或加密。

我唯一可以说的是,如果你愿意在你的数据库中加密你的用户密码,那你就错了:你需要存储密码的哈希值。

这篇文章 [ ^ ]提供有关密码处理最佳实践的信息。



我知道这是很多阅读但是安全性不是一个微不足道的主题,你不应该在不了解它的基础知识的情况下尝试使用它。希望这可以帮助。祝你好运。
'Best' has to be defined regarding an encryption algorithm (you seem to confound hashing and encryption, but Mehdi Gholam already told you that in Solution 2). The best algorithm should the one which shows the greatest ratio between provided security and used resources.
For general use, a simple symmetric encryption, like TripleDES, should be sufficient. If security is a bigger concern, like banks for example, then an asymmetric encryption algorithm could be more appropriate, like RSA for example. But asymmetric algorithms are a little bit more complex to use, and need also more resources from the computer.
Below I summarized you some cryptographic algorithms that exist and are implemented in .NET Framework, along with some link for them so that you can go and make your own choice:

Symmetric algorithms[^]
AES[^]
DES[^]
RC2[^]
Rijndael[^]
TripleDES[^]

Asymmetric algorithms[^]
DSA[^]
ECDiffieHellman[^]
ECDsa[^]
RSA[^]

Not knowing your concrete requirement, it is hard to tell whether you need to hash or to encrypt.
The only thing I can say is, if you are willing to encrypt your users passwords in your database, then you're wrong: you need to store a hash of the password.
This post[^] is very informative about best practices for passwords-handling.

I know this is a lot of reading, but security is not a trivial subject, and you should not attempt to use it without understanding its very basics. Hope this helps. Good luck.


大多数小型硬件设备使用椭圆曲线进行加密,因为它是最安全且字节数最少的。你可以查看这个:

http://www.youtube.com/watch?v= njNPgMmghMo [ ^ ]



他有更多关于密码学的讲座,所以只要观察它们你就会发现: - )
Most of the small hardware devices uses elliptivc curves for cryptation, as it is the most secure with the least amount of bytes. You could check out this:
http://www.youtube.com/watch?v=njNPgMmghMo[^]

He has a lot more lectures on crytography so just watch them and youll find out :-)


MD5,SHA1和SHA2都是散列函数而不是加密算法: http://en.wikipedia.org/wiki/MD5 [ ^ ]
MD5, SHA1 and SHA2 are hash functions not encryption algorithms : http://en.wikipedia.org/wiki/MD5[^]


这篇关于选择最佳算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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