|
|
Line 1: |
Line 1: |
| {{Use dmy dates|date=July 2013}}
| |
| A '''cyclic redundancy check''' ('''CRC''') is an [[Error detection and correction|error-detecting code]] commonly used in digital [[Telecommunications network|networks]] and storage devices to detect accidental changes to raw data. Blocks of data entering these systems get a short ''check value'' attached, based on the remainder of a [[Polynomial long division|polynomial division]] of their contents; on retrieval the calculation is repeated, and corrective action can be taken against presumed data corruption if the check values do not match.
| |
|
| |
|
| CRCs are so called because the ''check'' (data verification) value is a ''redundancy'' (it expands the message without adding [[Entropy (information theory)|information]]) and the [[algorithm]] is based on [[Cyclic code|''cyclic'' codes]]. CRCs are popular because they are simple to implement in binary [[Computer hardware|hardware]], easy to analyze mathematically, and particularly good at detecting common errors caused by [[noise]] in transmission channels. Because the check value has a fixed length, the [[Function (mathematics)|function]] that generates it is occasionally used as a [[hash function]]. The CRC was invented by [[W. Wesley Peterson]] in 1961; the 32-bit CRC function of Ethernet and many other standards is the work of several researchers and was published during 1975.
| |
|
| |
|
| ==Introduction==
| | Gold is one particular of the principal resources in Clash of Clans.<br><br>It's employed to upgrade and develop Elixir Storages, Elixir Collectors, traps, defensive structures, and partitions. We know that gold is gathered by way of the gold mines, and then put into the gold storages. The gold storages determine the full sum of gold you might be capable to keep.<br>The far more storages, and much more upgrades you place into them, the far more gold you happen to be able to carry. Regretably, there is not a way to get an endless volume of gold in the video game with out hacking it. Given that Clash of Clans is a server-centered activity, any hacking accomplished to the recreation will make it reset.<br><br>So the ideal way to gain coins is just next some uncomplicated strategies that are related to accumulating assets. <br>The ready course of action is the harmless way to get additional gold. Working with a protect to secure your foundation/village will purchase you time to slowly achieve gold and elixir. Building a lot more gold mines by paying out elixirs will pace up the process of obtaining gold coins. If you have any issues regarding wherever and how to use clash of clans cheats hack for gems iphone ipod [[https://www.youtube.com/watch?v=-2QhF06R_Cs Read Home Page]], you can speak to us at our own web-site. Of system, the storage will limit the quantity of gold you can have at a time, so upgrading it will boost the storage total.<br><br>Raiding can aid acquire a excellent amount of money of gold. Going on raids in the solitary participant marketing campaign are easier, but won't give as considerably of a large payout of gold coins as it would in multiplayer. Multiplayer raids do give a more substantial payout, but are normally more dangerous.<br>Choosing the proper models to acquire down the enemies' bases will make sure all the gold you can expect to be capable to carry. You can maintain raiding other players for an limitless time, but bear in mind that raiding does drain methods, so be careful whom you raid.The exact goes when other players commence raiding your foundation, but vice versa.<br><br>Having a powerful protection will prevent the opposing participant from destroying your foundation quickly. A victory will end result you not only trying to keep your gold, but using some of theirs as effectively, along with numerous trophies. <br>As a great deal as we want to get limitless gold coins in Clash of Clans, we have to stick to the classic route. Making gold mines and raiding other gamers are the only way to truly obtain gold within just the sport. Nicely, not the only way. Paying out cash on gems, then using people gems to invest in gold is the other way, but not all of us have deep wallets.<br><br>For those of you who do have an endless money, then you can get unlimited gold just by expending all that cash on the match, and Supercell will appreciate you for producing them rich! |
| CRCs are based on the theory of [[cyclic code|cyclic]] [[error-correcting code]]s. The use of [[systematic code|systematic]] cyclic codes, which encode messages by adding a fixed-length check value, for the purpose of error detection in communication networks, was first proposed by [[W. Wesley Peterson]] during 1961.<ref name="PetersonBrown1961">
| |
| {{Cite journal
| |
| | author = Peterson, W. W. and Brown, D. T.
| |
| | year = 1961
| |
| | month = January
| |
| | title = Cyclic Codes for Error Detection
| |
| | journal = Proceedings of the IRE
| |
| | doi = 10.1109/JRPROC.1961.287814
| |
| | volume = 49
| |
| | issue = 1
| |
| | pages = 228–235
| |
| }}</ref>
| |
| Cyclic codes are not only simple to implement but have the benefit of being particularly well suited for the detection of [[burst error]]s, contiguous sequences of erroneous data symbols in messages. This is important because burst errors are common transmission errors in many [[communication channel]]s, including magnetic and optical storage devices. Typically an ''n''-bit CRC applied to a data block of arbitrary length will detect any single error burst not longer than ''n'' bits and will detect a fraction 1 − 2<sup>−''n''</sup> of all longer error bursts.
| |
| | |
| Specification of a CRC code requires definition of a so-called [[generator polynomial]]. This polynomial resembles the [[divisor]] in a [[polynomial long division]], which takes the message as the [[division (mathematics)|dividend]] and in which the [[quotient]] is discarded and the [[remainder]] becomes the result, with the important distinction that the polynomial [[coefficient]]s are calculated according to the carry-less arithmetic of a [[finite field]]. The length of the remainder is always less than the length of the generator polynomial, which therefore determines how long the result can be.
| |
| | |
| In practice, all commonly used CRCs employ the finite field [[GF(2)]]. This is the field of two elements, usually called 0 and 1, comfortably matching computer architecture.
| |
| | |
| A CRC is called an ''n''-bit CRC when its check value is ''n'' bits. For a given ''n'', multiple CRCs are possible, each with a different polynomial. Such a polynomial has highest degree ''n'', which means it has ''n'' + 1 terms. In other words, the polynomial has a length of ''n'' + 1; its encoding requires ''n'' + 1 bits. Note that most [[#Specification of CRC|integer encodings]] either drop the MSB or LSB bit, since they are always 1. The CRC and associated polynomial typically have a name of the form CRC-''n''-XXX as in the [[#Commonly used and standardized CRCs|table]] below.
| |
| | |
| The simplest error-detection system, the [[parity bit]], is in fact a trivial 1-bit CRC: it uses the generator polynomial ''x'' + 1 (two terms), and has the name CRC-1.
| |
| | |
| ==Application==
| |
| A CRC-enabled device calculates a short, fixed-length binary sequence, known as the ''check value'' or improperly ''the CRC'', for each block of data to be sent or stored and appends it to the data, forming a ''codeword''. When a codeword is received or read, the device either compares its check value with one freshly calculated from the data block, or equivalently, performs a CRC on the whole codeword and compares the resulting check value with an expected ''residue'' constant. If the check values do not match, then the block contains a ''data error''. The device may take corrective action, such as rereading the block or requesting that it be sent again. Otherwise, the data is assumed to be error-free (though, with some small probability, it may contain undetected errors; this is the fundamental nature of error-checking).<ref name="ritter-1986">{{Cite journal|first=Terry|last=Ritter|title=The Great CRC Mystery|url=http://www.ciphersbyritter.com/ARTS/CRCMYST.HTM|accessdate=21 May 2009|work=[[Dr. Dobb's Journal]]|year=1986|month=February|volume=11|issue=2|pages=26–34, 76–83}}</ref>
| |
| | |
| ==CRCs and data integrity==
| |
| CRCs are specifically designed to protect against common types of errors on communication channels, where they can provide quick and reasonable assurance of the [[data integrity|integrity]] of messages delivered. However, they are not suitable for protecting against intentional alteration of data.
| |
| | |
| Firstly, as there is no authentication, an attacker can edit a message and recompute the CRC without the substitution being detected. When stored alongside the data, CRCs and cryptographic hash functions by themselves do not protect against ''intentional'' modification of data. Any application that requires protection against such attacks must use cryptographic authentication mechanisms, such as [[message authentication code]]s or [[digital signatures]] (which are commonly based on [[cryptographic hash]] functions).
| |
| | |
| Secondly, unlike [[cryptographic hash]] functions, CRC is an easily reversible function, which makes it unsuitable for use in digital signatures.<ref name="stigge-reversecrc">{{Cite journal|last=Stigge|first=Martin|last2=Plötz|first2=Henryk|last3=Müller|first3=Wolf|last4=Redlich|first4=Jens-Peter|title=Reversing CRC – Theory and Practice|year=2006|month=May|page=17|location=Berlin|publisher=Humboldt University Berlin|url=http://sar.informatik.hu-berlin.de/research/publications/SAR-PR-2006-05/SAR-PR-2006-05_.pdf|accessdate=4 February 2011|quote=The presented methods offer a very easy and efficient way to modify your data so that it will compute to a CRC you want or at least know in advance.}}</ref>
| |
| | |
| Thirdly, CRC is a [[linear function]] with a property that <math>\operatorname{crc}(x \oplus y) = \operatorname{crc}(x) \oplus \operatorname{crc}(y)</math>; as a result, even if the CRC is encrypted with a [[stream cipher]] (or [[Block cipher modes of operation|mode]] of [[block cipher]] which effectively turns it into a stream cipher, such as OFB or CFB), both the message and the associated CRC can be manipulated without knowledge of the encryption key; this was one of the well-known design flaws of the Wired Equivalent Privacy ([[Wired Equivalent Privacy|WEP]]) protocol.<ref name="wep">{{Cite journal| last1=Cam-Winget | first1=Nancy | last2=Housley | first2=Russ | last3=Wagner | first3=David | last4=Walker | first4=Jesse | title=Security Flaws in 802.11 Data Link Protocols | journal=Communications of the ACM | volume=46 | issue=5 | pages=35–39 |date = May 2003| doi=10.1145/769800.769823 }}</ref>
| |
| | |
| ==Computation of CRC==
| |
| {{Main|Computation of cyclic redundancy checks}}
| |
| | |
| To compute an ''n''-bit binary CRC, line the bits representing the input in a row, and position the (''n'' + 1)-bit pattern representing the CRC's divisor (called a "[[polynomial]]") underneath the left-hand end of the row.
| |
| | |
| In this example, we shall encode 14 bits of message with a 3-bit CRC, with a polynomial x³+x+1. The polynomial is written in binary as the coefficients; a 3rd order polynomial has 4 coefficients. In this case, the coefficients are 1,0, 1 and 1. The result of the calculation is 3 bits long.
| |
| | |
| Start with the message to be encoded:
| |
| | |
| <pre> | |
| 11010011101100
| |
| </pre> | |
| | |
| This is first padded with zeroes corresponding to the bit length ''n'' of the CRC. Here is the first calculation for computing a 3-bit CRC:
| |
| | |
| <pre>
| |
| 11010011101100 000 <--- input right padded by 3 bits
| |
| 1011 <--- divisor (4 bits) = x³+x+1
| |
| ------------------
| |
| 01100011101100 000 <--- result
| |
| </pre>
| |
| | |
| The algorithm acts on the bits directly above the divisor in each step. The result for that iteration is the bitwise XOR of the polynomial divisor with the bits above it. The bits not above the divisor are simply copied directly below for that step. The divisor is then shifted one bit to the right, and the process is repeated until the divisor reaches the right-hand end of the input row. Here is the entire calculation:
| |
| | |
| <pre> | |
| 11010011101100 000 <--- input right padded by 3 bits
| |
| 1011 <--- divisor
| |
| 01100011101100 000 <--- result (note the first four bits are the XOR with the divisor beneath, the rest of the bits are unchanged)
| |
| 1011 <--- divisor ...
| |
| 00111011101100 000
| |
| 1011
| |
| 00010111101100 000
| |
| 1011
| |
| 00000001101100 000 <--- note that the divisor moves over to align with the next 1 in the dividend (since quotient for that step was zero)
| |
| 1011 (in other words, it doesn't necessarily move one bit per iteration)
| |
| 00000000110100 000
| |
| 1011
| |
| 00000000011000 000
| |
| 1011
| |
| 00000000001110 000
| |
| 1011
| |
| 00000000000101 000
| |
| 101 1
| |
| -----------------
| |
| 00000000000000 100 <--- remainder (3 bits). Division algorithm stops here as quotient is equal to zero.
| |
| </pre>
| |
| | |
| Since the leftmost divisor bit zeroed every input bit it touched, when this process ends the only bits in the input row that can be nonzero are the n bits at the right-hand end of the row. These ''n'' bits are the remainder of the division step, and will also be the value of the CRC function (unless the chosen CRC specification calls for some postprocessing).
| |
| | |
| The validity of a received message can easily be verified by performing the above calculation again, this time with the check value added instead of zeroes. The remainder should equal zero if there are no detectable errors.
| |
| | |
| <pre>
| |
| 11010011101100 100 <--- input with check value
| |
| 1011 <--- divisor
| |
| 01100011101100 100 <--- result
| |
| 1011 <--- divisor ... | |
| 00111011101100 100
| |
| | |
| ......
| |
|
| |
| 00000000001110 100
| |
| 1011
| |
| 00000000000101 100
| |
| 101 1
| |
| ------------------
| |
| 0 <--- remainder
| |
| </pre>
| |
| | |
| ==Mathematics of CRC==
| |
| {{Main|Mathematics of cyclic redundancy checks}}
| |
| {{Expert-subject|Mathematics|section|date=August 2010}}
| |
| Mathematical analysis of this division-like process reveals how to select a divisor that guarantees good error-detection properties. In this analysis, the digits of the bit strings are thought of as the coefficients of a polynomial in some variable ''x''—coefficients that are elements of the finite field [[GF(2)]], instead of more familiar numbers. The set of binary polynomials is treated as a [[ring (mathematics)|ring]].
| |
| | |
| ===Designing CRC polynomials=== | |
| The selection of generator polynomial is the most important part of implementing the CRC algorithm. The polynomial must be chosen to maximize the error-detecting capabilities while minimizing overall collision probabilities.
| |
| | |
| The most important attribute of the polynomial is its length (largest degree(exponent) +1 of any one term in the polynomial), because of its direct influence on the length of the computed check value.
| |
| | |
| The most commonly used polynomial lengths are:
| |
| *9 bits (CRC-8)
| |
| *17 bits (CRC-16)
| |
| *33 bits (CRC-32)
| |
| *65 bits (CRC-64)
| |
| | |
| A CRC is called an ''n''-bit CRC when its check value is ''n''-bits. For a given ''n'', multiple CRC's are possible, each with a different polynomial. Such a polynomial has highest degree ''n'', and hence ''n'' + 1 terms (the polynomial has a length of ''n'' + 1). It has a name of the form CRC-''n''-XXX.
| |
| | |
| The design of the CRC polynomial depends on the maximum total length of the block to be protected (data + CRC bits), the desired error protection features, and the type of resources for implementing the CRC, as well as the desired performance. A common misconception is that the "best" CRC polynomials are derived from either an [[irreducible polynomial]] or an irreducible polynomial times the factor (1 + ''x''), which adds to the code the ability to detect all errors affecting an odd number of bits.<ref name="williams93"/> In reality, all the factors described above should enter in the selection of the polynomial. However, choosing a reducible polynomial can result in missed errors, due to the rings having [[zero divisor]]s.
| |
| | |
| The advantage of choosing a [[Primitive polynomial (field theory)|primitive polynomial]] as the generator for a CRC code is that the resulting code has maximal total block length in the sense that all 1-bit errors within that block length have different remainders (syndromes) and hence the code can detect all 2-bit errors within that block length. If r is the degree of the primitive generator polynomial, then the maximal total block length is <math>2 ^ {r} - 1 </math>, and the associated code is able to detect any single-bit or double-bit errors.<ref>{{Cite book | last1=Press | first1=WH | last2=Teukolsky | first2=SA | last3=Vetterling | first3=WT | last4=Flannery | first4=BP | year=2007 | title=Numerical Recipes: The Art of Scientific Computing | edition=3rd | publisher=Cambridge University Press | publication-place=New York | isbn=978-0-521-88068-8 | chapter=Section 22.4 Cyclic Redundancy and Other Checksums | chapter-url=http://apps.nrbook.com/empanel/index.html#pg=1168}}
| |
| </ref> We can improve this situation. If we use the generator polynomial <math>g(x) = p(x)(1 + x)</math>, where <math>p(x)</math> is a primitive polynomial of degree <math>r - 1</math>, then the maximal total block length is <math>2^{r - 1} - 1</math>, and the code is able to detect single, double, triple and all odd number of errors. | |
| | |
| A polynomial <math>g(x)</math> that admits other factorizations may be chosen then so as to balance the maximal total blocklength with a desired error detection power. The [[BCH code]]s are a powerful class of such polynomials. They subsume the two examples above. Regardless of the reducibility properties of a generator polynomial of degree ''r'', if it includes the "+1" term, the code will be able to detect error patterns that are confined to a window of ''r'' contiguous bits. These patterns are called "error bursts".
| |
| | |
| ==Specification of CRC==
| |
| The concept of the CRC as an error-detecting code gets complicated when an implementer or standards committee uses it to design a practical system. Here are some of the complications:
| |
| *Sometimes an implementation '''prefixes a fixed bit pattern''' to the bitstream to be checked. This is useful when clocking errors might insert 0-bits in front of a message, an alteration that would otherwise leave the check value unchanged.
| |
| *Usually, but not always, an implementation '''appends ''n'' 0-bits''' (''n'' being the size of the CRC) to the bitstream to be checked before the polynomial division occurs. Such appending is explicitly demonstrated in the [[#Computation of CRC|Computation]] section above. This has the convenience that the remainder of the original bitstream with the check value appended is exactly zero, so the CRC can be checked simply by performing the polynomial division on the received bitstream and comparing the remainder with zero. Due to the associative and commutative properties of the exclusive-or operation, practical table driven implementations can obtain a result numerically equivalent to zero-appending without explicitly appending any zeroes, by using an equivalent,<ref name="williams93" /> faster algorithm that combines the message bitstream with the stream being shifted out of the CRC register.
| |
| *Sometimes an implementation '''exclusive-ORs a fixed bit pattern''' into the remainder of the polynomial division.
| |
| *'''Bit order:''' Some schemes view the low-order bit of each byte as "first", which then during polynomial division means "leftmost", which is contrary to our customary understanding of "low-order". This convention makes sense when [[serial port|serial-port]] transmissions are CRC-checked in hardware, because some widespread serial-port transmission conventions transmit bytes least-significant bit first.
| |
| *'''[[Byte order]]''': With multi-byte CRCs, there can be confusion over whether the byte transmitted first (or stored in the lowest-addressed byte of memory) is the least-significant byte (LSB) or the most-significant byte (MSB). For example, some 16-bit CRC schemes swap the bytes of the check value.
| |
| *'''Omission of the high-order bit''' of the divisor polynomial: Since the high-order bit is always 1, and since an ''n''-bit CRC must be defined by an (''n'' + 1)-bit divisor which [[Arithmetic overflow|overflow]]s an ''n''-bit [[processor register|register]], some writers assume that it is unnecessary to mention the divisor's high-order bit.
| |
| *'''Omission of the low-order bit''' of the divisor polynomial: Since the low-order bit is always 1, authors such as Philip Koopman represent polynomials with their high-order bit intact, but without the low-order bit (the <math>x^0</math> or 1 term). This convention encodes the polynomial complete with its degree in one integer.
| |
| | |
| These complications mean that there are three common ways to express a polynomial as an integer: the first two, which are mirror images in binary, are the constants found in code; the third is the number found in Koopman's papers. ''In each case, one term is omitted.'' So the polynomial <math>x^4 + x + 1</math> may be transcribed as:
| |
| *0x3 = 0b0011, representing <s><math>x^4 +</math></s><math>0x^3 + 0x^2 + 1x^1 + 1x^0</math> (MSB-first code)
| |
| *0xC = 0b1100, representing <math>1x^0 + 1x^1 + 0x^2 + 0x^3</math><s><math>+ x^4</math></s> (LSB-first code)
| |
| *0x9 = 0b1001, representing <math>1x^4 + 0x^3 + 0x^2 + 1x^1</math><s><math>+ x^0</math></s> (Koopman notation)
| |
| In the table below they are shown as:
| |
| {|class="wikitable"
| |
| ! colspan="4" | Examples of CRC Representations
| |
| |-
| |
| ! Name
| |
| ! Normal
| |
| ! Reversed
| |
| ! Reversed reciprocal
| |
| |-
| |
| | CRC-4
| |
| | 0x3
| |
| | 0xC
| |
| | 0x9
| |
| |}
| |
| | |
| ==Commonly used and standardized CRCs==
| |
| Numerous varieties of cyclic redundancy checks have been incorporated into [[technical standard]]s. By no means does one algorithm, or one of each degree, suit every purpose; Koopman and Chakravarty recommend selecting a polynomial according to the application requirements and the expected distribution of message lengths.<ref name=koop04 /> The number of distinct CRCs in use has confused developers, a situation which authors have sought to address.<ref name="williams93">{{Cite web | url= http://www.repairfaq.org/filipg/LINK/F_crc_v3.html | title= A Painless Guide to CRC Error Detection Algorithms V3.00 | accessdate= 5 June 2010 | last= Williams | first= Ross N. | date= 24 September 1996 }}</ref> There are three polynomials reported for CRC-12,<ref name=koop04 /> sixteen conflicting definitions of CRC-16, and six of CRC-32.<ref name="cook-catalogue">{{Cite web | last = Cook | first = Greg | url = http://reveng.sourceforge.net/crc-catalogue/all.htm | title = Catalogue of parametrised CRC algorithms | accessdate = 7 July 2012 | date = 6 July 2012 }}</ref>
| |
| | |
| The polynomials commonly applied are not the most efficient ones possible. Between 1993 and 2004, Koopman, Castagnoli and others surveyed the space of polynomials up to 16 bits,<ref name=koop04>{{Cite journal | last = Koopman | first = Philip | last2 = Chakravarty | first2 = Tridib | title = Cyclic Redundancy Code (CRC) Polynomial Selection For Embedded Networks | journal = The International Conference on Dependable Systems and Networks | year = 2004 | month = June <!-- date from http://www.ece.cmu.edu/~koopman/pubs.html --> | url = http://www.ece.cmu.edu/~koopman/roses/dsn04/koopman04_crc_poly_embedded.pdf | accessdate = 14 January 2011 | pages = 145–154 | doi = 10.1109/DSN.2004.1311885 | isbn = 0-7695-2052-9 }}</ref> and of 24 and 32 bits,<ref name="cast93">{{Cite journal | last = Castagnoli | first = G. | last2 = Bräuer | first2 = S. | last3 = Herrmann | first3 = M. | year = 1993| month = June | title = Optimization of Cyclic Redundancy-Check Codes with 24 and 32 Parity Bits | journal = IEEE Transactions on Communications | volume = 41 | issue = 6| doi = 10.1109/26.231911 | pages = 883 }}</ref><ref name="koop02">{{cite journal | last = Koopman | first = Philip | title = 32-Bit Cyclic Redundancy Codes for Internet Applications | journal = The International Conference on Dependable Systems and Networks | year = 2002 | month = July <!-- date from http://www.ece.cmu.edu/~koopman/pubs.html --> | url = http://www.ece.cmu.edu/~koopman/networks/dsn02/dsn02_koopman.pdf | accessdate = 14 January 2011 | pages = 459–468 | doi = 10.1109/DSN.2002.1028931 | isbn = 0-7695-1597-5 }}</ref> finding examples that have much better performance (in terms of [[Hamming distance]] for a given message size) than the polynomials of earlier protocols, and publishing the best of these with the aim of improving the error detection capacity of future standards.<ref name="koop02" /> In particular, [[iSCSI]] and [[SCTP]] have adopted one of the findings of this research, the [[#CRC-32C|CRC-32C]] (Castagnoli) polynomial.
| |
| | |
| The design of the 32-bit polynomial most commonly used by standards bodies, CRC-32-IEEE, was the result of a joint effort for the [[Rome Laboratory]] and the Air Force Electronic Systems Division by Joseph Hammond, James Brown and Shyan-Shiang Liu of the [[Georgia Institute of Technology]] and Kenneth Brayer of the [[MITRE]] Corporation. The earliest known appearances of the 32-bit polynomial were in their 1975 publications: Technical Report 2956 by Brayer for MITRE, published in January and released for public dissemination through [[DTIC]] in August,<ref name="Brayer1975">{{cite journal | last = Brayer | first = Kenneth | publication-date = August 1975 | title = Evaluation of 32 Degree Polynomials in Error Detection on the SATIN IV Autovon Error Patterns | publisher = [[National Technical Information Service]] | page = 74 | url = http://www.dtic.mil/srch/doc?collection=t3&id=ADA014825 <!-- http://oai.dtic.mil/oai/oai?verb=getRecord&metadataPrefix=html&identifier=ADA014825 --> | accessdate = 3 February 2011 }}</ref> and Hammond, Brown and Liu's report for the Rome Laboratory, published in May.<ref name="Hammond1975">{{cite journal | last = Hammond | first = Joseph L., Jr. | last2 = Brown | first2 = James E. | last3 = Liu | first3 = Shyan-Shiang | publication-date = May 1975 | title = Development of a Transmission Error Model and an Error Control Model | publisher = [[National Technical Information Service]] | url = http://www.dtic.mil/cgi-bin/GetTRDoc?AD=ADA013939&Location=U2&doc=GetTRDoc.pdf | accessdate = 7 July 2012 | page = 74 | doi = | bibcode = 1975STIN...7615344H | volume = 76 | year = 1975 | journal = Unknown }}</ref> Both reports contained contributions from the other team. During December 1975, Brayer and Hammond presented their work in a paper at the IEEE National Telecommunications Conference: the IEEE CRC-32 polynomial is the generating polynomial of a [[Hamming code]] and was selected for its error detection performance.<ref name="BrayerHammond1975">{{cite conference | last = Brayer | first = Kenneth | last2 = Hammond | first2 = Joseph L., Jr. | year = 1975 | month = December | title = Evaluation of error detection polynomial performance on the AUTOVON channel | conference = IEEE National Telecommunications Conference, New Orleans, La | booktitle = Conference Record | volume = 1 | publisher = Institute of Electrical and Electronics Engineers | location = New York | pages = 8–21 to 8–25 | bibcode = 1975ntc.....1....8B }}</ref> Even so, the Castagnoli CRC-32C polynomial used in iSCSI or SCTP matches its performance on messages from 58 bits to 131 kbits, and outperforms it in several size ranges including the two most common sizes of Internet packet.<ref name="koop02" /> The [[ITU-T]] [[G.hn]] standard also uses CRC-32C to detect errors in the payload (although it uses CRC-16-CCITT for PHY headers).
| |
| | |
| The table below lists only the polynomials of the various algorithms in use. Variations of a particular protocol can impose pre-inversion, post-inversion and reversed bit ordering as described above. For example, the CRC32 used in both Gzip and Bzip2 use the same polynomial, but Bzip2 employs reversed bit ordering, while Gzip does not.
| |
| | |
| CRCs in proprietary protocols might use a non-trivial initial value and final XOR for [[obfuscation]] but this does not add cryptographic strength to the algorithm. An unknown error-detecting code can be characterized as a CRC, and as such fully [[reverse engineering|reverse engineered]], from its output codewords.<ref name="ewing-rev-eng">{{Cite web|last=Ewing|first=Gregory C.|year=2010|month=March|title=Reverse-Engineering a CRC Algorithm|location=Christchurch|publisher=University of Canterbury|url=http://www.cosc.canterbury.ac.nz/greg.ewing/essays/CRC-Reverse-Engineering.html|accessdate=26 July 2011}}</ref>
| |
| | |
| See [[Polynomial representations of cyclic redundancy checks]] for the non-hex representations of the CRCs below.
| |
| | |
| {| class="wikitable"
| |
| ! rowspan="2" | Name
| |
| ! rowspan="2" | Uses
| |
| ! colspan="3" | Representations
| |
| |-
| |
| ! Normal
| |
| ! [[Mathematics of cyclic redundancy checks#Reversed representations and reciprocal polynomials|Reversed]]
| |
| ! [[Mathematics of cyclic redundancy checks#Reciprocal polynomials|Reversed reciprocal]]
| |
| |-
| |
| | CRC-1
| |
| | most hardware; also known as ''[[parity bit]]''
| |
| | 0x1
| |
| | 0x1
| |
| | 0x1
| |
| |-
| |
| | CRC-4-ITU
| |
| | [http://www.itu.int/rec/T-REC-G.704-199810-I/en G.704]
| |
| | 0x3
| |
| | 0xC
| |
| | 0x9
| |
| |-
| |
| | CRC-5-EPC
| |
| | [[Radio-frequency identification|Gen 2 RFID]]<ref name="gen-2-spec">{{Cite manual|title=Class-1 Generation-2 UHF RFID Protocol|version=1.2.0|publisher=[[EPCglobal]]|url=http://www.gs1.org/gsmp/kc/epcglobal/uhfc1g2/uhfc1g2_1_2_0-standard-20080511.pdf|date=23 October 2008|accessdate=4 July 2012|page=35}} (Table 6.12)</ref>
| |
| | 0x09
| |
| | 0x12
| |
| | 0x14
| |
| |-
| |
| | CRC-5-ITU
| |
| | [http://www.itu.int/rec/T-REC-G.704-199810-I/en G.704]
| |
| | 0x15
| |
| | 0x15
| |
| | 0x1A
| |
| |-
| |
| | CRC-5-USB
| |
| | [[Universal Serial Bus|USB]] token packets
| |
| | 0x05
| |
| | 0x14
| |
| | 0x12
| |
| |-
| |
| | CRC-6-[[CDMA2000]]-A
| |
| | mobile networks<ref name="cdma2000-spec">{{Cite manual|publisher=3rd Generation Partnership Project 2|year=2005|month=October|title=Physical layer standard for cdma2000 spread spectrum systems|version=Revision D version 2.0|pages=2-89–2-92|url=http://www.3gpp2.org/public_html/specs/C.S0002-D_v2.0_051006.pdf|accessdate=14 October 2013}}</ref>
| |
| | 0x27
| |
| | 0x39
| |
| | 0x33
| |
| |-
| |
| | CRC-6-[[CDMA2000]]-B
| |
| | mobile networks<ref name="cdma2000-spec"/>
| |
| | 0x07
| |
| | 0x38
| |
| | 0x23
| |
| |-
| |
| | CRC-6-ITU
| |
| | [http://www.itu.int/rec/T-REC-G.704-199810-I/en G.704]
| |
| | 0x03
| |
| | 0x30
| |
| | 0x21
| |
| |-
| |
| | CRC-7
| |
| | telecom systems, [http://www.itu.int/rec/T-REC-G.707/en G.707], [http://www.itu.int/rec/T-REC-G.832/en G.832], [[MultiMediaCard|MMC]], [[Secure Digital card|SD]]
| |
| | 0x09
| |
| | 0x48
| |
| | 0x44
| |
| |-
| |
| | CRC-7-MVB
| |
| | [[Train Communication Network]], [[IEC 60870-5]]<ref name="chakravarty-thesis">{{Cite thesis|last=Chakravarty|first=Tridib|others=Philip Koopman, advisor|year=2001|month=December|title=Performance of Cyclic Redundancy Codes for Embedded Networks|publisher=Carnegie Mellon University|location=Pittsburgh|url=http://www.ece.cmu.edu/~koopman/thesis/chakravarty.pdf|accessdate=8 July 2013|pages=5,18}}</ref>
| |
| | 0x65
| |
| | 0x53
| |
| | 0x72
| |
| |-
| |
| | CRC-8
| |
| |
| |
| | 0xD5
| |
| | 0xAB
| |
| | 0xEA<ref name="koop04" />
| |
| |-
| |
| | CRC-8-[[CCITT]]
| |
| | [http://www.itu.int/rec/T-REC-I.432.1-199902-I/en I.432.1]; [[Asynchronous Transfer Mode|ATM]] [[CRC-based framing|HEC]], [[ISDN]] HEC and cell delineation
| |
| | 0x07
| |
| | 0xE0
| |
| | 0x83
| |
| |-
| |
| | CRC-8-[[Dallas Semiconductor|Dallas]]/[[Maxim Integrated Products|Maxim]]
| |
| | [[1-Wire]] [[Bus (computing)|bus]]
| |
| | 0x31
| |
| | 0x8C
| |
| | 0x98
| |
| |-
| |
| | CRC-8-[[SAE-J1850]]
| |
| | [[AES3]]
| |
| | 0x1D
| |
| | 0xB8
| |
| | 0x8E
| |
| |-
| |
| | CRC-8-[[W-CDMA (UMTS)|WCDMA]]
| |
| | mobile networks<ref name="cdma2000-spec"/><ref name="richardson-wcdma">{{Cite book|last=Richardson|first=Andrew|title=WCDMA Handbook|location=Cambridge, UK|publisher=Cambridge University Press|date=17 March 2005|isbn=0-521-82815-5|page=223|url=http://books.google.co.uk/books?id=yN5lve5L4vwC&lpg=PA223&dq=&pg=PA223#v=onepage&q&f=false}}</ref>
| |
| | 0x9B
| |
| | 0xD9
| |
| | 0xCD<ref name="koop04" />
| |
| |-
| |
| | CRC-10
| |
| | ATM; [http://www.itu.int/rec/T-REC-I.610/en I.610]
| |
| | 0x233
| |
| | 0x331
| |
| | 0x319
| |
| |-
| |
| | CRC-10-[[CDMA2000]]
| |
| | mobile networks<ref name="cdma2000-spec"/>
| |
| | 0x3D9
| |
| | 0x26F
| |
| | 0x3EC
| |
| |-
| |
| | CRC-11
| |
| | [[FlexRay]]<ref name="flexray-spec">{{Cite manual|title=FlexRay Protocol Specification|version=3.0.1|publisher=Flexray Consortium|date=October 2010|page=114}} (4.2.8 Header CRC (11 bits))</ref>
| |
| | 0x385
| |
| | 0x50E
| |
| | 0x5C2
| |
| |-
| |
| | CRC-12
| |
| | telecom systems<ref>{{Cite journal | last = Perez | first = A. | coauthors = Wismer & Becker | title = Byte-Wise CRC Calculations | journal = IEEE Micro | volume = 3 | issue = 3 | pages = 40–50 | year = 1983 | doi = 10.1109/MM.1983.291120}}</ref><ref>{{Cite journal | last = Ramabadran | first = T.V. | last2 = Gaitonde | first2 = S.S. | title = A tutorial on CRC computations | journal = IEEE Micro | volume = 8 | issue = 4 | year = 1988 | pages = 62–75 | doi = 10.1109/40.7773 }}</ref>
| |
| | 0x80F
| |
| | 0xF01
| |
| | 0xC07<ref name="koop04" />
| |
| |-
| |
| | CRC-12-[[CDMA2000]]
| |
| | mobile networks<ref name="cdma2000-spec"/>
| |
| | 0xF13
| |
| | 0xC8F
| |
| | 0xF89
| |
| |-
| |
| | CRC-13-BBC
| |
| | Time signal, [[Radio teleswitch]]<ref>{{Cite manual|last=Ely|first=S.R.|last2=Wright|first2=D.T.|title=L.F. Radio-Data: specification of BBC experimental transmissions 1982|publisher=Research Department, Engineering Division, The British Broadcasting Corporation|year=1982|month=March|page=9|url=http://downloads.bbc.co.uk/rd/pubs/reports/1982-02.pdf|accessdate=11 October 2013}}</ref>
| |
| | 0x1CF5
| |
| | 0x15E7
| |
| | 0x1E7A
| |
| |-
| |
| | CRC-15-[[Controller Area Network|CAN]]
| |
| |
| |
| | 0x4599
| |
| | 0x4CD1
| |
| | 0x62CC
| |
| |-
| |
| | CRC-15-[[MPT1327]]
| |
| | <ref name="mpt1327">{{Cite manual |year=1997 |month=June |title=A signalling standard for trunked private land mobile radio systems (MPT 1327) |edition=3rd |publisher=[[Ofcom]] |page=3-3 |url=http://www.ofcom.org.uk/static/archive/ra/publication/mpt/mpt_pdf/mpt1327.pdf |accessdate=16 July 2012}} (3.2.3 Encoding and error checking)</ref>
| |
| | 0x6815
| |
| | 0x540B
| |
| | 0x740A
| |
| |-
| |
| | Chakravarty
| |
| | optimal for payloads ≤64 bits<ref name="chakravarty-thesis"/>
| |
| | 0x2F15
| |
| | 0xA8F4
| |
| | 0x978A
| |
| |-
| |
| | CRC-16-[[ARINC]]
| |
| | [[Aircraft Communications Addressing and Reporting System|ACARS]] applications<ref name="rehmann-acars">{{Cite journal | url=http://ntl.bts.gov/lib/1000/1200/1290/tn95_66.pdf | title=Air Ground Data Link VHF Airline Communications and Reporting System (ACARS) Preliminary Test Report | year=1995 | month=February | page=5 | last1=Rehmann | first1=Albert | last2=Mestre | first2=José D. | publisher=Federal Aviation Authority Technical Center | accessdate=7 July 2012}}</ref>
| |
| | 0xA02B
| |
| | 0xD405
| |
| | 0xD015
| |
| |-
| |
| | CRC-16-CCITT
| |
| | [[X.25]], [[V.41]], [[HDLC]] ''FCS'', [[XMODEM]], [[Bluetooth]], [[PACTOR]], [[Secure Digital card|SD]], many others; known as ''CRC-CCITT''
| |
| | 0x1021
| |
| | 0x8408
| |
| | 0x8810<ref name="koop04" />
| |
| |-
| |
| | CRC-16-[[CDMA2000]]
| |
| | mobile networks<ref name="cdma2000-spec"/>
| |
| | 0xC867
| |
| | 0xE613
| |
| | 0xE433
| |
| |-
| |
| | CRC-16-[[Digital Enhanced Cordless Telecommunications|DECT]]
| |
| | cordless telephones<ref name="en-300-175-3">{{Cite journal|title=ETSI EN 300 175-3|version=V2.2.1|date=November 2008|publisher=European Telecommunications Standards Institute|location=Sophia Antipolis, France}}</ref>
| |
| | 0x0589
| |
| | 0x91A0
| |
| | 0x82C4
| |
| |-
| |
| | CRC-16-[[International Committee for Information Technology Standards|T10]]-[[Data Integrity Field|DIF]]
| |
| | [[SCSI]] DIF
| |
| | 0x8BB7<ref name="thaler-t10-selection">{{Cite journal|last=Thaler|first=Pat|title=16-bit CRC polynomial selection|publisher=INCITS T10|date=28 August 2003|url=http://www.t10.org/ftp/t10/document.03/03-290r0.pdf|accessdate=11 August 2009}}</ref>
| |
| | 0xEDD1
| |
| | 0xC5DB
| |
| |-
| |
| | CRC-16-[[DNP3|DNP]]
| |
| | DNP, [[IEC 60870-5|IEC 870]], [[Meter-Bus|M-Bus]]
| |
| | 0x3D65
| |
| | 0xA6BC
| |
| | 0x9EB2
| |
| |-
| |
| | CRC-16-[[IBM]]
| |
| | [[Binary Synchronous Communications|Bisync]], [[Modbus]], [[Universal Serial Bus|USB]], [[ANSI]] [http://www.incits.org/press/1997/pr97020.htm X3.28], SIA DC-07, many others; also known as ''CRC-16'' and ''CRC-16-ANSI''
| |
| | 0x8005
| |
| | 0xA001
| |
| | 0xC002
| |
| |-
| |
| | Fletcher
| |
| | Used in [[Adler-32]] A & B CRCs
| |
| | colspan="3" align="center" | ''Not a CRC; see [[Fletcher's checksum]]''
| |
| |-
| |
| | CRC-17-CAN
| |
| | CAN FD<ref name="can-fd-spec">{{Cite manual|title=CAN with Flexible Data-Rate Specification|version=1.0|publisher=Robert Bosch GmbH|date=April 17, 2012|page=13|url=http://www.bosch-semiconductors.de/media/pdf_1/canliteratur/can_fd_spec.pdf}} (3.2.1 DATA FRAME)</ref>
| |
| | 0x1685B
| |
| | 0x1B42D
| |
| | 0x1B42D
| |
| |-
| |
| | CRC-21-CAN
| |
| | CAN FD<ref name="can-fd-spec"/>
| |
| | 0x102899
| |
| | 0x132281
| |
| | 0x18144C
| |
| |-
| |
| | CRC-24
| |
| | [[FlexRay]]<ref name="flexray-spec" />
| |
| | 0x5D6DCB
| |
| | 0xD3B6BA
| |
| | 0xAEB6E5
| |
| |-
| |
| | CRC-24-[[Radix-64]]
| |
| | [[Pretty Good Privacy#OpenPGP|OpenPGP]], [[RTCM|RTCM104v3]]
| |
| | 0x864CFB
| |
| | 0xDF3261
| |
| | 0xC3267D
| |
| |-
| |
| | CRC-30
| |
| | [[CDMA]]
| |
| | 0x2030B9C7
| |
| | 0x38E74301
| |
| | 0x30185CE3
| |
| |-
| |
| | Adler-32
| |
| | [[Zlib]]
| |
| | colspan="3" align="center" | ''Not a CRC; see [[Adler-32]]''
| |
| |-
| |
| | CRC-32
| |
| | [[High-Level Data Link Control|HDLC]], [[ANSI]] X3.66, ITU-T [[V.42]], [[Ethernet]], [[Serial ATA]], [[MPEG-2]], [[PKZIP]], [[Gzip]], [[Bzip2]], [[Portable Network Graphics|PNG]],<ref>{{Cite web | last = Boutell | first = Thomas | last2 = Randers-Pehrson | first2 = Glenn | coauthors = ''et al.'' | date = 14 July 1998 | title = PNG (Portable Network Graphics) Specification, Version 1.2 | url = http://www.libpng.org/pub/png/spec/1.2/PNG-Structure.html |publisher=Libpng.org | accessdate = 3 February 2011 }}</ref> many others
| |
| | 0x04C11DB7
| |
| | 0xEDB88320
| |
| | 0x82608EDB<ref name="koop02" />
| |
| |-
| |
| | CRC-32C (Castagnoli)
| |
| | [[iSCSI]], [[SCTP]], [[G.hn]] payload, [[SSE4#SSE4.2|SSE4.2]], [[Btrfs]], [[ext4]]
| |
| | 0x1EDC6F41
| |
| | 0x82F63B78
| |
| | 0x8F6E37A0<ref name="koop02" />
| |
| |-
| |
| | CRC-32K (Koopman)
| |
| |
| |
| | 0x741B8CD7
| |
| | 0xEB31D82E
| |
| | 0xBA0DC66B<ref name="koop02" />
| |
| |-
| |
| | CRC-32Q
| |
| | aviation; [[AIXM]]<ref name="aixm-primer">{{Cite manual|title=AIXM Primer|url=http://www.eurocontrol.int/sites/default/files/content/documents/information-management/20060320-aixm-primer.pdf|version=4.5|publisher=[[European Organisation for the Safety of Air Navigation]]|date=20 March 2006|accessdate=4 July 2012}}</ref>
| |
| | 0x814141AB
| |
| | 0xD5828281
| |
| | 0xC0A0A0D5
| |
| |-
| |
| | CRC-40-[[GSM]]
| |
| | GSM control channel<ref name="gammel">{{Cite manual |last=Gammel|first=Berndt M.|date=31 October 2005|title=Matpack documentation: Crypto - Codes <!-- |unusedurl=http://users.physik.tu-muenchen.de/gammel/matpack/html/LibDoc/Crypto/MpCRC.html long-time home, gone--> |url=http://www.matpack.de/index.html#DOWNLOAD |publisher=Matpack.de |accessdate=21 April 2013}} (Note: MpCRC.html is included with the Matpack compressed software source code, under /html/LibDoc/Crypto)</ref><ref name="geremia">{{Cite journal|last=Geremia|first=Patrick|year=1999|month=April|title=Cyclic redundancy check computation: an implementation using the TMS320C54x|issue=SPRA530|publisher=Texas Instruments|page=5|url=http://www.ti.com/lit/an/spra530/spra530.pdf|accessdate=4 July 2012}}</ref>
| |
| | 0x0004820009
| |
| | 0x9000412000
| |
| | 0x8002410004
| |
| |-
| |
| | CRC-64-[[Ecma International|ECMA]]
| |
| | [http://www.ecma-international.org/publications/standards/Ecma-182.htm ECMA-182], [[XZ Utils]]
| |
| | 0x42F0E1EBA9EA3693
| |
| | 0xC96C5795D7870F42
| |
| | 0xA17870F5D4F51B49
| |
| |-
| |
| | CRC-64-ISO
| |
| | [[High-Level Data Link Control|HDLC]], [[Swiss-Prot]]/[[TrEMBL]]; considered weak for hashing<ref name="jones-improved64">{{Cite journal|last=Jones|first=David T.|title=An Improved 64-bit Cyclic Redundancy Check for Protein Sequences|publisher=University College London|url=http://www.cs.ucl.ac.uk/staff/d.jones/crcnote.pdf|accessdate=15 December 2009}}<!-- date of PDF=1 Dec 2009; date of referenced C file=2 Mar 2006; date in C file comments=28 Sep 2002 --></ref>
| |
| | 0x000000000000001B
| |
| | 0xD800000000000000
| |
| | 0x800000000000000D
| |
| |}
| |
| | |
| ==Example implementation==
| |
| *[http://gnuradio.org/redmine/projects/gnuradio/repository/revisions/1cb52da49230c64c3719b4ab944ba1cf5a9abb92/entry/gr-digital/lib/digital_crc32.cc Implementation of CRC32 in Gnuradio];
| |
| *[http://www.cirvirlab.com/index.php/c-sharp-code-examples/111-c-sharp-class-for-crc-checksum-calculator.html C# code for CRC checksum calculus] – Gives C# class code for checksum calculator.
| |
| | |
| ==See also==
| |
| *[[Mathematics of cyclic redundancy checks]]
| |
| *[[Computation of cyclic redundancy checks]]
| |
| *[[Polynomial representations of cyclic redundancy checks]]
| |
| *[[Error detection and correction]]
| |
| *[[List of hash functions]]
| |
| *[[Information security]]
| |
| *[[Simple file verification]]
| |
| *[[cksum]]
| |
| *[[CRC-based framing|Header Error Correction]]
| |
| | |
| ==References==
| |
| {{Reflist|colwidth=30em}}
| |
| | |
| ==External links==
| |
| *[http://www.mathpages.com/home/kmath458.htm MathPages – Cyclic Redundancy Checks]: overview with an explanation of error-detection of different polynomials.
| |
| *[http://www.ross.net/crc/ The CRC Pitstop] – home of [http://www.ross.net/crc/crcpaper.html A Painless Guide to CRC Error Detection Algorithms]
| |
| *{{cite web |author=Black, R. |title=Fast CRC32 in Software |date=February 1994 |work=The Blue Book |publisher=Systems Research Group, Computer Laboratory, University of Cambridge |url=http://www.cl.cam.ac.uk/Research/SRG/bluebook/21/crc/crc.html}} algorithm 4 is used in Linux and info-zip's zip and unzip.
| |
| *{{cite web |author=Kounavis, M.; Berry, F. |title=A Systematic Approach to Building High Performance, Software-based, CRC generators |year=2005 |publisher=Intel |url=http://www.intel.com/technology/comms/perfnet/download/CRC_generators.pdf}}, Slicing-by-4 and slicing-by-8 algorithms
| |
| *[http://einstein.informatik.uni-oldenburg.de/papers/CRC-BitfilterEng.pdf 'CRC-Analysis with Bitfilters'.]
| |
| *[http://www.hackersdelight.org/crc.pdf Cyclic Redundancy Check]: theory, practice, hardware, and software with emphasis on CRC-32. A sample chapter from Henry S. Warren, Jr. ''[[Hacker's Delight]]''.
| |
| *[http://www.cosc.canterbury.ac.nz/greg.ewing/essays/CRC-Reverse-Engineering.html Reverse-Engineering a CRC Algorithm]
| |
| * [http://reveng.sourceforge.net/crc-catalogue/all.htm Catalogue of parametrised CRC algorithms]
| |
| *{{cite web |author=Koopman, Phil |title=Blog: Checksum and CRC Central |url=http://checksumcrc.blogspot.com/}} — includes links to PDFs giving 16 and 32-bit CRC [[Hamming distance]]s
| |
| | |
| <!-- Banners -->
| |
| {{Ecma International Standards}}
| |
| | |
| <!-- Languages -->
| |
| | |
| {{DEFAULTSORT:Cyclic Redundancy Check}}
| |
| <!-- Categories -->
| |
| [[Category:Binary arithmetic]]
| |
| [[Category:Checksum algorithms]]
| |
| [[Category:Finite fields]]
| |
| [[Category:Hash functions]]
| |