-
Notifications
You must be signed in to change notification settings - Fork 13
coding_002
Zhang Jc edited this page May 13, 2018
·
5 revisions
校验和与密码学hash函数的应用的场合不同,复杂度也不同,校验多用于通信数据传输,所以速度一定要快,而安全hash多用于加密等安全领域,计算速度甚至是慢也无所谓。
e.g. 校验(checksum)比如CRC等,hash比如MD5、SHA等。
[1][2] 中给出了CPU的测试。[3]中给出了GPU的测试。
- 印象
算法 | CPU | GPU |
---|---|---|
SHA1 | ~500 MB/s | ~8 GB/s |
MD5 | ~500 MB/s | ~20 GB/s |
SHA256 | ~250MB/s | ~3 GB/s |
[1] https://www.cryptopp.com/benchmarks.html
[2] http://bench.cr.yp.to/results-hash.html
[3] Speed Hashing, https://blog.codinghorror.com/speed-hashing/
本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。
Wiki: wiki.jcix.top ~聚沙成塔~ Blog: blog.jcix.top