Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #5894
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Newsgroups | comp.programming |
| Subject | Re: Size of a CRC (or similar) code for a given length of message |
| Date | 2015-09-25 14:32 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <mu3eob$pbb$1@dont-email.me> (permalink) |
| References | <mu35qo$o6g$1@dont-email.me> <93788768-2386-450f-be33-1b89fa257b2c@googlegroups.com> |
On 25/09/15 13:07, Julio Di Egidio wrote: > On Friday, September 25, 2015 at 10:59:47 AM UTC+1, James Harris > wrote: >> I see from >> >> https://en.wikipedia.org/wiki/Cyclic_redundancy_check >> >> that, typically, an n-bit CRC applied to a data block of arbitrary >> length will detect a single error burst up to n bits long. >> >> That's fine - or as fine as the complex mathematics of CRCs gets! - >> but if looking to select a CRC calculation (or some other data >> integrity check) are there any guidelines on how wide the CRC code >> should be for given levels of assurance against random corruption >> for a given size of message? >> >> At the moment I am looking to protect a very short header of about >> 12 bytes, give or take, and wonder what levels of confidence a >> certain number of CRC bits would give against data corruption. >> >> For example, if I used a 3-bit CRC to protect a 12-byte header how >> 'good' would that be compared to a 5-bit CRC? And if the header >> became 24 bytes, say, what effect would that have on the >> effectiveness of 3-bit and 5-bit CRCs? (Always assuming that other >> aspects of the CRC calculation are chosen well.) >> >> If I later wanted to protect a message of a thousand or a >> hundred-thousand bytes how wide would the CRC need to be to >> maintain a similar level of confidence? >> >> Any ideas? > > If you want 100% confidence, send the whole message twice. CRC is > like hashing, a trade-off. Unless the message is short enough... > These things are always a trade-off, but sending the message twice is certainly not any kind of a guarantee. Generally speaking, sending a message twice is less useful than sending a CRC - if there are any systematic causes for corruption, you'll get the same incorrect message each time. There are times when you might want to send the message twice - but the best thing to do there would be to have a CRC as well, preferably a different CRC (such as a different seed, or some added salt) on each copy. The most appropriate choice for error detection and possibly error correction mechanism will depend entirely on the circumstances.
Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Size of a CRC (or similar) code for a given length of message James Harris <james.harris.1@gmail.com> - 2015-09-25 10:59 +0100
Re: Size of a CRC (or similar) code for a given length of message David Brown <david.brown@hesbynett.no> - 2015-09-25 13:05 +0200
Re: Size of a CRC (or similar) code for a given length of message James Harris <james.harris.1@gmail.com> - 2015-09-25 13:42 +0100
Re: Size of a CRC (or similar) code for a given length of message David Brown <david.brown@hesbynett.no> - 2015-09-25 15:15 +0200
Re: Size of a CRC (or similar) code for a given length of message Julio Di Egidio <julio@diegidio.name> - 2015-09-25 04:07 -0700
Re: Size of a CRC (or similar) code for a given length of message David Brown <david.brown@hesbynett.no> - 2015-09-25 14:32 +0200
Re: Size of a CRC (or similar) code for a given length of message Julio Di Egidio <julio@diegidio.name> - 2015-09-25 05:40 -0700
Re: Size of a CRC (or similar) code for a given length of message James Harris <james.harris.1@gmail.com> - 2015-09-25 13:45 +0100
Re: Size of a CRC (or similar) code for a given length of message Öö Tiib <ootiib@hot.ee> - 2015-09-25 04:17 -0700
Re: Size of a CRC (or similar) code for a given length of message David Brown <david.brown@hesbynett.no> - 2015-09-25 14:36 +0200
Re: Size of a CRC (or similar) code for a given length of message James Harris <james.harris.1@gmail.com> - 2015-09-25 13:49 +0100
csiph-web