Questions tagged [crc16]

CRC16 is a 16-bit Cyclic Redundancy Check code, used mainly as an error detection method during data transmission.

A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital 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 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. Because the check value has a fixed length, the function that generates it is occasionally used as a hash function.wikipedia

The most commonly used polynomial lengths are:

  • CRC-8: 9 bits
  • CRC-16: 17 bits
  • CRC-32: 33 bits
  • CRC-64: 65 bits

A truly excellent tutorial on CRC's is Ross Williams' "Painless Guide to CRC Detection Algorithms", which can also be found here, here, here, here, and here.

323 questions
-2
votes
2 answers

What input should I give to crc16 Method

This my Mod bus crc_16 embedded code. I have run this code in code block many Times. There is no error but I am not getting actual crc value. I should get crc 05C8 and I am getting 8512 right now. I think I giving wrong input while calling CRC…
Shrikant
  • 1
  • 1
-2
votes
1 answer

Need help calculating checksum (crc-16) from a string of data

I need help calculating the checksum (crc-16:X16+X15+X2+1) for BYTE6 and BYTE7 of this data string. I have read some examples but I have no idea how and where to start. What does the X16, X15 etc means? What should I put in BYTE6 and BYTE7? Byte0:…
Windwaker
  • 1
  • 2
-2
votes
1 answer

How to convert this crc16 C implementation to java?

Hi I have this C crc16 implementation: const unsigned short CRCtbl[ 256 ] = { 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, 0xCC01, 0x0CC0, 0x0D80, 0xCD41,…
SUPERALEX
  • 51
  • 9
-2
votes
1 answer

How to convert given CRC16 C algorithm to C# algorithm

I'm a junior developer. I got a converting problem with below CRC16 check algorithm. I have to convert below C/C++ CRC-16 algorithm to C# algorithm. here is CRC-16 algorithm. unsigned short Crc16(unsigned char* rdata, unsigned int len){ int i,…
-2
votes
2 answers

Reverse Engineering a CRC Packet

I'm new to reversing. I need to analyse a packet which i think is checked by CRC. The packet is the following: …
pugilon
  • 87
  • 1
  • 2
  • 12
-3
votes
1 answer

Pass array of bytes into function header file

I would like to pass an array of bytes to a function but I got an error when compiling. I need the array in order to use CRC16.h because it wants uint8_t type data. I already tried to put byte; array byte; byte* in void calcCRC() but I always got…
nicolas h
  • 1
  • 1
-4
votes
1 answer

I'm looking for CRC-16/ARC Delphi(Pascal) Function

I'm looking for a CRC-16/ARC function in Delphi(Pascal). Bytes : 5a 02 20 70 11 15 20 26 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00…
namlus
  • 1
  • 2
1 2 3
21
22