gpt4 book ai didi

performance - 生成 sha1 哈希需要多长时间?

转载 作者:行者123 更新时间:2023-12-02 17:48:07 27 4
gpt4 key购买 nike

生成 SHA1 散列需要多长时间(大约 60 个字节?)
与其他哈希相比?

提前致谢。

最佳答案

当然,生成哈希值的实际时间在很大程度上取决于您的硬件,因此无法提供具体时间。

也就是说,可以表明 SHA1 哈希算法相对于其他哈希算法的性能。

以下链接提供了许多不同的流行哈希算法的性能比较:

Crypto++ 5.6.0 Benchmarks

MD5 vs. SHA-1, Performance & Pedigree

Performance Comparison: Security Design Choices
(检查大约一半的位置,在“ComputeHash”标题下)

来自最后一个链接:

ComputeHash

The method computes the hash of data stored in a file. We performed the tests with a data size of 4 KB, 135 KB, and 1 MB to see how the size of data impacts performance.

enter image description here

Figure 4. Hash algorithms (4 KB): RPS and response time

Note:

.NET Framework supports various hash algorithms including MD5, SHA1, SHA256, SHA384, and SHA512. The only difference between the various SHA implementations is the hash size that they produce. We opted to include only SHA1 and SHA512 in our tests. We used System.Security.Cryptography that provides various implementations of SHA1 and MD5. There is just one implementation of MD5 available in System.Security.Cryptography: MD5CryptoServiceProvider that wraps CAPI. SHA256, SHA384 and SHA512 are not currently available in CryptoAPI. These algorithms are implemented directly in managed code. These algorithms have been added just to support the new key generation requirements of AES, not to provide stronger algorithms than SHA1. The current belief is that SHA1 is more than adequate for hashing data. For SHA1 and SHA512, we used managed implementations, SHA1Managed and SHA512Managed, respectively, available in System.Security.Cryptography. As shown in Figure 4, all the algorithms are very similar in performance with SHA512 slightly behind. MD5 produces a hash of size 128 bits. The computation process in SHA is very much modeled after MD5. It produces a 160-bit hash.

关于performance - 生成 sha1 哈希需要多长时间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11985238/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com