Skip to main content
CRC Calc

CRC-16 / T10-DIF

Width16-bitRefInNoRefOutNo

Need custom parameters? Open in full calculator

Standard test string

Result

0xD0DB

Similar CRC Algorithms

Result is calculated from the current input. Check is the published verification value for the standard input 123456789. Click another algorithm to view its detail page.

CRC Lookup Table

0x00000x8BB70x9CD90x176E0xB2050x39B20x2EDC0xA56B0xEFBD0x640A0x73640xF8D30x5DB80xD60F0xC1610x4AD6
0x54CD0xDF7A0xC8140x43A30xE6C80x6D7F0x7A110xF1A60xBB700x30C70x27A90xAC1E0x09750x82C20x95AC0x1E1B
0xA99A0x222D0x35430xBEF40x1B9F0x90280x87460x0CF10x46270xCD900xDAFE0x51490xF4220x7F950x68FB0xE34C
0xFD570x76E00x618E0xEA390x4F520xC4E50xD38B0x583C0x12EA0x995D0x8E330x05840xA0EF0x2B580x3C360xB781
0xD8830x53340x445A0xCFED0x6A860xE1310xF65F0x7DE80x373E0xBC890xABE70x20500x853B0x0E8C0x19E20x9255
0x8C4E0x07F90x10970x9B200x3E4B0xB5FC0xA2920x29250x63F30xE8440xFF2A0x749D0xD1F60x5A410x4D2F0xC698
0x71190xFAAE0xEDC00x66770xC31C0x48AB0x5FC50xD4720x9EA40x15130x027D0x89CA0x2CA10xA7160xB0780x3BCF
0x25D40xAE630xB90D0x32BA0x97D10x1C660x0B080x80BF0xCA690x41DE0x56B00xDD070x786C0xF3DB0xE4B50x6F02
0x3AB10xB1060xA6680x2DDF0x88B40x03030x146D0x9FDA0xD50C0x5EBB0x49D50xC2620x67090xECBE0xFBD00x7067
0x6E7C0xE5CB0xF2A50x79120xDC790x57CE0x40A00xCB170x81C10x0A760x1D180x96AF0x33C40xB8730xAF1D0x24AA
0x932B0x189C0x0FF20x84450x212E0xAA990xBDF70x36400x7C960xF7210xE04F0x6BF80xCE930x45240x524A0xD9FD
0xC7E60x4C510x5B3F0xD0880x75E30xFE540xE93A0x628D0x285B0xA3EC0xB4820x3F350x9A5E0x11E90x06870x8D30
0xE2320x69850x7EEB0xF55C0x50370xDB800xCCEE0x47590x0D8F0x86380x91560x1AE10xBF8A0x343D0x23530xA8E4
0xB6FF0x3D480x2A260xA1910x04FA0x8F4D0x98230x13940x59420xD2F50xC59B0x4E2C0xEB470x60F00x779E0xFC29
0x4BA80xC01F0xD7710x5CC60xF9AD0x721A0x65740xEEC30xA4150x2FA20x38CC0xB37B0x16100x9DA70x8AC90x017E
0x1F650x94D20x83BC0x080B0xAD600x26D70x31B90xBA0E0xF0D80x7B6F0x6C010xE7B60x42DD0xC96A0xDE040x55B3

CRC Source Code

/* 
 * Model: CRC-16 / T10-DIF (16-bit)
 * Poly: 0x8BB7, Init: 0x0000, XorOut: 0x0000
 * CRC Table C Source Code & Lookup Table Generator
 */
#include <stdint.h>
#include <stddef.h>

