1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

CRC-CCITT CRC-16 with initial value FFFF

Discussion in 'PHP' started by GoranR, Jun 17, 2016.

  1. #1
    Hello members. Like first i do not have a clue how to do it, but i can tell you what i need it. I need small calculator to calculate checksum for this values:
    AF 26 50 D9 where F1 EF is checksum.
    Someone on one forum told me that this checksum is calculated by CRC-CCITT CRC-16 with initial value FFFF
    I am found some calculators on websites as this ones:
    http://www.lammertbies.nl/comm/info/crc-calculation.html
    http://zorc.breitbandkatze.de/crc.html
    I tried but no success. If you need more examples, i can give you:
    6D 60 92 9F -> checksum F8 10
    14 44 EB BB -> checksum 55 21
    Can anyone can help me with explanation how to calculate ?
    Please ...
    Thank you
     
    GoranR, Jun 17, 2016 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    PoPSiCLe, Jun 17, 2016 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #3
    It is decidedly not CCITT, though it is quite clearly a 16 bit checksum. There are several different approaches to checksums -- some ancient, some fairly recent. I'll run these numbers past the ones I know to see if I can come up with a proper result. This could be what's called a seeded checksum, where you need another seed value to create the result (like that FFFF), it could be word-width calculation with byte or even nybble width overlap... there's a LOT of possible ways of doing it, each more convoluted than the last.
     
    deathshadow, Jun 19, 2016 IP
  4. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #4
    I just plugged that into some 30 different checksum methods I know of, and came up empty. About 90% of them report "AF 26 50 D9" and "6D 60 92 9F" as the same checksum! I'm wondering if maybe it's something strange like MSB vs. LSB... but conventional additive, word xor, byte xor, flat xor, rot8, rot4, polynomial carry -- no combination of these methods came even close to the values you have. I even went so far as to test all possible 0...0xFFFF seeds in them. Nada.
     
    deathshadow, Jun 20, 2016 IP
  5. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #5
    Perhaps it would be wise to inform us what is creating these values, and the checksums?
     
    PoPSiCLe, Jun 21, 2016 IP