IBM BSC CRC?
Paul Koning
paulkoning at comcast.net
Mon Jan 27 08:30:31 CST 2020
> On Jan 26, 2020, at 6:05 PM, Peter Coghlan via cctalk <cctalk at classiccmp.org> wrote:
>
> Mattis Lind wrote:
>
>>
>> Hello IBM BSC Experts!
>>
>> I am trying to figure out the CRC algorithm used by IBM BSC. I have tried a
>> lot of different settings in crcreveng but not getting a match.
>>
>
> I'm definately not an IBM BSC Expert and I don't even play one on TV. I have
> tweaked some BSC emulation code written by someone else so I have some vague
> idea about this stuff, however, the emulation did not include CRCs so I'm
> not sure how much help I can be.
>
>>
>> I am pretty convinced that the CRC-16 used by IBM was
>> 16 15 2
>> x + x + x + 1
>>
>
> In the file bcb_crc.c supplied with the funetnje and HUJI-NJE packages, it
> says the following (which may or may not relate to CRCs in the BSC world):
>
> | The generating polynomial is X^16+X^15+X^2+1 (CRC-16). When computing the
> | CRC, DLE's are not computed (except from a second DLE in a sequence of
> | 2 DLE's). Furthermore, the first DLE+ETB which starts a text block is
> | not computed also.
>
> There is also some code for checking CRCs, however, it is not clear to me
> if this code is for use with BSC lines or with DECnet lines.
CRC-16 sounds familiar, as does 0x8005 for a polynomial. I collected a very large lists of CRCs a while back (it's in the test suite for the crc.py module in pydecnet); in there I have the description "IBM" for the 8005 polynomial. The list came for the most part from Wikipedia: https://en.wikipedia.org/wiki/Cyclic_redundancy_check which lists BISYNC as one of the users.
Initial value would be zero; that's common for several of the older CRCs (including CRC-CCITT used by DDCMP).
paul
More information about the cctech
mailing list