开发者

is there any better algorithm of crc32 to check corruption of data?

i am receiving packets from a terminal device and then upon receiving packets on host side, i use crc32 algo to generate mac for packet data so that i can check is there any corruption of data during transfer of packet from 开发者_StackOverflow中文版terminal to host.Is crc32 reliable for this purpose or is there some better algorithm?


CRC32's usefulness depends on the size of the data being checked and what you're protecting against. For small packets and detecting transmission failures, it's probably just fine.

If you are protecting against an active attacker, perhaps you want a secure hash function or to use a cipher.

There is a lot of literature on this kind of stuff; it really depends on what you are trying to achieve. However: If your basic problem is detecting comms errors on short packets, CRC32 is probably just fine.


CRC32 is used by protocols such as Ethernet and HDLC. I would say that is very much suitable for error detection.


crc32 is simple, reliable, and fast. In fact TCP only uses a 16 digit check sum.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