Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 4, Issue 4, ... generated using CRC generator algorithm is known as the.
International Journal of Emerging Technology and Advanced Engineering Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 4, Issue 4, April 2014)
Cyclic Redundancy Codes: Study and Implementation Sukirty Jain1, Siddharth Singh Chouhan2 1
Student, 2Asst.Prof., Department of Information Technology, LNCT, Bhopal, M.P., India Transmitted data---1 1 1 0 1 1 0 1 (1 is changed to 0) Received data------1 0 1 0 1 1 0 1
Abstract- This paper introduces a way to authenticate the data transmitted over the network using Cyclic Redundancy Check (CRC) error detection technique which work on the concept of binary division. A network must be capable of transmitting the data from one end to other end with accuracy. But transmission errors are the common fact of data communication. It is not mandatory that data received at receiver end is identical to the data transmitted by the sender. There are a number of reasons responsible for data corruption as thermal noise, impulse noise, etc. For reliable communication, it is required that the system must be enriched with error detection and error correction techniques. Therefore a number of error control techniques have been introduced and one of them is CRC to achieve accuracy in data communication.
B. Burst error When multiple bits of data unit get corrupted during the transmission known as burst error. It is also known as the multiple bit error .Its detection and correction is difficult. They occur in serial data transmission where all the n bits are transmitted using a single transmission media e.g.: In this, multiple bit are changedTransmitted data---1 1 1 0 1 1 0 1 Received data------ 1 0 1 0 0 1 1 1
Index Terms- CRC (Cyclic Redundancy check), Data link layer, Generating Function, LRC (Longitudinal Redundancy Check), VRC (Vertical redundancy check).
I.
C. Data The information to be transmitted in the form of bits is known as data.
INTRODUCTION
D. Message The combination of data bits and the CRC bits generated using CRC generator algorithm is known as the message. It is also referred as the data unit. The basic concept used in CRC technique is that when the message is operated under binary division using generating polynomial as the divisor then the remainder must be zero to proof the correctness of data.
Channel coding is an important operation for signal processing for the efficient transmission of digital information (data in the form of bits) over the channel. In channel coding the number of symbols in the source encoded message is increased in a controlled manner in order to facilitate two basic objectives at the receiver one is Error detection and other is Error correction. Error detection and error correction to achieve good communication is also employed in devices. It is used to reduce the level of noise and interferences in electronic medium.Whenever the data is transmitted over the network, it does not guarantee for its accurate reception and suffer from unpredictable changes in the transmission media. Therefore the Data Link layer in OSI model is responsible for error control. Error control is defined as the combination error correction and error detection. When the data is transmitted over the network, it is the responsibility of Data Link layer to check for the error between the routers and to correct them.Error is any unwanted change which reduces the usefulness of original data. There are two types of error1. Single bit error 2. Burst error
[Message][CRC bits] -------------------------Generating function II.
=
0
ERROR CONTROL
Error control is the process of error detection and error correction when the data is transmitted over the network from one end to other end. It assures that the data is accurately transmitted to other end. This is required to protect the data from any type of alteration, enhancement or any other type of changes. This allows one to identify whether data unit received is altered in midway or it is received in its original form as transmitted from the sender end. The most common type of attack in data communication is man-in-the-middle whose presence results in data transformation. Error control is implemented at the transport layer and data link layer of OSI model but transport layer provides error control between router and host and data link layer provides error control between router and router. This study is concerned with the error control at data link layer.
A. Single bit error When only one bit of data unit gets corrupted during the transmission known as single bit error.Its detection and correction is easy. They occur in parallel data transmission where n different cables are used to transmit n different data bits e.g.:
213
International Journal of Emerging Technology and Advanced Engineering Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 4, Issue 4, April 2014) A. Error detection The process of detecting the error using the concept of redundancy is known as error detection. Redundancy means some extra bits are append to the data unit for error detection and the extra bits appended are known as the redundant bits. There are four different techniques used for error detection1. Vertical redundancy check (VRC) 2. Longitudinal redundancy check (LRC) 3. Cyclic redundancy check (CRC) 4. Checksum.
A.CRC generator It is the process of calculating the CRC bits at sender side using a generating function such that the data unit and generating function are operated using bit-wise XOR operation where generating function is of n+1 bits and CRC is of n bits. The data bits to be operated are appended with the n 0’s which together referred as data unit to be transmitted to receiver end. B. CRC checker It is the process of calculating the CRC bits at receiver side to check whether they are equivalent to 0 or not. It also uses the same bit-wise XOR operation on data unit received from sender side and generating function. If all the CRC bits are 0 then data unit is accepted otherwise it is discarded.
B. Error correction The process of correcting the error after detecting error before its reception is known as the error correction. The Hammingcode technique is generally used for error correction in Data link layer. This paper makes an assessment on CRC error detection technique.
C. Polynomial The polynomial must satisfy following conditions1. It should not be divisible by x. 2. It should be divisible by x+1. The first condition guarantees that it can detect the burst error of length equal to highest degree of polynomial. The second condition guarantees that all burst error affecting odd number of bits are detected. The Generating polynomial is an important part of CRC error detection technique. It is simply a mathematical equation which is used to find the generating function bits. This generating function can be obtained by finding the coefficient of each and every term of the equation. The total numbers of bits in the generating function are one more than the highest degree of equation. For ex.: If the highest degree of any given equation is 4 then the number of generating function bits are 5. This generating function always remains same at both sender and receiver side then only it computes the accurate result. If this function is changed due to any reason then it will generate false result and error detection is not guaranteed for the given data unit. Both the sender and receiver will have the wrong assumption for data unit and it will be difficult to identify that whether data unit is correct or corrupted. It may be possible that CRC generated at sender side is correct but due to altered generating function at receiver function the correct data may be interpreted wrong and the wrong data is interpreted as correct. Let the generating polynomial bex^3+x+1
C. Redundancy One way for error detection is to retransmit the data bits to receiver end. The receiver will make a bit by bit comparison to detect the error. It is an accurate technique but not efficient one as it increases the time requirement. Rather than retransmitting the data bits, a group of bits is appended to the data unit for error detection. This concept is known as the redundancy and the extra bits appended are known as the redundant bits. These bits are discarded if the accurate data unit is received by the receiver. i. Generating function: It is the mechanism used for generating the redundant bits by analyzing the data. The generating function at receiver and sender side is same. ii. Use: To check the accuracy of data transmitted. This helps in deciding whether to accept or reject the data.
III.
CRC (C YCLIC REDUNDANCY CHECK)
It is one of the most powerful error detection technique based on the principle of binary division. In this, a sequence of bits append to the data unit is known as the CRC which has two important qualities1. It must be one less than the number of divisor bits. 2. After appending these bits data unit must be exactly divisible by divisor. There are two important steps of CRC technique1. CRC generator 2. CRC checker
214
International Journal of Emerging Technology and Advanced Engineering Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 4, Issue 4, April 2014) Then the generating function is1011 1-coefficient of degree 3 0-coefficient of degree 2 1-coefficient of degree 1 1-coefficient of degree 0 The highest degree of given polynomial equation is 3, therefore the number of bits in the generating function is 4. Let there is another example for finding the generating polynomial where the last term of equation is not given. Let the given polynomial equation bex^5+x^3+x^2+x Then the generating function is101110 1-coefficient of degree 5 0-coefficient of degree 4 1-coefficient of degree 3 1-coefficient of degree 2 1-coefficient of degree 1 0-coefficient of degree 0 The highest degree of given polynomial equation is 5, therefore the number of bits in the generating function is 6. IV.
3. Perform Adder operation on the variable entered in step-1. 4. Store data bits, generating function bits and data unit (data bits + CRC bits) to be operated in different arrays. 5. Repeat step-6 until each bit of data unit is processed. 6. Check data unit to be operatedif(1st bit==0) XOR the data unit with 0 and store the result in same array of data unit. else XOR the data unit with generating function and store the result in same array of data unit. 7. Display CRC bits and data unit to be transmitted over the network to receiver end after appending CRC bits to data bits. B. Algorithm for CRC checker 1. Input the number of data unit bits (number of data bits + number of CRC bits) received from the sender. 2. Enter generating function bits, its value and data unit bits value. 3. Store generating function bits and data unit (data bits + CRC bits) received from sender in different arrays. 4. Repeat step-5 until each bit of data unit is processed. 5. Check data unit received from senderif(1st bit==0) XOR the data unit with 0 and store the result in same array of data unit. else XOR the data unit with generating function and store the result in same array of data unit. 6. Display CRC bits, perform adder operation on them and store the result in an integer variable. 7. Check the value of integer variable (var)if (var ==0) Data unit is correct and accepted after discarding the CRC bits. else Data unit received is corrupted and discarded.
ALGORITHM
There are two algorithm proposed for CRC error detection technique in which one is to generate the CRC bits at sender side and another is for error detection in data unit transmitted from one end to other end at receiver side. The CRC bits computed using CRC generator algorithm is appended to the data unit to be transmitted to other end. The received message is checked using CRC checker algorithm and if it is correct then the CRC is discarded and data is accepted otherwise data is discarded. This paper presents a clear algorithm for CRC. Initially when there is only information then 0s are appended to the data bits which act as CRC bits to compute the CRC. The computed result is replaced by 0 bits append to the data bits. This is the actual data unit which is also known as the message and transmitted over the network to the other end. At the receiver side, same generating function is used and result is computed. If it is all 0s then data received is correct otherwise it is corrupted and discarded. The two algorithms are as below1. Algorithm for CRC generator 2. Algorithm for CRC checker
Fig4.1 and fig4.2 represents the flowchart for CRC checker and CRC generator. In CRC generator, data bits, number of CRC bits, generating function bits and its value is entered from the user. The data bits and CRC bits are operated under binary addition. The result generated after binary addition is operated under binary division using generating function obtained by generating polynomial. The remainder of the binary division is the actual CRC generated at sender side. The CRC is appended to the data bits and transmitted on the network for the destination.
A. Algorithm for CRC generator 1. Input the number of data bits and CRC bits. 2. Enter generating function bits, its value and data bits value.
215
International Journal of Emerging Technology and Advanced Engineering Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 4, Issue 4, April 2014) At the destination end, same generating function is used and received message is operated under binary division using the same procedure to ensure whether the data unit is correct or corrupted.
If the remainder of binary division is all 0s then the data unit is correct and accepted for further processing but if the remainder is non-zero then data has been altered in the mid way during transmission and it is discarded by the receiver as it is of no use to the receive end.
Fig 4.1 CRC Generator
Fig 4.2 CRC Checker
V.
CONCLUSION AND FUTURE WORK
REFERENCES
This paper presented the error detection technique CRC based on the binary division using basic XOR bitwise operation and algorithm to implement it. It works on the concept of redundancy that is to append some extra bits in data unit known as redundant bits to detect the error and implemented at the Data Link layer of OSI model. There are a number of techniques used for error detection at data link layer among which CRC provides desirable efficiency. It provides good performance in terms of accuracy and security compared to other techniques. The future challenge is to make the code applicable to real world entity for example, audio, image etc. VI.
[1] [2] [3]
[4] [5]
[6]
P ERFORMANCE ANALYSIS O F CRC
[7]
1. It can detect all burst error affect odd number of bits. 2. It can detect all burst error of length less than or equal to degree of polynomial. 3. It can detect burst error of length greater than degree of polynomial with high probability.
[8]
[9]
216
Peterson; et.al, "Cyclic Codes for Error Detection", Proceedings of the IRE, Vol: 49 (1): ,January 1961. Ritter, Terry, "The Great CRC Mystery", Dr. Dobb's Journal 11 (2), 21 May 2009. Stigge, Martin; et.al, “Reversing CRC – Theory and Practice”, Berlin: Humboldt University Berlin, p. 17, retrieved 4 February 2011. Williams, Ross N. (24 September 1996), "A Painless Guide to CRC Error Detection Algorithms V3.00", retrieved 5 June 2010. WH; Teukolsky, et.al,"Section 22.4 Cyclic Redundancy and Other Checksums", Numerical Recipes: The Art of Scientific Computing (3rd ed.). New York: Cambridge University. Koopman; et.al, "Cyclic Redundancy Code (CRC) Polynomial Selection for Embedded Networks", The International Conference on Dependable Systems and Networks: 145–154, retrieved 14 January 2011. Castagnoli; et.al , "Optimization of Cyclic Redundancy-Check Codes with 24 and 32 Parity Bits". IEEE, June 1993. Koopman, Philip, "32-Bit Cyclic Redundancy Codes for Internet Applications". The International Conference on Dependable Systems and Networks, Retrieved 14 January 2011. Yanbin Zhang; Qi Yuan,” A multiple bits error correction method based on cyclic redundancy check code”, 9th International Conference on Signal Processing, ICSP 2008.
International Journal of Emerging Technology and Advanced Engineering Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 4, Issue 4, April 2014) [10] Debopam Ghosh; et.al, ” A generalized code for computing cyclic redundancy check”, International Journal of Students Research in Technology & Management, Vol 1(2), April 2013. [11] Jun Jin Kong ;et.al,” Interleaved cyclic redundancy check (CRC) code”, Conference Record of the Thirty-Seventh Asilomar Conference on Signals, Systems and Computers, Vol:2,2004.
[12] http://en.wikipedia.org/wiki/Cyclic_redundancy_check. [13] Vikas gupta; et.al,”Error detection and correction: Introduction”,vol:2(2), ISSN, Nov 2012.
217
An