const uint16_t crc_table[256] = {
  0x0000, 0x8BB7, 0x9CD9, 0x176E, 0xB205, 0x39B2, 0x2EDC, 0xA56B, 
  0xEFBD, 0x640A, 0x7364, 0xF8D3, 0x5DB8, 0xD60F, 0xC161, 0x4AD6, 
  0x54CD, 0xDF7A, 0xC814, 0x43A3, 0xE6C8, 0x6D7F, 0x7A11, 0xF1A6, 
  0xBB70, 0x30C7, 0x27A9, 0xAC1E, 0x0975, 0x82C2, 0x95AC, 0x1E1B, 
  0xA99A, 0x222D, 0x3543, 0xBEF4, 0x1B9F, 0x9028, 0x8746, 0x0CF1, 
  0x4627, 0xCD90, 0xDAFE, 0x5149, 0xF422, 0x7F95, 0x68FB, 0xE34C, 
  0xFD57, 0x76E0, 0x618E, 0xEA39, 0x4F52, 0xC4E5, 0xD38B, 0x583C, 
  0x12EA, 0x995D, 0x8E33, 0x0584, 0xA0EF, 0x2B58, 0x3C36, 0xB781, 
  0xD883, 0x5334, 0x445A, 0xCFED, 0x6A86, 0xE131, 0xF65F, 0x7DE8, 
  0x373E, 0xBC89, 0xABE7, 0x2050, 0x853B, 0x0E8C, 0x19E2, 0x9255, 
  0x8C4E, 0x07F9, 0x1097, 0x9B20, 0x3E4B, 0xB5FC, 0xA292, 0x2925, 
  0x63F3, 0xE844, 0xFF2A, 0x749D, 0xD1F6, 0x5A41, 0x4D2F, 0xC698, 
  0x7119, 0xFAAE, 0xEDC0, 0x6677, 0xC31C, 0x48AB, 0x5FC5, 0xD472, 
  0x9EA4, 0x1513, 0x027D, 0x89CA, 0x2CA1, 0xA716, 0xB078, 0x3BCF, 
  0x25D4, 0xAE63, 0xB90D, 0x32BA, 0x97D1, 0x1C66, 0x0B08, 0x80BF, 
  0xCA69, 0x41DE, 0x56B0, 0xDD07, 0x786C, 0xF3DB, 0xE4B5, 0x6F02, 
  0x3AB1, 0xB106, 0xA668, 0x2DDF, 0x88B4, 0x0303, 0x146D, 0x9FDA, 
  0xD50C, 0x5EBB, 0x49D5, 0xC262, 0x6709, 0xECBE, 0xFBD0, 0x7067, 
  0x6E7C, 0xE5CB, 0xF2A5, 0x7912, 0xDC79, 0x57CE, 0x40A0, 0xCB17, 
  0x81C1, 0x0A76, 0x1D18, 0x96AF, 0x33C4, 0xB873, 0xAF1D, 0x24AA, 
  0x932B, 0x189C, 0x0FF2, 0x8445, 0x212E, 0xAA99, 0xBDF7, 0x3640, 
  0x7C96, 0xF721, 0xE04F, 0x6BF8, 0xCE93, 0x4524, 0x524A, 0xD9FD, 
  0xC7E6, 0x4C51, 0x5B3F, 0xD088, 0x75E3, 0xFE54, 0xE93A, 0x628D, 
  0x285B, 0xA3EC, 0xB482, 0x3F35, 0x9A5E, 0x11E9, 0x0687, 0x8D30, 
  0xE232, 0x6985, 0x7EEB, 0xF55C, 0x5037, 0xDB80, 0xCCEE, 0x4759, 
  0x0D8F, 0x8638, 0x9156, 0x1AE1, 0xBF8A, 0x343D, 0x2353, 0xA8E4, 
  0xB6FF, 0x3D48, 0x2A26, 0xA191, 0x04FA, 0x8F4D, 0x9823, 0x1394, 
  0x5942, 0xD2F5, 0xC59B, 0x4E2C, 0xEB47, 0x60F0, 0x779E, 0xFC29, 
  0x4BA8, 0xC01F, 0xD771, 0x5CC6, 0xF9AD, 0x721A, 0x6574, 0xEEC3, 
  0xA415, 0x2FA2, 0x38CC, 0xB37B, 0x1610, 0x9DA7, 0x8AC9, 0x017E, 
  0x1F65, 0x94D2, 0x83BC, 0x080B, 0xAD60, 0x26D7, 0x31B9, 0xBA0E, 
  0xF0D8, 0x7B6F, 0x6C01, 0xE7B6, 0x42DD, 0xC96A, 0xDE04, 0x55B3
};

uint16_t calculate_crc(const uint8_t *data, size_t length) {
    uint16_t crc = 0x0000;
    for (size_t i = 0; i < length; i++) {
        #if 0
        uint8_t idx = (uint8_t)(crc ^ data[i]);
        crc = (crc >> 8) ^ crc_table[idx];
        #else
        uint8_t idx = (uint8_t)((crc >> 8) ^ data[i]);
        crc = (crc << 8) ^ crc_table[idx];
        #endif
    }
    return crc ^ 0x0000;
}

About CRC-16/T10-DIF

CRC-16/T10-DIF protects data integrity fields in SCSI storage systems.

CRC-16/T10-DIF is a 16-bit CRC model defined by polynomial 0x8BB7, an initial register value of 0x0000, and final XOR 0x0000. It uses normal, non-reflected input and output processing.

Documented application context for this model includes SCSI DIF, Storage systems, Data protection. The calculator above applies this exact parameter set to the current input; the published Check value below is instead the fixed verification result for ASCII 123456789.

Standard test vector

CRC implementations are commonly verified with the ASCII input 123456789.

Input format
ASCII
Input
123456789
Expected CRC
0xD0DB
Residue
0x0000

Model characteristics

A model is identified by its complete parameter set, not its polynomial alone.

Bit order
Normal
Register start
0x0000
Final XOR
0x0000
Published check
0xD0DB

Implementation checks for CRC-16/T10-DIF

  • Use a 16-bit register and polynomial 0x8BB7.
  • Initialize the register to 0x0000 and use XorOut 0x0000 exactly as listed; changing either value defines a different model.
  • Verify the implementation with ASCII “123456789”; the expected result is 0xD0DB.

Continue with the main calculator, browse the algorithm catalog, compare models in the Algorithm Reference section, or generate a lookup table.

Complete CRC-16/T10-DIF parameters

CRC parameter guide
ParameterValueMeaningReference
Width16 bitsCRC register and result widthRead guide
Poly0x8BB7Generator polynomial without the leading termRead guide
Init0x0000Initial CRC register valueRead guide
RefInNoReflect each input byte before processingRead guide
RefOutNoReflect the register before XOR OutRead guide
XorOut0x0000Final value XORed with the CRC registerRead guide
Check0xD0DBCRC of ASCII “123456789”Read guide
Residue0x0000Expected residue after appending a valid CRCRead guide
AliasesSCSI DIF CRC

Where CRC-16/T10-DIF is used

  • 01SCSI DIF
  • 02Storage systems
  • 03Data protection

CRC-16/T10-DIF FAQ

What is the check value for CRC-16/T10-DIF?

For the standard ASCII test input 123456789, the check value of CRC-16/T10-DIF is 0xD0DB.

What polynomial does CRC-16/T10-DIF use?

CRC-16/T10-DIF uses the 16-bit polynomial 0x8BB7.

Does CRC-16/T10-DIF use reflected input and output?

For CRC-16/T10-DIF, RefIn is No and RefOut is No.

What is CRC-16/T10-DIF commonly confused with?

The closest published model by parameter overlap is CRC-16/DECT-X, differing from CRC-16/T10-DIF in polynomial.