# find CRC algorithm, having some input and output data pairs

I'm trying to discover the algorithm of a lost software, there is an equipment that requiest some data, and validates the data using the "KEY", if you change any parameter of the data then you need a valid KEY.

The data is composed of 4 int values and the KEY is a HEX of 6-digits.

param1  param2      param3  param4  KEY
5669    30/06/2014  187769  960     0xA34108
5812    31/01/2015  233789  960     0xFAE094
5812    31/01/2015  233859  960     0x176471
6437    30/06/2015  368923  10000   0x35E6C2
6468    31/07/2015  398013  10000   0x404818
6161    30/09/2015  312581  960     0x9A59BC
6161    30/09/2015  311298  960     0xEC454C
6655    31/12/2016  448758  960     0x??????


I suspect the the algorithm is a type of CRC, because in the software you was able to enter something like a seed of 4-digits HEX in a field called CRC:

By the KEYs length I think it should be a CRC-24, but the software was using 4-lenght so is not the xor-in nor xor-out of the CRC-24.

I have tested on Python[crcmod] by bruteforce, all parameters combinations to use as input data and all combinations[0x000000-0xFFFFFF] of possible seed and xor-out for the CRC-24. I also tried to find the equation by curve-fitting but no luck, the relation seams unpredictable.

I know there are many CRC versions: polynomials, hash-tables, etc. Anyone have idea of the the CRC version or algorithm that could be used here?

• This is almost impossible, since there are very many ways the date could be stored internally, and since you said "the equipment validates the key", it's likely that the key generation is obfuscated on purpose. Can you tell anything about the name of the equipment, or the name of the software? Does the equipment have some kind of downloadable software that one might be able to extract and reverse? – Guntram Blohm Oct 30 '15 at 22:17