combining CRCs

combining CRCs

Post by David Car » Tue, 18 Aug 1998 04:00:00



If I have CRCs for 2 blocks of data, is it practical to compute the CRC
for the combined block.
 
 
 

combining CRCs

Post by Paul Rub » Wed, 19 Aug 1998 04:00:00




Quote:>If I have CRCs for 2 blocks of data, is it practical to compute the CRC
>for the combined block.

Yes, CRC's are just the block modulo the CRC polynomial.
So you can combine two of them in the obvious way.

 
 
 

combining CRCs

Post by Colin Plu » Sun, 23 Aug 1998 04:00:00





>> If I have CRCs for 2 blocks of data, is it practical to compute the CRC
>> for the combined block.

> Yes, CRC's are just the block modulo the CRC polynomial.
> So you can combine two of them in the obvious way.

You have to adjust for things like preset to -1 and inverting
the final output, but before such complications are added,
CRC(a XOR b) = CRC(a) XOR CRC(b).

To deal with the CRC of blocks that are appended to each other,
you have to realize that a CRC considers a message as a
polynomial in x, where the bits are the coefficients.
I.e. you're sending m(x).  The CRC has a ganerator polynomial
p(x) of degree n, and CRC(m) = m(x)*x^n % p(x), where %
is the modulo remainder.

If you have a second message m'(x) which you want to prepend to the first,
then you need to find the length k of the first message and
compute CRC(m'm) = (m'(x)*x^(n+k) + m(x)*x^n) % p(x).

This can be converted to

CRC(m'm) = (CRC(m') * x^k + CRC(m)) % p(x).
Remembering that adding CRCs is actually done by XORing them, all you
need to do is to "shift" the CRC of m' by k positions, then you
can XOR it with the CRC of m.

The details aren't that hard to work out, although you won't find
polynomail multiplcation in the usual example CRC code.
--
        -Colin

 
 
 

1. Help CRC-16, CRC-CCITT, BCH

Hi, everyone.

As you know
   CRC-16 = x^16 + x^15 + x^2 + 1.
   CRC-CCITT = x^16 + x^12 + x^5 +1.
   BCH code => Various generator polynominals

        My questions are as follows..

        1. Could you show me some cases of these kinds of situation?

        2. How exact each method can detect these kinds of erranous situation

           in the 'normal'communication environment?

           (Statistical data is much favored..)

           For example:
               For CRC-16-> single bit error : ?(%)
                            double bit error : ?(%)
                            Odd number bit error : ?(%)
                            (Various kind of)burst error : ?(%)

    Please....  

     I'll be very pleased if I can get to know any 'little' answers.

    TIA...

2. Testing

3. Factor-combining method vs CORDIC

4. KOFAX ADRENALINE 1700 WTD

5. Problems with quick loop combined with fabric login

6. HP 5L under unix (ie using ghostscript to produce PCL output)

7. What is it called when you combine ....

8. WTB: Cyberstorm Mark II 060

9. combining 2 hard drive

10. Prob combining 8/16-bit drives in wide scsi system

11. Help with DAT and MAC and PC (combined)

12. Combined Magneto-Optical & CD-ROM Drives?

13. Write Allocate and Write Combine