CRC 何时比 MD5/SHA1 更适合使用? [英] When is CRC more appropriate to use than MD5/SHA1?

查看:27
本文介绍了CRC 何时比 MD5/SHA1 更适合使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与更现代的散列函数(例如 MD5 或 SHA1)相比,什么时候使用 CRC 进行错误检测合适?前者在嵌入式硬件上更容易实现吗?

When is it appropriate to use CRC for error detection versus more modern hashing functions such as MD5 or SHA1? Is the former easier to implement on embedded hardware?

推荐答案

CRC 可以很好地检测数据中可能发生的随机错误,例如来自网络干扰、线路噪声、失真等.

CRC works fine for detecting random errors in data that might occur, for example, from network interference, line noise, distortion, etc.

CRC 在计算上比 MD5 或 SHA1 复杂得多.使用像 MD5 这样的散列函数对于随机错误检测来说可能是过度的.然而,使用 CRC 进行任何类型的安全检查都比更复杂的散列函数(如 MD5)安全得多.

CRC is computationally much less complex than MD5 or SHA1. Using a hash function like MD5 is probably overkill for random error detection. However, using CRC for any kind of security check would be much less secure than a more complex hashing function such as MD5.

是的,CRC 在嵌入式硬件上更容易实现,您甚至可以在 IC 上为此获得不同的封装解决方案.

And yes, CRC is much easier to implement on embedded hardware, you can even get different packaged solutions for this on IC.

这篇关于CRC 何时比 MD5/SHA1 更适合使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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