I want to find parameters for some CRC-24 algorithm.
All I know is that:
Source 1
generator polynomial is 1010111010110110111001011 = 0x15D6DCB, i.e.
5D6DCB
in normal representation (MSB-first code)
data (in hex)
00 40 00 01 09 01 01 B0 A0 0C 0A 01 00 04 07 A0 05 A5 03 80 01 02 00 00 00 00 00 00 00 00 00
gives
99 84 62
Generator polynomial is the same as used in CRC-24/FLEXRAY, but it's all about finding other parameters. I did some tests using flexible jacksum tool, but without success so far.
BYTES="00 40 00 01 09 01 01 B0 A0 0C 0A 01 00 04 07 A0 05 A5 03 80 01 02 00 00 00 00 00 00 00 00 00"
jacksum -s '\t' -a 'crc:24,5D6DCB,000000,fals,fals,000000+crc:24,5D6DCB,000000,true,true,000000+crc:24,5D6DCB,abcdef,fals,fals,000000+crc:24,5D6DCB,abcdef,true,true,000000+crc:24,5D6DCB,fedcba,fals,fals,000000+crc:24,5D6DCB,fedcba,true,true,000000+crc:24,5D6DCB,ffffff,fals,fals,ffffff+crc:24,5D6DCB,ffffff,true,true,ffffff' -F '#FILESIZE #ALGONAME{i}#SEPARATOR#CHECKSUM{i}' -E hex -q "hex:$(echo $BYTES | sed 's/ //g')"
31 crc:24,5d6dcb,000000,fals,fals,000000 6579ac
31 crc:24,5d6dcb,000000,true,true,000000 b17f3a
31 crc:24,5d6dcb,abcdef,fals,fals,000000 fd794d # CRC-24/FLEXRAY-B
31 crc:24,5d6dcb,abcdef,true,true,000000 367f23
31 crc:24,5d6dcb,fedcba,fals,fals,000000 e8a75b # CRC-24/FLEXRAY-A
31 crc:24,5d6dcb,fedcba,true,true,000000 5e048b
31 crc:24,5d6dcb,ffffff,fals,fals,ffffff a408f7
31 crc:24,5d6dcb,ffffff,true,true,ffffff 6bf1b9
Just in case I tried also reversed bytes order and reversed nibble order of input data, but there was no 99 84 62
or 62 84 99
there.
I think that refIn=false refOut=false xorOut=0
, but don't know for sure.
Source 2
DATA + CRC (in hex) - one entry per line:
00C01FFF057EA013CEFFCD1361D5E6E6001D64001400002C667E0000000000329BEA
00FFEC01007EA018CDCE2313BB18E6E7001E0149534B050000000100B3017E38CD0F
00C01FFF1B7EA021CEFFCD133817E6E6001CFEFEFEFEFEFEFEFE0149534B050000000100100CE67E00000000000000000000000000000000000000000000000000000054F223
00C01010107EA0080223C993E4437E000000000000000000000000000000003F96F1
00010C011D7EA01FC9022373B49681801205017E06017E0704000000010804000000015F757E0000000000000000000000000000000000000000000000000000000000723D01
00C010101B7EA0450223C9102148E6E6006036A1090607608574050801018A0207808B0760857405080201AC0A80083132333435363738BE10040E01000000065F1F0400007E1FFFFF83D77E0000000000000000000000000000000000000000000000000000009BFF67
00010C01037EA039C902233022BDE6E700612AA109060760857405080101A203020100A305A103020100BE11040F080100065F1F0400007C1F04000007194A7E00000010E99A
00C01010227EA01A0223C932AF55E6E600C0014000080000010000FF0200EADD7E00000000000000000000000000000000000000000000000000000000000000000000C22B4A
00010C011D7EA01FC90223523FA6E6E700C4014000090C07D201070101231A00FFC40080EC7E0000000000000000000000000000000000000000000000000000000000C162A6
00010C011D7EA01FC9022373B49681801205017E06017E0704000000010804000000015F757E0000000000000000000000000000000000000000000000000000000000723D01
Running reveng -w 24 -F -s ...
gives no models found
. Does it mean that some of the above examples may be corrupted? Unfortunately I'm not 100% sure that all of them are correct...
Is there any sane way to find init, refIn, refOut and xorOut without using brute-force?